aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2021-06-24staging: rtl8188eu: remove DBG_88E_LEVEL macro from include/rtw_debug.hPhillip Potter1-6/+0
Remove definition of DBG_88E_LEVEL macro from include/rtw_debug.h, as it no longer has any callers and does not follow kernel coding conventions. Removing all such macros will ultimately allow the removal of this file. Signed-off-by: Phillip Potter <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-06-24staging: rtl8188eu: remove all DBG_88E_LEVEL calls from core/rtw_xmit.cPhillip Potter1-2/+0
Remove all DBG_88E_LEVEL calls from core/rtw_xmit.c as this macro is unnecessary, and these calls are dubious in terms of necessity. Removing all calls will ultimately allow the removal of the macro itself. Signed-off-by: Phillip Potter <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-06-24staging: rtl8188eu: remove all DBG_88E_LEVEL calls from core/rtw_pwrctrl.cPhillip Potter1-8/+1
Remove all DBG_88E_LEVEL calls from core/rtw_pwrctrl.c as this macro is unnecessary, and these calls are dubious in terms of necessity. Removing all calls will ultimately allow the removal of the macro itself. Signed-off-by: Phillip Potter <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-06-24staging: rtl8188eu: remove all DBG_88E_LEVEL calls from core/rtw_ioctl_set.cPhillip Potter1-5/+0
Remove all DBG_88E_LEVEL calls from core/rtw_ioctl_set.c as this macro is unnecessary, and these calls are dubious in terms of necessity. Removing all calls will ultimately allow the removal of the macro itself. Signed-off-by: Phillip Potter <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-06-24staging: rtl8188eu: remove all DBG_88E_LEVEL calls from core/rtw_mlmw_ext.cPhillip Potter1-21/+0
Remove all DBG_88E_LEVEL calls from core/rtw_mlmw_ext.c as this macro is unnecessary, and these calls are dubious in terms of necessity. Removing all calls will ultimately allow the removal of the macro itself. Signed-off-by: Phillip Potter <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-06-24staging: rtl8188eu: remove all DBG_88E_LEVEL calls from os_dep/ioctl_linux.cPhillip Potter1-2/+0
Remove all DBG_88E_LEVEL calls from os_dep/ioctl_linux.c as this macro is unnecessary, and these calls are dubious in terms of necessity. Removing all calls will ultimately allow the removal of the macro itself. Signed-off-by: Phillip Potter <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-06-24staging: rtl8188eu: remove more unused definesMartin Kaiser1-147/+1
Remove some defines for register addresses and bits which obviously refer to chipsets other than rtl8188eu. Signed-off-by: Martin Kaiser <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-06-24staging: rtl8188eu: remove sdio definesMartin Kaiser1-136/+0
Remove sdio defines which are not used by this driver. Signed-off-by: Martin Kaiser <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-06-24staging: rtl8188eu: make efuse_ReadEFuse staticMartin Kaiser2-2/+1
The function is used only inside rtw_efuse.c. Signed-off-by: Martin Kaiser <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-06-24staging: rtl8188eu: remove RT_TRACE prints from pwrseqcmd.cMartin Kaiser1-24/+0
Eventually, all driver-specific debug prints should be removed. Take another step in that direction. Signed-off-by: Martin Kaiser <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-06-24staging: rtl8188eu: simplify rtl88eu_mon_initMartin Kaiser1-8/+5
The code looks a bit nicer without goto. Signed-off-by: Martin Kaiser <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-06-24staging: rtl8188eu: remove HAL_INIT_PROFILE_TAGMartin Kaiser1-20/+0
Remove HAL_INIT_PROFILE_TAG, which is an empty loop already. Signed-off-by: Martin Kaiser <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-06-24staging: rtl8188eu: remove RT_TRACE and MSG_88E prints from usb_halinit.cMartin Kaiser1-21/+0
Eventually, all driver-specific debug prints should be removed. Take another step in that direction. Signed-off-by: Martin Kaiser <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-06-24staging: rtl8188eu: remove unnecessary if clauseMartin Kaiser1-12/+2
if and else do the same thing. Signed-off-by: Martin Kaiser <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-06-24staging: rtl8188eu: remove efuse typeMartin Kaiser3-27/+21
A number of efuse-related functions have an "efuse type" parameter. This type is not used and can be removed. Signed-off-by: Martin Kaiser <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-06-24staging: rtl8188eu: remove a couple of unused definesMartin Kaiser1-13/+0
Remove some defines which are not used by this driver. Signed-off-by: Martin Kaiser <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-06-24staging: rtl8188eu: remove RT_TRACE prints from rtl8188e_hal_init.cMartin Kaiser1-5/+0
Eventually, all driver-specific debug prints should be removed. Take another step in that direction. Signed-off-by: Martin Kaiser <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-06-24staging: rtl8188eu: remove RT_TRACE prints from usb_intf.cMartin Kaiser1-27/+1
Eventually, all driver-specific debug prints should be removed. Take another step in that direction. Signed-off-by: Martin Kaiser <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-06-24staging: rtl8188eu: handle errors from dev_alloc_nameMartin Kaiser1-1/+4
Fail the usb interface initialization if dev_alloc_name returns an error. Other wlan drivers like natsemi or atmel use the same error handling. Signed-off-by: Martin Kaiser <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-06-24staging: rtl8188eu: fix usb_submit_urb error handlingMartin Kaiser1-4/+3
usb_read_port prepares a bulk in urb and calls usb_submit_urb to pass the usb to the usb core. It seems wrong that usb_read_port returns success to its caller if usb_submit_urb failed with -EPERM. According to drivers/usb/core/urb.c, usb_submit_urb returns -EPERM when an urb is resubmitted after being cancelled by usb_kill_urb etc. The only caller who checks the return value of usb_read_port is rtw_hal_inirp_init. This function submits the bulk in urbs for the first time after the netdevice is opened. We'll not receive -EPERM from usb_submit_urb in this case. The urbs are resubmitted by read_port_complete, which does not check for errors from usb_read_port. This driver may kill pending bulk in urbs when the netdevice is closed when the driver is unloaded or the system goes to sleep. I don't think that this will interrupt an ongoing netdev open. Suggested-by: Dan Carpenter <[email protected]> Signed-off-by: Martin Kaiser <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-06-24staging: rtl8188eu: remove "rtw_ieee80211_back_parties"Christophe JAILLET1-7/+0
This enum is unused. It is also close to "ieee80211_back_parties" in "include/linux/ieee80211.h", which should be used if needed. So remove it Signed-off-by: Christophe JAILLET <[email protected]> Link: https://lore.kernel.org/r/f389e0d54a5a8a46c9a696207541aa1cb433676b.1624132543.git.christophe.jaillet@wanadoo.fr Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-06-24staging: rtl8188eu: remove "rtw_ieee80211_back_actioncode"Christophe JAILLET2-14/+7
This enum is the same as "ieee80211_back_actioncode" in "include/linux/ieee80211.h". Update the code accordingly and remove useless comment. Signed-off-by: Christophe JAILLET <[email protected]> Link: https://lore.kernel.org/r/6b6d8d81e7b2115e9206d2960ce09e1b2e8b6381.1624132543.git.christophe.jaillet@wanadoo.fr Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-06-24staging: rtl8188eu: remove useless commentMichael Straube1-16/+0
Remove block comment about function HwSuspendModeEnable92Cu. The comment contains no useful information and there is even no HwSuspendModeEnable92Cu function in the driver code. 'git grep -n HwSuspendModeEnable92Cu drivers/staging/rtl8188eu' returns nothing. Reviewed-by: Martin Kaiser <[email protected]> Signed-off-by: Michael Straube <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-06-24staging: rtl8723bs: Fix an error handling pathChristophe JAILLET1-1/+3
'ret' is known to be 0 at this point. It must be set to -ENOMEM if a memory allocation occurs. Fixes: 554c0a3abf21 ("staging: Add rtl8723bs sdio wifi driver") Signed-off-by: Christophe JAILLET <[email protected]> Link: https://lore.kernel.org/r/a9533d1594900152e1e64e9f09e54240e3b7062a.1624177169.git.christophe.jaillet@wanadoo.fr Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-06-18staging: rtl8723bs: rtw_efuse: Fix coding styleShreyas Krishnakumar1-7/+4
Remove unnecessary braces around single statement blocks as warned by checkpatch.pl Signed-off-by: Shreyas Krishnakumar <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-06-18staging: rtl8723bs: hal: use eth_broadcast_addr() to assign broadcast addressYang Yingliang1-2/+1
Using eth_broadcast_addr() to assign broadcast address instead of copying from an array that contains the all-ones broadcast address. Signed-off-by: Yang Yingliang <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-06-18staging: rtl8723bs: core: use eth_broadcast_addr() to assign broadcast addressYang Yingliang1-5/+3
Using eth_broadcast_addr() to assign broadcast address instead of copying from an array that contains the all-ones broadcast address. Signed-off-by: Yang Yingliang <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-06-18staging: rtl8723bs: os_dep: use eth_broadcast_addr() to assign broadcast addressYang Yingliang2-4/+3
Using eth_broadcast_addr() to assign broadcast address instead of memset() or copying from an array that contains the all-ones broadcast address. Signed-off-by: Yang Yingliang <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-06-18staging: r8188eu/core: remove the check for NULL pointer in _rtw_enqueue_cmd()Qiang Ma1-5/+0
Remove the check for _rtw_enqueue_cmd(), because rtw_enqueue_cmd() already has a check of NULL pointer, so this condition is not possible. Signed-off-by: Qiang Ma <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-06-18staging: ks7010: Wrap macro definitions in parenthesisCaleb D.S. Brzezinski1-12/+12
Wrap the definition of TX_RATE_* constants in parenthesis to prevent incorrect casting during expansion, as recommended by checkpatch.pl. Signed-off-by: Caleb D.S. Brzezinski <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-06-18staging: rts5208: remove redundant continue statementColin Ian King1-1/+0
The continue statement at the end of a for-loop has no effect, remove it. Signed-off-by: Colin Ian King <[email protected]> Addresses-Coverity: ("Continue has no effect") Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-06-18staging: android: ashmem: add size field in procfs fdinfoliuhailong1-0/+2
add this information to help user to find ashmem problem. ashmem leak scenario: -000|fd = ashmem_create_region -001|mmap and pagefault -002|munmap -003|forget close(fd) <---- which lead to ashmem leak Signed-off-by: liuhailong <[email protected]> 收件人: 刘海龙(DuckBuBee) <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-06-17Merge tag 'iio-for-5.14b' of ↵Greg Kroah-Hartman78-822/+713
https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next Jonathan writes: Second set of Counter and IIO new device support, cleanups etc for 5.14 Counter ------ First part of general rework of counter subsystem to add a chrdev interface for event drive data capture. Most of it will hopefully land next cycle. * Consolidate documentation to avoid multiple copies of same docs in per device files. * Constify various arrays etc across subsystem. * 104-quad-8: - Annotate the module config parameter to avoid using it when kernel is locked down. - Spelling and trivial comment drops etc * Intel QEP - Follow up cleanups of trivial stuff from initial patch series. IIO --- Includes some cleanups as part of two ongoing audits - runtime pm usage in IIO. - Insufficient alignment on buffers passed to iio_push_to_buffers_with_timstamp() New device support * bosch,bmc150 - Add ID for BMA253 Minor features / cleanups / minor fixes / late breaking fixes * iio_push_to_buffers_with_timestamp() alignment fixes. This set includes those where the best option is to mark the buffer as __aligned(8). Normally this choice was made because there is too high a degree of possible variation in number of channels enabled to be able to guarantee the timestamp was always in the same location. This ruled out the more obvious structure form used in other drivers. Only one small class of related issues have patches under review and we can finally tighten up the explicit rules to reflect the hidden requirement. * dummy - Kconfig build dependency fix. * adi,ad_sigma_delta - General devm related simplifications for these devices. * adi,adf4350 - Fix some missing cleanup on error path. * adi,adis, ADC drivers. - Clean out unneeded spi_set_drvdata() * ams-taos,tcs3472 - Fix a potential free of an irq that was never allocated. * atlas,sensor - Drop unbalanced runtime pm call and use pm_runtime_resume_and_get() to reduce boilerplate. * bosch,bma180 - Fix bandwidth register values used. * bosch,bmc150 - Fix wrong pointer being dereferenced in remove. - Stop device trying unregister itself rather than the second device. - Refactor ACPI second device handing. - Add support for DUAL250E ACPI HID. - Move some stuff into the header to enable following patches to not add additional accessor functions. Drop existing accessors. - Add support for hinge angle setting with DUAL250E ACPI DSM to ensure keyboard and touchpad enabled correctly when in laptop mode and disabled otherwise. - Add label attr for the multiple sensor locations with DUAL250E ACPI HID. - Fix scale units for bma222 - Various reordering of devices supported lists to be alphabetical order. - Drop unnecessary duplicated chip_info_tbl[] entries. - Document that some devices have two interrupts, even if not currently used by the driver. - Move bma254 over to the bma255 driver. - Move to more consistent scale values, based on assumption that some datasheets use lower precision in their calculations in comparison with others. * hid-sensors - Use namespaces for exported symbols. - Update includes using manual inspection of output of the include-what-you-use tool. * invensense,icp10100 - Drop unbalanced runtime pm put. Use pm_runtime_resume_and_get() to cleanly handle potential error. * invensense,mpu6050 - Drop use of %hhx string formatting. - runtime pm boilerplate removal and drop an unbalanced call in remove. * liteon,ltr501 - Fix inaccurate volatile register list. - Fix wrong mode bit. - Add a missing leXX_to_cpu() conversion. - Mark ltr501_chip_info structure as const. * pulsed-light-lidar: - Boilerplate removal using runtime_pm_resume_and_get() * scmi-sensors - Formatting of SPDX fix. * silabs,si1133 - Fix a string format warning. - Drop remaining uses of %hhx string formatting. * silabs,si1145 - Drop use of %hhx string formatting. * ti,ads1015 - Drop unbalanced runtime pm call in remove and reduce boilerplate. * tag 'iio-for-5.14b' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio: (76 commits) iio: light: tcs3472: do not free unallocated IRQ iio: accel: bmc150: Use more consistent and accurate scale values iio: hid-sensors: Update header includes iio: pressure: icp10100: Balance runtime pm + use pm_runtime_resume_and_get() iio: prox: pulsed-light-v2: Use pm_runtime_resume_and_get() iio: chemical: atlas-sensor: Balance runtime pm + pm_runtime_resume_and_get() iio: adc: ads1015: Balance runtime pm + pm_runtime_resume_and_get() iio: imu: mpu6050: Balance runtime pm + use pm_runtime_resume_and_get() iio: hid-sensors: lighten exported symbols by moving to IIO_HID namespace iio: prox: isl29501: Fix buffer alignment in iio_push_to_buffers_with_timestamp() iio: light: vcnl4035: Fix buffer alignment in iio_push_to_buffers_with_timestamp() iio: light: vcnl4000: Fix buffer alignment in iio_push_to_buffers_with_timestamp() iio: magn: rm3100: Fix alignment of buffer in iio_push_to_buffers_with_timestamp() iio: adc: ti-ads8688: Fix alignment of buffer in iio_push_to_buffers_with_timestamp() iio: adc: mxs-lradc: Fix buffer alignment in iio_push_to_buffers_with_timestamp() iio: adc: hx711: Fix buffer alignment in iio_push_to_buffers_with_timestamp() iio: adc: at91-sama5d2: Fix buffer alignment in iio_push_to_buffers_with_timestamp() counter: interrupt-cnt: Add const qualifier for actions_list array iio: ltr501: mark ltr501_chip_info as const iio: ltr501: ltr501_read_ps(): add missing endianness conversion ...
2021-06-16iio: light: tcs3472: do not free unallocated IRQfrank zago1-2/+4
Allocating an IRQ is conditional to the IRQ existence, but freeing it was not. If no IRQ was allocate, the driver would still try to free IRQ 0. Add the missing checks. This fixes the following trace when the driver is removed: [ 100.667788] Trying to free already-free IRQ 0 [ 100.667793] WARNING: CPU: 0 PID: 2315 at kernel/irq/manage.c:1826 free_irq+0x1fd/0x370 ... [ 100.667914] Call Trace: [ 100.667920] tcs3472_remove+0x3a/0x90 [tcs3472] [ 100.667927] i2c_device_remove+0x2b/0xa0 Signed-off-by: frank zago <[email protected]> Link: https://lore.kernel.org/r/[email protected] Fixes: 9d2f715d592e ("iio: light: tcs3472: support out-of-threshold events") Cc: <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]>
2021-06-16iio: accel: bmc150: Use more consistent and accurate scale valuesStephan Gerhold1-22/+24
It is quite strange that BMA222 and BMA222E have very close, yet subtly different values in their scale tables. Comparing the datasheets this is simply because the "Resolution" for the different measurement ranges are documented with different precision. For example, for +-2g the BMA222 datasheet [1] suggests a resolution of 15.6 mg/LSB, while the BMA222E datasheet [2] suggests 15.63 mg/LSB. Actually, there is no need to rely on the resolution given by the Bosch datasheets. The resolution and scale can be calculated more consistently and accurately using the range (e.g. +-2g) and the channel size (e.g. 8 bits). Distributing 4g (-2g to 2g) over 8 bits results in an exact resolution of (4g / 2^8) = 15.625 mg/LSB which is the same value as in both datasheets, just slightly more accurate. Multiplying g = 9.80665 m/s^2 we get a more accurate value for the IIO scale table. Generalizing this we can calculate the scale tables more accurately using (range / 2^bits) * g * 10^6 (because of IIO_VAL_INT_PLUS_MICRO). Document this and make the scale tables more consistent and accurate for all the variants using that formula. Now the scale tables for BMA222 and BMA222E are consistent and probably slightly more accurate. [1]: https://media.digikey.com/pdf/Data%20Sheets/Bosch/BMA222.pdf [2]: https://www.mouser.com/datasheet/2/783/BST-BMA222E-DS004-06-1021076.pdf Reviewed-by: Linus Walleij <[email protected]> Signed-off-by: Stephan Gerhold <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jonathan Cameron <[email protected]>
2021-06-16iio: hid-sensors: Update header includesJonathan Cameron14-42/+16
General driver churn doesn't always include updates of header includes. Manual review of the output of the include-what-you-use checker lead to the following cleanup. Hopefuly this brings things back to a good state for the hid-sensor drivers. Signed-off-by: Jonathan Cameron <[email protected]> Cc: Jiri Kosina <[email protected]> Cc: Srinivas Pandruvada <[email protected]> Acked-by: Srinivas Pandruvada <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2021-06-16iio: pressure: icp10100: Balance runtime pm + use pm_runtime_resume_and_get()Jonathan Cameron1-2/+3
The devm_ handled runtime pm disable calls pm_runtime_put_sync_suspend() which isn't balancing a matching get call. It isn't a bug as such, because the runtime pm core doesn't decrement the reference count below zero, but it is missleading so let's drop it. Using pm_runtime_resume_and_get() new call makes it easy to handle failures in resume as it doesn't hold a reference count if it exits with an error. Signed-off-by: Jonathan Cameron <[email protected]> Cc: Jean-Baptiste Maneyrol <[email protected]> Reviewed-by: Mauro Carvalho Chehab <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2021-06-16iio: prox: pulsed-light-v2: Use pm_runtime_resume_and_get()Jonathan Cameron1-1/+3
Using this new call makes it easy to handle any errors as a result of runtime resume as it exits without leaving the reference count elevated. Signed-off-by: Jonathan Cameron <[email protected]> Cc: Matt Ranostay <[email protected]> Acked-by: Matt Ranostay <[email protected]> Reviewed-by: Mauro Carvalho Chehab <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2021-06-16iio: chemical: atlas-sensor: Balance runtime pm + pm_runtime_resume_and_get()Jonathan Cameron1-9/+4
The pm_runtime_put_noidle() call in remove isn't balanced with any get, so drop it. Note this isn't a bug as the runtime pm core will not allow the reference count to go negative, making this a noop. However, it is confusing to the reader so let's drop it. pm_runtime_resume_and_get() replacement found using the coccicheck script under review at: https://lore.kernel.org/lkml/[email protected]/ As pm_runtime_resume_and_get() returns <= 0 take advantage of that to change the error checking to if (ret) which is more in keeping with the rest of this driver. This is a prequel to taking a closer look at the runtime pm in IIO drivers in general. Signed-off-by: Jonathan Cameron <[email protected]> Cc: Matt Ranostay <[email protected]> Acked-by: Matt Ranostay <[email protected]> Reviewed-by: Mauro Carvalho Chehab <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2021-06-16iio: adc: ads1015: Balance runtime pm + pm_runtime_resume_and_get()Jonathan Cameron1-4/+1
The call to pm_runtime_put_noidle() in remove() is not balancing a counter increment. Note this doesn't matter as the runtime pm core will not allow the counter to go negative. However, it is confusing to the reader so let's remove it. The pm_runtime_resume_and_get() replacement was found using coccicheck script under review at: https://lore.kernel.org/lkml/[email protected]/ This is a prequel to taking a closer look at the runtime pm in IIO drivers in general. Signed-off-by: Jonathan Cameron <[email protected]> Reviewed-by: Mauro Carvalho Chehab <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2021-06-16iio: imu: mpu6050: Balance runtime pm + use pm_runtime_resume_and_get()Jonathan Cameron2-17/+8
Remove an unblanced pm_runtime_put_sync_suspend() call in inv_pu_pm_disable(). Not this call is not a bug, because the runtime pm core will not allow the reference counter to go negative. It is however confusing and serves no purpose. pm_runtime_resume_and_get() case found using coccicheck script under review at: https://lore.kernel.org/lkml/[email protected]/ pm_runtime_resume_and_get() returns <= 0 only so simplify related checks to bring this more inline with nearby calls. This is a prequel to taking a closer look at the runtime pm in IIO drivers in general. Signed-off-by: Jonathan Cameron <[email protected]> Cc: Jean-Baptiste Maneyrol <[email protected]> Reviewed-by: Mauro Carvalho Chehab <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2021-06-16iio: hid-sensors: lighten exported symbols by moving to IIO_HID namespaceAndy Shevchenko14-17/+30
A namespace for exported symbols makes clear who is a provider and who is a consumer of the certain resources. Besides that, it doesn't pollute the common namespace. Signed-off-by: Andy Shevchenko <[email protected]> Acked-by: Alexandre Belloni <[email protected]> Acked-by: Srinivas Pandruvada <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jonathan Cameron <[email protected]>
2021-06-16iio: prox: isl29501: Fix buffer alignment in ↵Jonathan Cameron1-1/+1
iio_push_to_buffers_with_timestamp() Add __aligned(8) to ensure the buffer passed to iio_push_to_buffers_with_timestamp() is suitable for the naturally aligned timestamp that will be inserted. Here an explicit structure is not used, because the holes would necessitate the addition of an explict memset(), to avoid a kernel data leak, making for a less minimal fix. Fixes: 1c28799257bc ("iio: light: isl29501: Add support for the ISL29501 ToF sensor.") Signed-off-by: Jonathan Cameron <[email protected]> Cc: Mathieu Othacehe <[email protected]> Reviewed-by: Nuno Sá <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2021-06-16iio: light: vcnl4035: Fix buffer alignment in ↵Jonathan Cameron1-1/+2
iio_push_to_buffers_with_timestamp() Add __aligned(8) to ensure the buffer passed to iio_push_to_buffers_with_timestamp() is suitable for the naturally aligned timestamp that will be inserted. Here an explicit structure is not used, because the holes would necessitate the addition of an explict memset(), to avoid a potential kernel data leak, making for a less minimal fix. Fixes: 55707294c4eb ("iio: light: Add support for vishay vcnl4035") Signed-off-by: Jonathan Cameron <[email protected]> Cc: Parthiban Nallathambi <[email protected]> Reviewed-by: Nuno Sá <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2021-06-16staging: rtl8188eu: remove _dbg_dump_tx_info functionPhillip Potter3-21/+0
Remove the _dbg_dump_tx_info function from hal/rtl8188e_xmit.c, as it doesn't actually do anything and is only called from one place. It used to have some redundant debugging statements in it, but these have now been removed anyway, so all it does is read information from the adapter to set a variable 'dump_txdesc' which is then never used. This fixes a kernel test robot warning. Reported-by: kernel test robot <[email protected]> Signed-off-by: Phillip Potter <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-06-16staging: rtl8188eu: remove unused variables from hal/rtl8188e_cmd.cPhillip Potter1-4/+0
Remove set but unused variables from within the file hal/rtl8188e_cmd.c in the function rtl8188e_set_FwMediaStatus_cmd, as they are triggering kernel test robot warnings. Reported-by: kernel test robot <[email protected]> Signed-off-by: Phillip Potter <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-06-16staging: rtl8188eu: remove unused variable from os_dep/ioctl_linux.cPhillip Potter1-3/+0
Remove set but unused variable 'reason' from within the file os_dep/ioctl_linux.c in the function rtw_wx_set_mlme, as it is triggering a kernel test robot warning. Reported-by: kernel test robot <[email protected]> Signed-off-by: Phillip Potter <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-06-16staging: rtl8188eu: remove unused variables from core/rtw_mlme_ext.cPhillip Potter1-11/+4
Remove set but unused variables from within the file core/rtw_mlme_ext.c, as they are triggering kernel test robot warnings. Reported-by: kernel test robot <[email protected]> Signed-off-by: Phillip Potter <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-06-16staging: rtl8188eu: remove unused variables from core/rtw_efuse.cPhillip Potter1-9/+2
Remove set but unused variables from within the file core/rtw_efuse.c in the function efuse_read_phymap_from_txpktbuf, as they are triggering kernel test robot warnings. Also, remove the local 'lenc' array as well, as nothing is done with its values. Keep the two usb_read8 calls however, as this patch is purely for warnings, not to change behaviour of the code. Reported-by: kernel test robot <[email protected]> Signed-off-by: Phillip Potter <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-06-16staging: rtl8188eu: use prefix decrement operator on trycnt variablePhillip Potter1-1/+1
Modify trycnt condition in the do/while loop of rtw_hal_set_hwreg to use a prefix decrement operator instead of postfix. As an unsigned 8-bit integer, this value would actually be 255 after the end of the do/while loop, which is almost certainly not what was intended. It is more reasonable to assume a loop counter should be zero at the end of all loop iterations. Indeed, the line following the loop previously contained an if statement which assumed trycnt was 0, and therefore was never triggered. Signed-off-by: Phillip Potter <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>