Remove braces from single line if statement.
Reported by checkpatch.
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Add spaces around '+' in fw.c to follow kernel coding style.
Reported by checkpatch.
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Simplify block comment to a single line to clear a checkpatch warning.
WARNING: Block comments use * on subsequent lines
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Correct block comment to clear a checkpatch warning.
WARNING: Block comments should align the * on each line
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Rename parameter of odm_EVMdbToPercentage() to avoid CamelCase.
Value -> value
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Replace tabs with spaces in odm_hwconfig.c where appropriate.
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Add spaces around '*' in odm_hwconfig.c to follow kernel coding style.
Reported by checkpatch.
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Add spaces around '+' in odm_hwconfig.c to follow kernel coding style.
Reported by checkpatch.
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
The function odm_SignalScaleMapping() is just a wrapper for
odm_SignalScaleMapping_92CSeries().
Rename odm_SignalScaleMapping_92CSeries() to odm_SignalScaleMapping()
and remove the wrapper.
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cleanup all inconsistent indenting reported by smatch.
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Remove the unnecessary socket buffer null check in hostif_data_request.
There is already an appropriate null check in the calling function:
(ks_wlan_net.c) ks_wlan_start_xmit
Signed-off-by: Aymen Qader <qader.aymen@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Remove an extra space in ddk750_mode.c to fix indentation
Signed-off-by: Aymen Qader <qader.aymen@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
The following:
bool efuse_re_pg_sec1flag;
u8 efuse_re_pg_data[8];
are not referenced anywhere in the rtlwifi code.
Signed-off-by: Rick Veens <rickveens92@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Found by Linux Driver Verification project (linuxtesting.org).
Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This patch adds the missing release function for the DCI device that frees
the container structure it is embedded in.
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Use the ENOMEM constant instead of -1 for kzalloc failure checks in
rtl_halmac.c
Signed-off-by: Aymen Qader <qader.aymen@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This patch removes the macro msdc_irq_restore() and replaces its
usage with call to the function called in the macro definition.
Issue found by checkpatch.
Signed-off-by: Nishad Kamdar <nishadkamdar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Digi does not support it, no one has hardware for it, and no one is
working on it, so let's drop it for now. If anyone wants to pick it
back up, then can revert this patch.
Reported-by: Lidza Louina <lidza.louina@gmail.com>
Reported-by: Mark Hounschell <markh@compro.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Replace Kconfig help header and text to match other modules. Issue found
by checkpatch.
Spacing adjusted to match Documentation/process/coding-style.rst. Issue
reported by rdunlap@infradead.org.
Reported-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Sehro Rautenkranz <sehro@sehro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
There are extraneous parantheses that are causing clang to produce a
warning so remove these.
Clean up 3 clang warnings:
equality comparison with extraneous parentheses [-Wparentheses-equality]
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Remove unnecessary parentheses between 'address-of' operators
and struct members.
Issues found with checkpatch.pl
Signed-off-by: Dafna Hirschfeld <dafna3@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Clang emits the following warning:
drivers/staging/rtl8723bs/os_dep/sdio_intf.c:25:36: warning: variable
'acpi_ids' is not needed and will not be emitted
[-Wunneeded-internal-declaration]
static const struct acpi_device_id acpi_ids[] = {
^
1 warning generated.
Mark acpi_ids with the attribute __used, which makes it clear to Clang
that we don't want this warning while not inhibiting Clang's dead code
elimination from removing the unreferenced internal symbol when moving
the data to the globally available symbol with MODULE_DEVICE_TABLE.
$ nm -S drivers/staging/rtl8723bs/os_dep/sdio_intf.o | grep acpi
0000000000000000 0000000000000040 R __mod_acpi__acpi_ids_device_table
Link: https://github.com/ClangBuiltLinux/linux/issues/169
Suggested-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Replace calls to `printk` with `dev_info` and `pr_err`
Issues found with checkpatch.pl
Signed-off-by: Dafna Hirschfeld <dafna3@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Replace comparisons of a variable 'x' to NULL with
either 'x' or '!x'.
Issues found with checkpatch.pl
Signed-off-by: Dafna Hirschfeld <dafna3@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Remove unnecessary braces from one line 'if' statements.
Issues found with checkpatch.pl
Signed-off-by: Dafna Hirschfeld <dafna3@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
One merge commit in here to bring in the SPI_CS_WORD flag patches
that are also going via the SPI tree.
There are a few more fixes than normal for a pull targetting the
next merge window. These are all long term issues and as we are late
in the cycle, they can wait.
New device support
* ad7606
- Add support fo the ad7605-4 driver. This driver is still in staging
but is heading in the right direction to graduate, motivated partly
by the requirement for this device support.
* ST VL53L0X ToF ranging sensor
- New minimal driver. Interrupt support to follow.
New features
* SPI_CS_WORD optimization allows long transfers with the chip select
toggled every 16bits. There is a software fallback as well to let
drivers not care about whether the hardware supports it.
* bh1750
- Device tree support and bindings.
* ti-ads7950
- Use the SPI_CS_WORD optmization to save lots of cpu cycles (assuming
the hardware supports it)
Fixes and cleanups
* ad5064
- Fix some long incorrect regulator error handling that preventing
enabling the internal regulator.
* ad7606
- The ad7606 doesn't actually have a 2.5V range and the values provided
for scale have always been wrong. Fix them.
- Drop some wrong kernel-doc (things that don't exist)
- Add missing kernel-doc
* at91-adc
- Fixing missing ack of dataready on sysfs channel reads to avoid spurious
interrupts.
- Fix a wrong channel numbers in triggered_buffer_mode
* hmc5843
- Fix incorrect part number in a comment.
* imx25-gcq
- Fix a device_node leak in an error path.
* meson-saradc
- Drop an unused and pointless define.
- Use of_device_get_match_data instead of opencoding
- Tidy up how meson_sar_adc_param is accessed.
- Rework prior to adding some temperature sensor support.
-----BEGIN PGP SIGNATURE-----
iQJFBAABCAAvFiEEbilms4eEBlKRJoGxVIU0mcT0FogFAluyb14RHGppYzIzQGtl
cm5lbC5vcmcACgkQVIU0mcT0Fogh+Q/9EwIO/feLfyoC5RfgDzbvPUTFzvEEFpoh
HtlKRzKuQv03iWf0xb2XQPS0SBQSxldP0ugonBONENGR7mGf2vaF2cwrsPpe92JS
0jd64RND1mKmljsYb49ulm4wy2o5hAP2BH79sQku0ZwGlG8hhjgfdDo7Oz/PVwDL
Mra9WXRhVXTfE3V8rF5rDpRtD7pjDNQlXsVfMg5C5sloh+d3ebTuFnJxyWExMv7d
c1Hbh2JhJfDq0AmviTLdkQ8Sx8GpdFK8sYqkwcZUpMfrAutT/CL/zRDh4xOPe7+6
MRLfwd/w1zzsmaDWq+HiT70E2AVykKMhHbpJxLx/OPzibVsxOSRcm/y52M7kXqM2
nJFSu+qtoJO301nAycWzrrBaXGImuwtK9pt55Hi+3Ytc2xvJWA5QDnb1s6WV1xNY
I2jA9QFaWjRhLgZBlluDhd5gGNPQaKj9EvGrBTC8mUDc6ybItZvKiwSV5+eMQZYV
4jbFAgDWDafMDl/7NYhyir5T8u8mjaUlSS2/SQUYq7+GzjKXSdY51M8yro369Vj+
P9X93ObkK2IntfbMSh8RfIFJFR7BlKQcHjOf8t5GPLvDnFPlTppgcV+1ZBrTp4RF
V6UIOs5qZkXkR6/SIQl+e93i++LOmksVf1wMQ/WtfN7KhNdAYqaj2+W5SYWyYQMP
v/z+KNuoeXw=
=2Qke
-----END PGP SIGNATURE-----
Merge tag 'iio-for-4.20b' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next
Jonathan writes:
Second set of IIO new device support features and cleanup for the 4.20 cycle.
One merge commit in here to bring in the SPI_CS_WORD flag patches
that are also going via the SPI tree.
There are a few more fixes than normal for a pull targetting the
next merge window. These are all long term issues and as we are late
in the cycle, they can wait.
New device support
* ad7606
- Add support fo the ad7605-4 driver. This driver is still in staging
but is heading in the right direction to graduate, motivated partly
by the requirement for this device support.
* ST VL53L0X ToF ranging sensor
- New minimal driver. Interrupt support to follow.
New features
* SPI_CS_WORD optimization allows long transfers with the chip select
toggled every 16bits. There is a software fallback as well to let
drivers not care about whether the hardware supports it.
* bh1750
- Device tree support and bindings.
* ti-ads7950
- Use the SPI_CS_WORD optmization to save lots of cpu cycles (assuming
the hardware supports it)
Fixes and cleanups
* ad5064
- Fix some long incorrect regulator error handling that preventing
enabling the internal regulator.
* ad7606
- The ad7606 doesn't actually have a 2.5V range and the values provided
for scale have always been wrong. Fix them.
- Drop some wrong kernel-doc (things that don't exist)
- Add missing kernel-doc
* at91-adc
- Fixing missing ack of dataready on sysfs channel reads to avoid spurious
interrupts.
- Fix a wrong channel numbers in triggered_buffer_mode
* hmc5843
- Fix incorrect part number in a comment.
* imx25-gcq
- Fix a device_node leak in an error path.
* meson-saradc
- Drop an unused and pointless define.
- Use of_device_get_match_data instead of opencoding
- Tidy up how meson_sar_adc_param is accessed.
- Rework prior to adding some temperature sensor support.
* tag 'iio-for-4.20b' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio:
iio: ad5064: Fix regulator handling
iio: adc: meson-saradc: use the address attribute from iio_chan_spec
iio: adc: meson-saradc: do not use meson_sar_adc_iio_channels directly
iio: adc: at91: fix wrong channel number in triggered buffer mode
iio: adc: at91: fix acking DRDY irq on simple conversions
iio: adc: meson-saradc: simplify access to meson_sar_adc_param
iio: adc: meson-saradc: use of_device_get_match_data
iio: adc: meson-saradc: remove #define MESON_SAR_ADC_DELTA_10_TS_C_SHIFT
iio: light: bh1750: Add device tree support
dt-bindings: iio: light: bh1750: Add device tree binding documentation
staging:iio:ad7606: Add support for the ad7605-4
iio: proximity: Add driver support for ST's VL53L0X ToF ranging sensor.
staging:iio:ad7606: update structs with doc annotations
iio: magnetometer: hmc5843: Fixed a comment error.
iio: adc: imx25-gcq: Fix leak of device_node in mx25_gcq_setup_cfgs()
iio: adc: ti-ads7950: use SPI_CS_WORD to reduce CPU usage
spi: add software implementation for SPI_CS_WORD
spi: add new SPI_CS_WORD flag
staging:iio:ad7606: Remove incorrect kernel doc annotations
staging:iio:ad7606: fix voltage scales
Store fbhelper and afb struct directly in vbox_private and use
drm_fb_helper_fbdev_setup to replace vbox_fbdev_init, note we cannot use
drm_fb_helper_fbdev_teardown since we use a private framebuffer for the
fbdev.
And replace vbox_driver_lastclose with drm_fb_helper_lastclose.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
vbox_mode_valid always returns MODE_OK, which is also the default if no
mode_valid callback is defined.
vbox_best_single_encoder chains to drm_encoder_find, the drm-core will
call drm_encoder_find itself if there is no best_encoder call back.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Extend our planes atomic_check callbacks to be more thorough by calling
the drm_atomic_helper_check_plane_state helper.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Replace vbox_crtc_commit and vbox_crtc_disable with
vbox_crtc_atomic_[en|dis]able which are the preferred callbacks for
these for atomic drivers.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Atomic modesetting does not use the traditional dpms call backs, instead
we should check crtc_state->active.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Restore page-flip support now that the atomic conversion is complete.
Since the mode parameter to vbox_crtc_set_base_and_mode() now never
is NULL call drm_atomic_crtc_needs_modeset() to check if we need to
check for input-mapping changes, to avoid doing unnecesarry work on
a flip. And hookup the drm_atomic_helper_page_flip helper to implement
the page_flip callback.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Now that the state objects are wired up, we can:
1) Move to the final atomic handlers
2) Wire up atomic set_config helper
3) Switch to drm_mode_config_helper_suspend/resume for suspend/resume
4) Enable atomic modesetting ioctl
This is all done in one commit because doing this piecemeal leads to
an intermediate state which triggers WARN_ONs in the atomic code because
e.g. plane->fb is still being set.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Once we are fully atomic plane->fb will always be NULL and we also
should not access things like crtc->enabled and crt->[hw]mode.
Now that we've wired up the state object handlers, we always have a
plane_state and crtc_state so change the code referencing plane->fb and
crtc->* to use the data from the plane_state and crt_state instead.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Wire up state object handlers for the crtc-s and the planes, call
drm_mode_config_reset() after creating all the crtc-s and encoders and
remove the legacy drm_helper_disable_unused_functions() call.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Use drm_plane_helpers for the primary plane and replace our custom
mode_set callback with drm_helper_crtc_mode_set.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
In preparation for atomic conversion, let's use the transitional atomic
helpers drm_plane_helper_update/disable.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
When setting a mode we not only pass the mode to the hypervisor,
but also information on how to map / translate input coordinates
for the emulated USB tablet. This input-mapping may change when
the mode on *another* crtc changes.
This means that sometimes we must do a modeset on other crtc-s then
the one being changed to update the input-mapping. Including crtc-s
which may be disabled inside the guest (shown as a black window
on the host unless closed by the user).
With atomic modesetting the mode-info of disabled crtcs gets zeroed
yet we need it when updating the input-map to avoid resizing the
window as a side effect of a mode_set on another crtc.
This commit adds caching of the mode info into out private vbox_crtc
struct so that we always have the info at hand when we need it.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drm_mode_page_flip_ioctl() cannot deal with the in between phase of
the transitioning to atomic modeset support. Once we start using
drm_helper_crtc_mode_set(), we start setting plane->state on the primary
plane. But we are not fully atomic yet so then set both plane-state->fb
and plane->fb.
If both plane-state->fb and plane->fb are set drm_mode_page_flip_ioctl()
gets confused and stops calling drm_framebuffer_get() on the new fb while
still calling drm_framebuffer_put() on the old fb.
The current page_flip implementation expects drm_mode_page_flip_ioctl()
to take care of both and once we switch to drm_atomic_helper_page_flip()
that will expect neither to be done, taking care of both itself.
So for the transition we need to remove page_flip support and then after
the transition is complete and we set DRIVER_ATOMIC in our driver_features,
we can start using drm_atomic_helper_page_flip().
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
All the encoder_helper_funcs are optional, and even setting the
drm_encoder_helper_funcs vtable itself is optional and may be left out
when not using any of the helper funcs, so lets drop all of this.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>