Second batch of W=1 fixes for IIO
Subsystems (11)
cover Second batch of W=1 fixes for IIO
This set is part of a larger effort attempting to clean-up W=1 kernel builds, which are currently overwhelmingly riddled with niggly little warnings.
Only a couple left after this. I'll sort those next week.
Lee Jones (30):
iio: adc: ti_am335x_adc: Remove a couple of unused 'read' variables
iio: adc: twl4030-madc: Remove set but unused variables 'len'
iio: adc: twl4030-madc: Fix misnamed struct attribute
iio: magnetometer: hmc5843: 'hmc5843_pm_ops' is unused in 1 of 3 files
including hmc5843_core.h
iio: adc: twl6030-gpadc: Fix some misdocumentation and formatting
issues
iio: dac: ltc2632: Fix formatting in kerneldoc struct header
iio: light: si1145: Demote obvious misuse of kerneldoc to standard
comment blocks
iio: resolver: ad2s1200: Change ordering of compiler attribute macro
iio: temperature: mlx90632: Function parameter descriptions must match
exactly
iio: light: us5182d: Fix formatting in kerneldoc function block
iio: adc: ad799x: Demote seemingly unintentional kerneldoc header
iio: dac: ad5504: Fix formatting errors and demote non-compliant
kerneldoc
iio: adc: at91_adc: Fix 'bad line' warning
iio: adc: at91-sama5d2_adc: Struct kerneldoc titles need to start with
'struct '
iio: adc: cpcap-adc: Demote seemingly unintentional kerneldoc header
iio: accel: sca3000: Fix 2 misspellings and demote nonconforming
kerneldocs
iio: gyro: adxrs450: Change ordering of compiler attribute macro
iio: gyro: fxas21002c: Move 'fxas21002c_reg_fields' to the only file
its used
iio: imu: st_lsm6dsx: st_lsm6dsx: Reorder 'inline' declaration
iio: adc: max1363: Fix kerneldoc attribute formatting for 'lock'
iio: adc: max9611: Demote obvious misuse of kerneldoc to standard
comment blocks
iio: adc: mcp320x: Change ordering of compiler attribute macro
iio: adc: palmas_gpadc: Demote non-conforming kerneldoc header
iio: imu: inv_mpu6050: inv_mpu_core: Demote obvious misuse of
kerneldoc to standard comment blocks
iio: imu: inv_mpu6050: inv_mpu_ring: Demote seemingly unintentional
kerneldoc header
iio: adc: qcom-pm8xxx-xoadc: Demote standard comment block and supply
missing description
iio: magnetometer: ak8974: Add description for ak8974's 'scan'
attribute
iio: imu: st_lsm6dsx: st_lsm6dsx_shub: Demote obvious misuse of
kerneldoc to standard comment blocks
iio: imu: st_lsm6dsx: st_lsm6dsx: Mark 'st_lsm6dsx_accel_ext_info' as
__maybe_unused
iio: adc: rockchip_saradc: Demote Demote seemingly unintentional
kerneldoc header
drivers/iio/accel/sca3000.c | 12 ++-- drivers/iio/adc/ad799x.c | 2 +- drivers/iio/adc/at91-sama5d2_adc.c | 4 +- drivers/iio/adc/at91_adc.c | 2 +- drivers/iio/adc/cpcap-adc.c | 6 +- drivers/iio/adc/max1363.c | 2 +- drivers/iio/adc/max9611.c | 4 +- drivers/iio/adc/mcp320x.c | 2 +- drivers/iio/adc/palmas_gpadc.c | 3 +- drivers/iio/adc/qcom-pm8xxx-xoadc.c | 3 +- drivers/iio/adc/rockchip_saradc.c | 2 +- drivers/iio/adc/ti_am335x_adc.c | 8 +-- drivers/iio/adc/twl4030-madc.c | 14 ++--- drivers/iio/adc/twl6030-gpadc.c | 4 +- drivers/iio/dac/ad5504.c | 7 +-- drivers/iio/dac/ltc2632.c | 6 +- drivers/iio/gyro/adxrs450.c | 2 +- drivers/iio/gyro/fxas21002c.h | 66 -------------------- drivers/iio/gyro/fxas21002c_core.c | 66 ++++++++++++++++++++ drivers/iio/imu/inv_mpu6050/inv_mpu_core.c | 14 ++--- drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c | 2 +- drivers/iio/imu/st_lsm6dsx/st_lsm6dsx.h | 5 +- drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_shub.c | 8 +-- drivers/iio/light/si1145.c | 6 +- drivers/iio/light/us5182d.c | 8 +-- drivers/iio/magnetometer/ak8974.c | 1 + drivers/iio/magnetometer/hmc5843.h | 6 +- drivers/iio/resolver/ad2s1200.c | 2 +- drivers/iio/temperature/mlx90632.c | 4 +- 29 files changed, 136 insertions(+), 135 deletions(-)
Signature · 1 line
2.25.1
PATCH 1/30 iio: adc: ti_am335x_adc: Remove a couple of unused 'read' variables
Fixes the following W=1 kernel build warning(s):
drivers/iio/adc/ti_am335x_adc.c: In function ‘tiadc_buffer_preenable’:
drivers/iio/adc/ti_am335x_adc.c:297:21: warning: variable ‘read’ set but not used [-Wunused-but-set-variable] 297 | int i, fifo1count, read;
| ^~~~
drivers/iio/adc/ti_am335x_adc.c: In function ‘tiadc_buffer_predisable’:
drivers/iio/adc/ti_am335x_adc.c:346:21: warning: variable ‘read’ set but not used [-Wunused-but-set-variable] 346 | int fifo1count, i, read;
| ^~~~
--- drivers/iio/adc/ti_am335x_adc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/iio/adc/ti_am335x_adc.c +4 -4
@@ -294,7 +294,7 @@ static int tiadc_start_dma(struct iio_dev *indio_dev)static int tiadc_buffer_preenable (struct iio_dev *indio_dev) {struct tiadc_device *adc_dev =iio_priv (indio_dev); -int i, fifo1count, read; +int i, fifo1count; tiadc_writel(adc_dev, REG_IRQCLR, (IRQENB_FIFO1THRES | IRQENB_FIFO1OVRRUN |
@@ -303,7 +303,7 @@ static int tiadc_buffer_preenable(struct iio_dev *indio_dev)/* Flush FIFO. Needed in corner cases in simultaneous tsc/adc use */ fifo1count =tiadc_readl (adc_dev,REG_FIFO1CNT );for (i =0 ; i < fifo1count; i++) - read =tiadc_readl (adc_dev,REG_FIFO1 ); +tiadc_readl (adc_dev,REG_FIFO1 );return 0 ; }
@@ -343,7 +343,7 @@ static int tiadc_buffer_predisable(struct iio_dev *indio_dev) {struct tiadc_device *adc_dev =iio_priv (indio_dev);struct tiadc_dma *dma = &adc_dev->dma; -int fifo1count, i, read; +int fifo1count, i;tiadc_writel (adc_dev,REG_IRQCLR , (IRQENB_FIFO1THRES |IRQENB_FIFO1OVRRUN |IRQENB_FIFO1UNDRFLW ));
@@ -358,7 +358,7 @@ static int tiadc_buffer_predisable(struct iio_dev *indio_dev)/* Flush FIFO of leftover data in the time it takes to disable adc */ fifo1count =tiadc_readl (adc_dev,REG_FIFO1CNT );for (i =0 ; i < fifo1count; i++) - read =tiadc_readl (adc_dev,REG_FIFO1 ); +tiadc_readl (adc_dev,REG_FIFO1 );return 0 ; }
Signature · 1 line
2.25.1
Jonathan Cameron
maintainerRe: [PATCH 01/30] iio: adc: ti_am335x_adc: Remove a couple of unused 'read' variables
Quoted 11 lines · On Fri, 17 Jul 2020 17:55:09 +0100 Lee Jones <[email protected]> wrote:
Fixes the following W=1 kernel build warning(s):
drivers/iio/adc/ti_am335x_adc.c: In function ‘tiadc_buffer_preenable’:
drivers/iio/adc/ti_am335x_adc.c:297:21: warning: variable ‘read’ set but not used [-Wunused-but-set-variable] 297 | int i, fifo1count, read;
| ^~~~
drivers/iio/adc/ti_am335x_adc.c: In function ‘tiadc_buffer_predisable’:
drivers/iio/adc/ti_am335x_adc.c:346:21: warning: variable ‘read’ set but not used [-Wunused-but-set-variable] 346 | int fifo1count, i, read;
| ^~~~
Quoted 2 lines
Cc Rachna Patil <[email protected]>Signed-off-by Lee Jones <[email protected]>
Applied to the togreg branch of iio.git which will get pushed out as testing for the autobuilders to poke at these changes.
Still time or anyone one else to comment. I'm picking these up as they are all noops and appear straight forward.
Thanks,
Jonathan
Quoted 44 lines
--- drivers/iio/adc/ti_am335x_adc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)drivers/iio/adc/ti_am335x_adc.c +4
-4@@ -294,7 +294,7 @@ static int tiadc_start_dma(struct iio_dev *indio_dev)static int tiadc_buffer_preenable (struct iio_dev *indio_dev) {struct tiadc_device *adc_dev =iio_priv (indio_dev); -int i, fifo1count, read; +int i, fifo1count; tiadc_writel(adc_dev, REG_IRQCLR, (IRQENB_FIFO1THRES | IRQENB_FIFO1OVRRUN |@@ -303,7 +303,7 @@ static int tiadc_buffer_preenable(struct iio_dev *indio_dev)/* Flush FIFO. Needed in corner cases in simultaneous tsc/adc use */ fifo1count =tiadc_readl (adc_dev,REG_FIFO1CNT );for (i =0 ; i < fifo1count; i++) - read =tiadc_readl (adc_dev,REG_FIFO1 ); +tiadc_readl (adc_dev,REG_FIFO1 );return 0 ; }@@ -343,7 +343,7 @@ static int tiadc_buffer_predisable(struct iio_dev *indio_dev) {struct tiadc_device *adc_dev =iio_priv (indio_dev);struct tiadc_dma *dma = &adc_dev->dma; -int fifo1count, i, read; +int fifo1count, i;tiadc_writel (adc_dev,REG_IRQCLR , (IRQENB_FIFO1THRES |IRQENB_FIFO1OVRRUN |IRQENB_FIFO1UNDRFLW ));@@ -358,7 +358,7 @@ static int tiadc_buffer_predisable(struct iio_dev *indio_dev)/* Flush FIFO of leftover data in the time it takes to disable adc */ fifo1count =tiadc_readl (adc_dev,REG_FIFO1CNT );for (i =0 ; i < fifo1count; i++) - read =tiadc_readl (adc_dev,REG_FIFO1 ); +tiadc_readl (adc_dev,REG_FIFO1 );return 0 ; }
PATCH 2/30 iio: adc: twl4030-madc: Remove set but unused variables 'len'
In reply to Lee JonesFixes the following W=1 kernel build warning(s):
drivers/iio/adc/twl4030-madc.c: In function ‘twl4030_madc_threaded_irq_handler’:
drivers/iio/adc/twl4030-madc.c:475:9: warning: variable ‘len’ set but not used [-Wunused-but-set-variable] 475 | int i, len, ret;
| ^~~
--- drivers/iio/adc/twl4030-madc.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/iio/adc/twl4030-madc.c +5 -5
@@ -472,7 +472,7 @@ static irqreturn_t twl4030_madc_threaded_irq_handler(int irq, void *_madc)struct twl4030_madc_data *madc = _madc;const struct twl4030_madc_conversion_method *method;u8 isr_val, imr_val; -int i, len, ret; +int i, ret;struct twl4030_madc_request *r;mutex_lock (&madc->lock);
@@ -504,8 +504,8 @@ static irqreturn_t twl4030_madc_threaded_irq_handler(int irq, void *_madc)continue ; method = &twl4030_conversion_methods[r->method];/* Read results */ - len =twl4030_madc_read_channels (madc, method->rbase, - r->channels, r->rbuf, r->raw); +twl4030_madc_read_channels (madc, method->rbase, + r->channels, r->rbuf, r->raw);/* Free request */ r->result_pending = false; r->active = false;
@@ -525,8 +525,8 @@ static irqreturn_t twl4030_madc_threaded_irq_handler(int irq, void *_madc)continue ; method = &twl4030_conversion_methods[r->method];/* Read results */ - len =twl4030_madc_read_channels (madc, method->rbase, - r->channels, r->rbuf, r->raw); +twl4030_madc_read_channels (madc, method->rbase, + r->channels, r->rbuf, r->raw);/* Free request */ r->result_pending = false; r->active = false;
Signature · 1 line
2.25.1
Jonathan Cameron
maintainerRe: [PATCH 02/30] iio: adc: twl4030-madc: Remove set but unused variables 'len'
Quoted 7 lines · On Fri, 17 Jul 2020 17:55:10 +0100 Lee Jones <[email protected]> wrote:
Fixes the following W=1 kernel build warning(s):
drivers/iio/adc/twl4030-madc.c: In function ‘twl4030_madc_threaded_irq_handler’:
drivers/iio/adc/twl4030-madc.c:475:9: warning: variable ‘len’ set but not used [-Wunused-but-set-variable] 475 | int i, len, ret;
| ^~~
Quoted 5 lines
Cc Sebastian Reichel <[email protected]>Cc J Keerthy <[email protected]>Cc Mikko Ylinen <[email protected]>Cc Amit Kucheria <[email protected]>Signed-off-by Lee Jones <[email protected]>
Applied to the togreg branch of iio.git and pushed out as testing or the autobuilders to play with them.
Thanks,
Jonathan
Quoted 39 lines
--- drivers/iio/adc/twl4030-madc.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)drivers/iio/adc/twl4030-madc.c +5
-5@@ -472,7 +472,7 @@ static irqreturn_t twl4030_madc_threaded_irq_handler(int irq, void *_madc)struct twl4030_madc_data *madc = _madc;const struct twl4030_madc_conversion_method *method;u8 isr_val, imr_val; -int i, len, ret; +int i, ret;struct twl4030_madc_request *r;mutex_lock (&madc->lock);@@ -504,8 +504,8 @@ static irqreturn_t twl4030_madc_threaded_irq_handler(int irq, void *_madc)continue ; method = &twl4030_conversion_methods[r->method];/* Read results */ - len =twl4030_madc_read_channels (madc, method->rbase, - r->channels, r->rbuf, r->raw); +twl4030_madc_read_channels (madc, method->rbase, + r->channels, r->rbuf, r->raw);/* Free request */ r->result_pending = false; r->active = false;@@ -525,8 +525,8 @@ static irqreturn_t twl4030_madc_threaded_irq_handler(int irq, void *_madc)continue ; method = &twl4030_conversion_methods[r->method];/* Read results */ - len =twl4030_madc_read_channels (madc, method->rbase, - r->channels, r->rbuf, r->raw); +twl4030_madc_read_channels (madc, method->rbase, + r->channels, r->rbuf, r->raw);/* Free request */ r->result_pending = false; r->active = false;
PATCH 3/30 iio: adc: twl4030-madc: Fix misnamed struct attribute
In reply to Lee JonesFixes the following W=1 kernel build warning(s):
drivers/iio/adc/twl4030-madc.c:170: warning: Function parameter or member 'usb3v1' not described in 'twl4030_madc_data'
--- drivers/iio/adc/twl4030-madc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/iio/adc/twl4030-madc.c +2 -2
@@ -153,7 +153,7 @@ enum sample_type {* struct twl4030_madc_data - a container for madc info * @dev: Pointer to device structure for madc * @lock: Mutex protecting this data structure -* @regulator: Pointer to bias regulator for madc +* @usb3v1: Pointer to bias regulator for madc * @requests: Array of request struct corresponding to SW1, SW2 and RT * @use_second_irq: IRQ selection (main or co-processor) * @imr: Interrupt mask register of MADC
@@ -161,7 +161,7 @@ enum sample_type {*/ struct twl4030_madc_data {struct device *dev; -struct mutex lock;/* mutex protecting this data structure */ +struct mutex lock;struct regulator *usb3v1;struct twl4030_madc_request requests[TWL4030_MADC_NUM_METHODS ];bool use_second_irq;
Signature · 1 line
2.25.1
Jonathan Cameron
maintainerRe: [PATCH 03/30] iio: adc: twl4030-madc: Fix misnamed struct attribute
Quoted 8 lines · On Fri, 17 Jul 2020 17:55:11 +0100 Lee Jones <[email protected]> wrote:
Fixes the following W=1 kernel build warning(s):
drivers/iio/adc/twl4030-madc.c:170: warning: Function parameter or member 'usb3v1' not described in 'twl4030_madc_data'Cc J Keerthy <[email protected]>Cc Mikko Ylinen <[email protected]>Cc Amit Kucheria <[email protected]>Signed-off-by Lee Jones <[email protected]>
Applied with a note that this also cleans up the duplicate docs for lock.
Thanks,
Jonathan
Quoted 26 lines
--- drivers/iio/adc/twl4030-madc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/iio/adc/twl4030-madc.c +2
-2@@ -153,7 +153,7 @@ enum sample_type {* struct twl4030_madc_data - a container for madc info * @dev: Pointer to device structure for madc * @lock: Mutex protecting this data structure -* @regulator: Pointer to bias regulator for madc +* @usb3v1: Pointer to bias regulator for madc * @requests: Array of request struct corresponding to SW1, SW2 and RT * @use_second_irq: IRQ selection (main or co-processor) * @imr: Interrupt mask register of MADC @@ -161,7 +161,7 @@ enum sample_type {*/ struct twl4030_madc_data {struct device *dev; -struct mutex lock;/* mutex protecting this data structure */ +struct mutex lock;struct regulator *usb3v1;struct twl4030_madc_request requests[TWL4030_MADC_NUM_METHODS ];bool use_second_irq;
PATCH 4/30 iio: magnetometer: hmc5843: 'hmc5843_pm_ops' is unused in 1 of 3 files including hmc5843_core.h
In reply to Lee JonesWe know that it's okay for 'hmc5843_pm_ops' to be unused here.
Fixes the following W=1 kernel build warning(s):
In file included from include/linux/device.h:25,
from include/linux/iio/iio.h:10,
from drivers/iio/magnetometer/hmc5843_core.c:16:
drivers/iio/magnetometer/hmc5843.h:55:26: warning: ‘hmc5843_pm_ops’ defined but not used [-Wunused-const-variable=] 55 | static SIMPLE_DEV_PM_OPS(hmc5843_pm_ops,
| ^~~~~~~~~~~~~~
include/linux/pm.h:354:25: note: in definition of macro ‘SIMPLE_DEV_PM_OPS’
354 | const struct dev_pm_ops name = { | ^~~~
--- drivers/iio/magnetometer/hmc5843.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/iio/magnetometer/hmc5843.h +3 -3
@@ -52,9 +52,9 @@ int hmc5843_common_suspend(struct device *dev);int hmc5843_common_resume (struct device *dev);#ifdef CONFIG_PM_SLEEP -static SIMPLE_DEV_PM_OPS(hmc5843_pm_ops, - hmc5843_common_suspend, - hmc5843_common_resume); +static __maybe_unused SIMPLE_DEV_PM_OPS(hmc5843_pm_ops, + hmc5843_common_suspend, + hmc5843_common_resume);#define HMC5843_PM_OPS (&hmc5843_pm_ops)#else #define HMC5843_PM_OPS NULL
Signature · 1 line
2.25.1
Jonathan Cameron
maintainerRe: [PATCH 04/30] iio: magnetometer: hmc5843: 'hmc5843_pm_ops' is unused in 1 of 3 files including hmc5843_core.h
Quoted 13 lines · On Fri, 17 Jul 2020 17:55:12 +0100 Lee Jones <[email protected]> wrote:
We know that it's okay for '
hmc5843_pm_ops' to be unused here.Fixes the following W=1 kernel build warning(s):
In file included from
include/linux/device.h:25,
frominclude/linux/iio/iio.h:10,
fromdrivers/iio/magnetometer/hmc5843_core.c:16:
drivers/iio/magnetometer/hmc5843.h:55:26: warning: ‘hmc5843_pm_ops’ defined but not used [-Wunused-const-variable=] 55 | static SIMPLE_DEV_PM_OPS(hmc5843_pm_ops,
| ^~~~~~~~~~~~~~
include/linux/pm.h:354:25: note: in definition of macro ‘SIMPLE_DEV_PM_OPS’
354 | const structdev_pm_opsname = { | ^~~~
Quoted 2 lines
Cc Josef Gajdusek <[email protected]>Signed-off-by Lee Jones <[email protected]>
Seems like a sensible solution to me.
Applied to the togreg branch of iio.git an pushed out as testing to see if we missed anything.
Thanks,
Jonathan
Quoted 21 lines
--- drivers/iio/magnetometer/hmc5843.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)drivers/iio/magnetometer/hmc5843.h +3
-3@@ -52,9 +52,9 @@ int hmc5843_common_suspend(struct device *dev);int hmc5843_common_resume (struct device *dev);#ifdef CONFIG_PM_SLEEP -static SIMPLE_DEV_PM_OPS(hmc5843_pm_ops, - hmc5843_common_suspend, - hmc5843_common_resume); +static __maybe_unused SIMPLE_DEV_PM_OPS(hmc5843_pm_ops, + hmc5843_common_suspend, + hmc5843_common_resume);#define HMC5843_PM_OPS (&hmc5843_pm_ops)#else #define HMC5843_PM_OPS NULL
PATCH 5/30 iio: adc: twl6030-gpadc: Fix some misdocumentation and formatting issues
In reply to Lee JonesKerneldoc expects attributes/parameters to be in '@*.: ' format.
Fixes the following W=1 kernel build warning(s):
drivers/iio/adc/twl6030-gpadc.c:110: warning: Function parameter or member 'ideal' not described in 'twl6030_gpadc_platform_data' drivers/iio/adc/twl6030-gpadc.c:110: warning: Function parameter or member 'channel_to_reg' not described in 'twl6030_gpadc_platform_data'
--- drivers/iio/adc/twl6030-gpadc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/iio/adc/twl6030-gpadc.c +2 -2
@@ -94,9 +94,9 @@ struct twl6030_gpadc_data;* struct twl6030_gpadc_platform_data - platform specific data * @nchannels: number of GPADC channels * @iio_channels: iio channels -* @twl6030_ideal: pointer to calibration parameters +* @ideal: pointer to calibration parameters * @start_conversion: pointer to ADC start conversion function -* @channel_to_reg pointer to ADC function to convert channel to +* @channel_to_reg: pointer to ADC function to convert channel to * register address for reading conversion result * @calibrate: pointer to calibration function */
Signature · 1 line
2.25.1
Re: [PATCH 05/30] iio: adc: twl6030-gpadc: Fix some misdocumentation and formatting issues
Quoted 7 lines · On Fri, 17 Jul 2020 17:55:13 +0100 Lee Jones <[email protected]> wrote:
Kerneldoc expects attributes/parameters to be in '@*.: ' format.
Fixes the following W=1 kernel build warning(s):
drivers/iio/adc/twl6030-gpadc.c:110: warning: Function parameter or member 'ideal' not described in 'twl6030_gpadc_platform_data'drivers/iio/adc/twl6030-gpadc.c:110: warning: Function parameter or member 'channel_to_reg' not described in 'twl6030_gpadc_platform_data'
Quoted 9 lines
Cc Stephen Boyd <[email protected]>Cc Nishant Kamat <[email protected]>Cc Balaji T K <[email protected]>Cc Graeme Gregory <[email protected]>Cc Girish S Ghongdemath <[email protected]>Cc Ambresh K <[email protected]>Cc Oleksandr Kozaruk <[email protected]>Cc Mikko Ylinen <[email protected]>Signed-off-by Lee Jones <[email protected]>
Applied.
Thanks,
Jonathan
Quoted 20 lines
--- drivers/iio/adc/twl6030-gpadc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/iio/adc/twl6030-gpadc.c +2
-2@@ -94,9 +94,9 @@ struct twl6030_gpadc_data;* struct twl6030_gpadc_platform_data - platform specific data * @nchannels: number of GPADC channels * @iio_channels: iio channels -* @twl6030_ideal: pointer to calibration parameters +* @ideal: pointer to calibration parameters * @start_conversion: pointer to ADC start conversion function -* @channel_to_reg pointer to ADC function to convert channel to +* @channel_to_reg: pointer to ADC function to convert channel to * register address for reading conversion result * @calibrate: pointer to calibration function */
PATCH 6/30 iio: dac: ltc2632: Fix formatting in kerneldoc struct header
In reply to Lee JonesKerneldoc expects attributes/parameters to be in '@*.: ' format.
Fixes the following W=1 kernel build warning(s):
drivers/iio/dac/ltc2632.c:50: warning: Function parameter or member 'powerdown_cache_mask' not described in 'ltc2632_state' drivers/iio/dac/ltc2632.c:50: warning: Function parameter or member 'vref_mv' not described in 'ltc2632_state' drivers/iio/dac/ltc2632.c:50: warning: Function parameter or member 'vref_reg' not described in 'ltc2632_state'
--- drivers/iio/dac/ltc2632.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/iio/dac/ltc2632.c +3 -3
@@ -38,9 +38,9 @@ struct ltc2632_chip_info {/** * struct ltc2632_state - driver instance specific data * @spi_dev: pointer to the spi_device struct -* @powerdown_cache_mask used to show current channel powerdown state -* @vref_mv used reference voltage (internal or external) -* @vref_reg regulator for the reference voltage +* @powerdown_cache_mask: used to show current channel powerdown state +* @vref_mv: used reference voltage (internal or external) +* @vref_reg: regulator for the reference voltage */ struct ltc2632_state {struct spi_device *spi_dev;
Signature · 1 line
2.25.1
Re: [PATCH 06/30] iio: dac: ltc2632: Fix formatting in kerneldoc struct header
Quoted 8 lines · On Fri, 17 Jul 2020 17:55:14 +0100 Lee Jones <[email protected]> wrote:
Kerneldoc expects attributes/parameters to be in '@*.: ' format.
Fixes the following W=1 kernel build warning(s):
drivers/iio/dac/ltc2632.c:50: warning: Function parameter or member 'powerdown_cache_mask' not described in 'ltc2632_state'drivers/iio/dac/ltc2632.c:50: warning: Function parameter or member 'vref_mv' not described in 'ltc2632_state'drivers/iio/dac/ltc2632.c:50: warning: Function parameter or member 'vref_reg' not described in 'ltc2632_state'
Quoted 6 lines
Cc Liam Girdwood <[email protected]>Cc Mark Brown <[email protected]>Cc "Uwe Kleine-König" <[email protected]>Cc Silvan Murer <[email protected]>Cc Maxime Roussin-Belanger <[email protected]>Signed-off-by Lee Jones <[email protected]>
Applied.
Thanks,
Jonathan
Quoted 21 lines
--- drivers/iio/dac/ltc2632.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)drivers/iio/dac/ltc2632.c +3
-3@@ -38,9 +38,9 @@ struct ltc2632_chip_info {/** * struct ltc2632_state - driver instance specific data * @spi_dev: pointer to the spi_device struct -* @powerdown_cache_mask used to show current channel powerdown state -* @vref_mv used reference voltage (internal or external) -* @vref_reg regulator for the reference voltage +* @powerdown_cache_mask: used to show current channel powerdown state +* @vref_mv: used reference voltage (internal or external) +* @vref_reg: regulator for the reference voltage */ struct ltc2632_state {struct spi_device *spi_dev;
PATCH 7/30 iio: light: si1145: Demote obvious misuse of kerneldoc to standard comment blocks
In reply to Lee JonesNo attempt has been made to document any of the demoted functions here
Fixes the following W=1 kernel build warning(s):
drivers/iio/light/si1145.c:192: warning: Function parameter or member 'data' not described in '__si1145_command_reset' drivers/iio/light/si1145.c:228: warning: Function parameter or member 'data' not described in 'si1145_command' drivers/iio/light/si1145.c:228: warning: Function parameter or member 'cmd' not described in 'si1145_command' drivers/iio/light/si1145.c:1186: warning: Function parameter or member 'trig' not described in 'si1145_trigger_set_state' drivers/iio/light/si1145.c:1186: warning: Function parameter or member 'state' not described in 'si1145_trigger_set_state'
--- drivers/iio/light/si1145.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/iio/light/si1145.c +3 -3
@@ -181,7 +181,7 @@ struct si1145_data {int meas_rate; }; -/** +/* * __si1145_command_reset() - Send CMD_NOP and wait for response 0 * * Does not modify data->rsp_seq
@@ -215,7 +215,7 @@ static int __si1145_command_reset(struct si1145_data *data) } } -/** +/* * si1145_command() - Execute a command and poll the response register * * All conversion overflows are reported as -EOVERFLOW
@@ -1176,7 +1176,7 @@ static const struct iio_buffer_setup_ops si1145_buffer_setup_ops = { .validate_scan_mask = si1145_validate_scan_mask, }; -/** +/* * si1145_trigger_set_state() - Set trigger state * * When not using triggers interrupts are disabled and measurement rate is
Signature · 1 line
2.25.1
Re: [PATCH 07/30] iio: light: si1145: Demote obvious misuse of kerneldoc to standard comment blocks
Quoted 10 lines · On Fri, 17 Jul 2020 17:55:15 +0100 Lee Jones <[email protected]> wrote:
No attempt has been made to document any of the demoted functions here
Fixes the following W=1 kernel build warning(s):
drivers/iio/light/si1145.c:192: warning: Function parameter or member 'data' not described in '__si1145_command_reset'drivers/iio/light/si1145.c:228: warning: Function parameter or member 'data' not described in 'si1145_command'drivers/iio/light/si1145.c:228: warning: Function parameter or member 'cmd' not described in 'si1145_command'drivers/iio/light/si1145.c:1186: warning: Function parameter or member 'trig' not described in 'si1145_trigger_set_state'drivers/iio/light/si1145.c:1186: warning: Function parameter or member 'state' not described in 'si1145_trigger_set_state'
Quoted 3 lines
Cc Chuhong Yuan <[email protected]>Cc Dan Leonard <[email protected]>Signed-off-by Lee Jones <[email protected]>
Applied.
Thanks,
J
Quoted 35 lines
--- drivers/iio/light/si1145.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)drivers/iio/light/si1145.c +3
-3@@ -181,7 +181,7 @@ struct si1145_data {int meas_rate; }; -/** +/* * __si1145_command_reset() - Send CMD_NOP and wait for response 0 * * Does not modify data->rsp_seq @@ -215,7 +215,7 @@ static int __si1145_command_reset(struct si1145_data *data) } } -/** +/* * si1145_command() - Execute a command and poll the response register * * All conversion overflows are reported as -EOVERFLOW @@ -1176,7 +1176,7 @@ static const struct iio_buffer_setup_ops si1145_buffer_setup_ops = { .validate_scan_mask = si1145_validate_scan_mask, }; -/** +/* * si1145_trigger_set_state() - Set trigger state * * When not using triggers interrupts are disabled and measurement rate is
PATCH 8/30 iio: resolver: ad2s1200: Change ordering of compiler attribute macro
In reply to Lee JonesKerneldoc gets confused if the variable does not follow the type/attribute definitions.
Fixes the following W=1 kernel build warning(s):
drivers/iio/resolver/ad2s1200.c:44: warning: Function parameter or member '____cacheline_aligned' not described in 'ad2s1200_state'
--- drivers/iio/resolver/ad2s1200.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/resolver/ad2s1200.c +1 -1
@@ -40,7 +40,7 @@ struct ad2s1200_state {struct spi_device *sdev;struct gpio_desc *sample;struct gpio_desc *rdvel; -__be16 rx____cacheline_aligned ; +__be16 ____cacheline_aligned rx; }; static int ad2s1200_read_raw(struct iio_dev *indio_dev,
Signature · 1 line
2.25.1
Jonathan Cameron
maintainerRe: [PATCH 08/30] iio: resolver: ad2s1200: Change ordering of compiler attribute macro
Quoted 11 lines · On Fri, 17 Jul 2020 17:55:16 +0100 Lee Jones <[email protected]> wrote:
Kerneldoc gets confused if the variable does not follow the type/attribute definitions.
Fixes the following W=1 kernel build warning(s):
drivers/iio/resolver/ad2s1200.c:44: warning: Function parameter or member '____cacheline_aligned' not described in 'ad2s1200_state'Cc Michael Hennerich <[email protected]>Cc David Veenstra <[email protected]>Cc Graff Yang <[email protected]>Signed-off-by Lee Jones <[email protected]>
Holding this for now whilst we discuss whether to just fix it in the kernel-doc script.
J
Quoted 17 lines
--- drivers/iio/resolver/ad2s1200.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/iio/resolver/ad2s1200.c +1
-1@@ -40,7 +40,7 @@ struct ad2s1200_state {struct spi_device *sdev;struct gpio_desc *sample;struct gpio_desc *rdvel; -__be16 rx____cacheline_aligned ; +__be16 ____cacheline_aligned rx; }; static int ad2s1200_read_raw(struct iio_dev *indio_dev,
PATCH 9/30 iio: temperature: mlx90632: Function parameter descriptions must match exactly
In reply to Lee Jones'*'s are not welcome in kerneldoc parameter names.
Fixes the following W=1 kernel build warning(s):
drivers/iio/temperature/mlx90632.c:175: warning: Function parameter or member 'data' not described in 'mlx90632_perform_measurement'
--- drivers/iio/temperature/mlx90632.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/iio/temperature/mlx90632.c +2 -2
@@ -164,8 +164,8 @@ static s32 mlx90632_pwr_continuous(struct regmap *regmap) }/** -* mlx90632_perform_measurement - Trigger and retrieve current measurement cycle -* @*data: pointer to mlx90632_data object containing regmap information +* mlx90632_perform_measurement() - Trigger and retrieve current measurement cycle +* @data: pointer to mlx90632_data object containing regmap information * * Perform a measurement and return latest measurement cycle position reported * by sensor. This is a blocking function for 500ms, as that is default sensor
Signature · 1 line
2.25.1
Re: [PATCH 09/30] iio: temperature: mlx90632: Function parameter descriptions must match exactly
Quoted 31 lines · Lee Jones
'*'s are not welcome in kerneldoc parameter names.
Fixes the following W=1 kernel build warning(s):
drivers/iio/temperature/mlx90632.c:175: warning: Function parameter or member 'data' not described in 'mlx90632_perform_measurement'Cc Crt Mori <[email protected]>Signed-off-by Lee Jones <[email protected]>--- drivers/iio/temperature/mlx90632.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/iio/temperature/mlx90632.c +2
-3@@ -164,8 +164,8 @@ static s32 mlx90632_pwr_continuous(struct regmap *regmap) }/** -* mlx90632_perform_measurement - Trigger and retrieve current measurement cycle -* @*data: pointer to mlx90632_data object containing regmap information +* mlx90632_perform_measurement() - Trigger and retrieve current measurement cycle +* @data: pointer to mlx90632_data object containing regmap information * * Perform a measurement and return latest measurement cycle position reported * by sensor. This is a blocking function for 500ms, as that is default sensor -- 2.25.1
Re: [PATCH 09/30] iio: temperature: mlx90632: Function parameter descriptions must match exactly
Quoted 12 lines · On Fri, 17 Jul 2020 21:48:06 +0200 Crt Mori <[email protected]> wrote:
Acked-by Crt Mori <[email protected]>Quoted 9 lines · Lee Jones
'*'s are not welcome in kerneldoc parameter names.
Fixes the following W=1 kernel build warning(s):
drivers/iio/temperature/mlx90632.c:175: warning: Function parameter or member 'data' not described in 'mlx90632_perform_measurement'Cc Crt Mori <[email protected]>Signed-off-by Lee Jones <[email protected]>
I got lazy on bothering about the addition of optional brackets.
Applied,
Thanks,
Jonathan
Quoted 22 lines
Quoted 22 lines
--- drivers/iio/temperature/mlx90632.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/iio/temperature/mlx90632.c +2
-3@@ -164,8 +164,8 @@ static s32 mlx90632_pwr_continuous(struct regmap *regmap) }/** -* mlx90632_perform_measurement - Trigger and retrieve current measurement cycle -* @*data: pointer to mlx90632_data object containing regmap information +* mlx90632_perform_measurement() - Trigger and retrieve current measurement cycle +* @data: pointer to mlx90632_data object containing regmap information * * Perform a measurement and return latest measurement cycle position reported * by sensor. This is a blocking function for 500ms, as that is default sensor -- 2.25.1
PATCH 10/30 iio: light: us5182d: Fix formatting in kerneldoc function block
In reply to Lee JonesKerneldoc expects attributes/parameters to be in '@*.: ' format.
Fixes the following W=1 kernel build warning(s):
drivers/iio/light/us5182d.c:457: warning: Function parameter or member 'data' not described in 'us5182d_update_dark_th' drivers/iio/light/us5182d.c:457: warning: Function parameter or member 'index' not described in 'us5182d_update_dark_th' drivers/iio/light/us5182d.c:479: warning: Function parameter or member 'data' not described in 'us5182d_apply_scale' drivers/iio/light/us5182d.c:479: warning: Function parameter or member 'index' not described in 'us5182d_apply_scale'
--- drivers/iio/light/us5182d.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/iio/light/us5182d.c +4 -4
@@ -446,8 +446,8 @@ static int us5182d_read_raw(struct iio_dev *indio_dev,/** * us5182d_update_dark_th - update Darh_Th registers -* @data us5182d_data structure -* @index index in us5182d_dark_ths array to use for the updated value +* @data: us5182d_data structure +* @index: index in us5182d_dark_ths array to use for the updated value * * Function needs to be called with a lock held because it needs two i2c write * byte operations as these registers (0x27 0x28) don't work in word mode
@@ -469,8 +469,8 @@ static int us5182d_update_dark_th(struct us5182d_data *data, int index)/** * us5182d_apply_scale - update the ALS scale -* @data us5182d_data structure -* @index index in us5182d_scales array to use for the updated value +* @data: us5182d_data structure +* @index: index in us5182d_scales array to use for the updated value * * Function needs to be called with a lock held as we're having more than one * i2c operation.
Signature · 1 line
2.25.1
Re: [PATCH 10/30] iio: light: us5182d: Fix formatting in kerneldoc function block
Quoted 11 lines · On Fri, 17 Jul 2020 17:55:18 +0100 Lee Jones <[email protected]> wrote:
Kerneldoc expects attributes/parameters to be in '@*.: ' format.
Fixes the following W=1 kernel build warning(s):
drivers/iio/light/us5182d.c:457: warning: Function parameter or member 'data' not described in 'us5182d_update_dark_th'drivers/iio/light/us5182d.c:457: warning: Function parameter or member 'index' not described in 'us5182d_update_dark_th'drivers/iio/light/us5182d.c:479: warning: Function parameter or member 'data' not described in 'us5182d_apply_scale'drivers/iio/light/us5182d.c:479: warning: Function parameter or member 'index' not described in 'us5182d_apply_scale'Cc Adriana Reus <[email protected]>Signed-off-by Lee Jones <[email protected]>
Applied.
Thanks,
Jonathan
Quoted 30 lines
--- drivers/iio/light/us5182d.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)drivers/iio/light/us5182d.c +4
-4@@ -446,8 +446,8 @@ static int us5182d_read_raw(struct iio_dev *indio_dev,/** * us5182d_update_dark_th - update Darh_Th registers -* @data us5182d_data structure -* @index index in us5182d_dark_ths array to use for the updated value +* @data: us5182d_data structure +* @index: index in us5182d_dark_ths array to use for the updated value * * Function needs to be called with a lock held because it needs two i2c write * byte operations as these registers (0x27 0x28) don't work in word mode @@ -469,8 +469,8 @@ static int us5182d_update_dark_th(struct us5182d_data *data, int index)/** * us5182d_apply_scale - update the ALS scale -* @data us5182d_data structure -* @index index in us5182d_scales array to use for the updated value +* @data: us5182d_data structure +* @index: index in us5182d_scales array to use for the updated value * * Function needs to be called with a lock held as we're having more than one * i2c operation.
PATCH 11/30 iio: adc: ad799x: Demote seemingly unintentional kerneldoc header
In reply to Lee JonesThis is the only use of function related kerneldoc in the sourcefile and no descriptions are provided.
Fixes the following W=1 kernel build warning(s):
drivers/iio/adc/ad799x.c:192: warning: Function parameter or member 'irq' not described in 'ad799x_trigger_handler' drivers/iio/adc/ad799x.c:192: warning: Function parameter or member 'p' not described in 'ad799x_trigger_handler'
--- drivers/iio/adc/ad799x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/adc/ad799x.c +1 -1
@@ -182,7 +182,7 @@ static int ad799x_update_config(struct ad799x_state *st, u16 config)return 0 ; } -/** +/* * ad799x_trigger_handler() bh of trigger launched polling to ring buffer * * Currently there is no option in this driver to disable the saving of
Signature · 1 line
2.25.1
Re: [PATCH 11/30] iio: adc: ad799x: Demote seemingly unintentional kerneldoc header
Quoted 10 lines · On Fri, 17 Jul 2020 17:55:19 +0100 Lee Jones <[email protected]> wrote:
This is the only use of function related kerneldoc in the sourcefile and no descriptions are provided.
Fixes the following W=1 kernel build warning(s):
drivers/iio/adc/ad799x.c:192: warning: Function parameter or member 'irq' not described in 'ad799x_trigger_handler'drivers/iio/adc/ad799x.c:192: warning: Function parameter or member 'p' not described in 'ad799x_trigger_handler'Cc Michael Hennerich <[email protected]>Signed-off-by Lee Jones <[email protected]>
Applied.
Thanks,
Jonathan
Quoted 17 lines
--- drivers/iio/adc/ad799x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/iio/adc/ad799x.c +1
-1@@ -182,7 +182,7 @@ static int ad799x_update_config(struct ad799x_state *st, u16 config)return 0 ; } -/** +/* * ad799x_trigger_handler() bh of trigger launched polling to ring buffer * * Currently there is no option in this driver to disable the saving of
PATCH 12/30 iio: dac: ad5504: Fix formatting errors and demote non-compliant kerneldoc
In reply to Lee JonesKerneldoc expects attributes/parameters to be in '@*.: ' format.
Fixes the following W=1 kernel build warning(s):
drivers/iio/dac/ad5504.c:58: warning: Function parameter or member 'pwr_down_mask' not described in 'ad5504_state' drivers/iio/dac/ad5504.c:58: warning: Function parameter or member 'pwr_down_mode' not described in 'ad5504_state' drivers/iio/dac/ad5504.c:64: warning: cannot understand function prototype: 'enum ad5504_supported_device_ids '
--- drivers/iio/dac/ad5504.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
drivers/iio/dac/ad5504.c +3 -4
@@ -43,8 +43,8 @@* @spi: spi_device * @reg: supply regulator * @vref_mv: actual reference voltage used -* @pwr_down_mask power down mask -* @pwr_down_mode current power down mode +* @pwr_down_mask: power down mask +* @pwr_down_mode: current power down mode * @data: transfer buffer */ struct ad5504_state {
@@ -57,10 +57,9 @@ struct ad5504_state {__be16 data[2 ]____cacheline_aligned ; }; -/** +/* * ad5504_supported_device_ids: */ -enum ad5504_supported_device_ids {ID_AD5504 ,ID_AD5501 ,
Signature · 1 line
2.25.1
Re: [PATCH 12/30] iio: dac: ad5504: Fix formatting errors and demote non-compliant kerneldoc
Quoted 10 lines · On Fri, 17 Jul 2020 17:55:20 +0100 Lee Jones <[email protected]> wrote:
Kerneldoc expects attributes/parameters to be in '@*.: ' format.
Fixes the following W=1 kernel build warning(s):
drivers/iio/dac/ad5504.c:58: warning: Function parameter or member 'pwr_down_mask' not described in 'ad5504_state'drivers/iio/dac/ad5504.c:58: warning: Function parameter or member 'pwr_down_mode' not described in 'ad5504_state'drivers/iio/dac/ad5504.c:64: warning: cannot understand function prototype: 'enumad5504_supported_device_ids'Cc Michael Hennerich <[email protected]>Signed-off-by Lee Jones <[email protected]>
Applied.
Thanks,
Jonathan
Quoted 31 lines
--- drivers/iio/dac/ad5504.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)drivers/iio/dac/ad5504.c +3
-4@@ -43,8 +43,8 @@* @spi: spi_device * @reg: supply regulator * @vref_mv: actual reference voltage used -* @pwr_down_mask power down mask -* @pwr_down_mode current power down mode +* @pwr_down_mask: power down mask +* @pwr_down_mode: current power down mode * @data: transfer buffer */ struct ad5504_state {@@ -57,10 +57,9 @@ struct ad5504_state {__be16 data[2 ]____cacheline_aligned ; }; -/** +/* * ad5504_supported_device_ids: */ -enum ad5504_supported_device_ids {ID_AD5504 ,ID_AD5501 ,
PATCH 13/30 iio: adc: at91_adc: Fix 'bad line' warning
In reply to Lee JonesAll lines should start with ' *'.
Fixes the following W=1 kernel build warning(s):
drivers/iio/adc/at91_adc.c:160: warning: bad line: (Interruptions registers mostly)
--- drivers/iio/adc/at91_adc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/adc/at91_adc.c +1 -1
@@ -157,7 +157,7 @@* struct at91_adc_reg_desc - Various informations relative to registers * @channel_base: Base offset for the channel data registers * @drdy_mask: Mask of the DRDY field in the relevant registers -(Interruptions registers mostly) +* (Interruptions registers mostly) * @status_register: Offset of the Interrupt Status Register * @trigger_register: Offset of the Trigger setup register * @mr_prescal_mask: Mask of the PRESCAL field in the adc MR register
Signature · 1 line
2.25.1
Re: [PATCH 13/30] iio: adc: at91_adc: Fix 'bad line' warning
Quoted 11 lines · On Fri, 17 Jul 2020 17:55:21 +0100 Lee Jones <[email protected]> wrote:
All lines should start with ' *'.
Fixes the following W=1 kernel build warning(s):
drivers/iio/adc/at91_adc.c:160: warning: bad line: (Interruptions registers mostly)Cc Nicolas Ferre <[email protected]>Cc Alexandre Belloni <[email protected]>Cc Ludovic Desroches <[email protected]>Cc Maxime Ripard <[email protected]>Signed-off-by Lee Jones <[email protected]>
Applied
Quoted 17 lines
--- drivers/iio/adc/at91_adc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/iio/adc/at91_adc.c +1
-1@@ -157,7 +157,7 @@* struct at91_adc_reg_desc - Various informations relative to registers * @channel_base: Base offset for the channel data registers * @drdy_mask: Mask of the DRDY field in the relevant registers -(Interruptions registers mostly) +* (Interruptions registers mostly) * @status_register: Offset of the Interrupt Status Register * @trigger_register: Offset of the Trigger setup register * @mr_prescal_mask: Mask of the PRESCAL field in the adc MR register
PATCH 14/30 iio: adc: at91-sama5d2_adc: Struct kerneldoc titles need to start with 'struct '
In reply to Lee JonesFixes the following W=1 kernel build warning(s):
drivers/iio/adc/at91-sama5d2_adc.c:360: warning: cannot understand function prototype: 'struct at91_adc_dma ' drivers/iio/adc/at91-sama5d2_adc.c:379: warning: cannot understand function prototype: 'struct at91_adc_touch '
--- drivers/iio/adc/at91-sama5d2_adc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/iio/adc/at91-sama5d2_adc.c +2 -2
@@ -347,7 +347,7 @@ struct at91_adc_trigger { };/** -* at91_adc_dma - at91-sama5d2 dma information struct +* struct at91_adc_dma - at91-sama5d2 dma information struct * @dma_chan: the dma channel acquired * @rx_buf: dma coherent allocated area * @rx_dma_buf: dma handler for the buffer
@@ -369,7 +369,7 @@ struct at91_adc_dma { };/** -* at91_adc_touch - at91-sama5d2 touchscreen information struct +* struct at91_adc_touch - at91-sama5d2 touchscreen information struct * @sample_period_val: the value for periodic trigger interval * @touching: is the pen touching the screen or not * @x_pos: temporary placeholder for pressure computation
Signature · 1 line
2.25.1
Re: [PATCH 14/30] iio: adc: at91-sama5d2_adc: Struct kerneldoc titles need to start with 'struct '
Quoted 10 lines · On Fri, 17 Jul 2020 17:55:22 +0100 Lee Jones <[email protected]> wrote:
Fixes the following W=1 kernel build warning(s):
drivers/iio/adc/at91-sama5d2_adc.c:360: warning: cannot understand function prototype: 'structat91_adc_dma'drivers/iio/adc/at91-sama5d2_adc.c:379: warning: cannot understand function prototype: 'structat91_adc_touch'Cc Ludovic Desroches <[email protected]>Cc Eugen Hristev <[email protected]>Cc Nicolas Ferre <[email protected]>Cc Alexandre Belloni <[email protected]>Signed-off-by Lee Jones <[email protected]>
Applied.
Thanks,
Jonathan
Quoted 26 lines
--- drivers/iio/adc/at91-sama5d2_adc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/iio/adc/at91-sama5d2_adc.c +2
-2@@ -347,7 +347,7 @@ struct at91_adc_trigger { };/** -* at91_adc_dma - at91-sama5d2 dma information struct +* struct at91_adc_dma - at91-sama5d2 dma information struct * @dma_chan: the dma channel acquired * @rx_buf: dma coherent allocated area * @rx_dma_buf: dma handler for the buffer @@ -369,7 +369,7 @@ struct at91_adc_dma { };/** -* at91_adc_touch - at91-sama5d2 touchscreen information struct +* struct at91_adc_touch - at91-sama5d2 touchscreen information struct * @sample_period_val: the value for periodic trigger interval * @touching: is the pen touching the screen or not * @x_pos: temporary placeholder for pressure computation
PATCH 15/30 iio: adc: cpcap-adc: Demote seemingly unintentional kerneldoc header
In reply to Lee JonesNone of the headers demoted here provide any descriptions.
Fixes the following W=1 kernel build warning(s):
drivers/iio/adc/cpcap-adc.c:100: warning: Function parameter or member 'ato_in' not described in 'cpcap_adc_ato' drivers/iio/adc/cpcap-adc.c:100: warning: Function parameter or member 'atox_in' not described in 'cpcap_adc_ato' drivers/iio/adc/cpcap-adc.c:100: warning: Function parameter or member 'adc_ps_factor_in' not described in 'cpcap_adc_ato' drivers/iio/adc/cpcap-adc.c:100: warning: Function parameter or member 'atox_ps_factor_in' not described in 'cpcap_adc_ato' drivers/iio/adc/cpcap-adc.c:100: warning: Function parameter or member 'ato_out' not described in 'cpcap_adc_ato' drivers/iio/adc/cpcap-adc.c:100: warning: Function parameter or member 'atox_out' not described in 'cpcap_adc_ato' drivers/iio/adc/cpcap-adc.c:100: warning: Function parameter or member 'adc_ps_factor_out' not described in 'cpcap_adc_ato' drivers/iio/adc/cpcap-adc.c:100: warning: Function parameter or member 'atox_ps_factor_out' not described in 'cpcap_adc_ato' drivers/iio/adc/cpcap-adc.c:153: warning: Enum value 'CPCAP_ADC_AD0' not described in enum 'cpcap_adc_channel' drivers/iio/adc/cpcap-adc.c:153: warning: Enum value 'CPCAP_ADC_BATTP' not described in enum 'cpcap_adc_channel' drivers/iio/adc/cpcap-adc.c:153: warning: Enum value 'CPCAP_ADC_VBUS' not described in enum 'cpcap_adc_channel' drivers/iio/adc/cpcap-adc.c:153: warning: Enum value 'CPCAP_ADC_AD3' not described in enum 'cpcap_adc_channel' drivers/iio/adc/cpcap-adc.c:153: warning: Enum value 'CPCAP_ADC_BPLUS_AD4' not described in enum 'cpcap_adc_channel' drivers/iio/adc/cpcap-adc.c:153: warning: Enum value 'CPCAP_ADC_CHG_ISENSE' not described in enum 'cpcap_adc_channel' drivers/iio/adc/cpcap-adc.c:153: warning: Enum value 'CPCAP_ADC_BATTI' not described in enum 'cpcap_adc_channel' drivers/iio/adc/cpcap-adc.c:153: warning: Enum value 'CPCAP_ADC_USB_ID' not described in enum 'cpcap_adc_channel' drivers/iio/adc/cpcap-adc.c:153: warning: Enum value 'CPCAP_ADC_AD8' not described in enum 'cpcap_adc_channel' drivers/iio/adc/cpcap-adc.c:153: warning: Enum value 'CPCAP_ADC_AD9' not described in enum 'cpcap_adc_channel' drivers/iio/adc/cpcap-adc.c:153: warning: Enum value 'CPCAP_ADC_LICELL' not described in enum 'cpcap_adc_channel' drivers/iio/adc/cpcap-adc.c:153: warning: Enum value 'CPCAP_ADC_HV_BATTP' not described in enum 'cpcap_adc_channel' drivers/iio/adc/cpcap-adc.c:153: warning: Enum value 'CPCAP_ADC_TSX1_AD12' not described in enum 'cpcap_adc_channel' drivers/iio/adc/cpcap-adc.c:153: warning: Enum value 'CPCAP_ADC_TSX2_AD13' not described in enum 'cpcap_adc_channel' drivers/iio/adc/cpcap-adc.c:153: warning: Enum value 'CPCAP_ADC_TSY1_AD14' not described in enum 'cpcap_adc_channel' drivers/iio/adc/cpcap-adc.c:153: warning: Enum value 'CPCAP_ADC_TSY2_AD15' not described in enum 'cpcap_adc_channel' drivers/iio/adc/cpcap-adc.c:153: warning: Enum value 'CPCAP_ADC_BATTP_PI16' not described in enum 'cpcap_adc_channel' drivers/iio/adc/cpcap-adc.c:153: warning: Enum value 'CPCAP_ADC_BATTI_PI17' not described in enum 'cpcap_adc_channel' drivers/iio/adc/cpcap-adc.c:153: warning: Enum value 'CPCAP_ADC_CHANNEL_NUM' not described in enum 'cpcap_adc_channel' drivers/iio/adc/cpcap-adc.c:165: warning: Enum value 'CPCAP_ADC_TIMING_IMM' not described in enum 'cpcap_adc_timing' drivers/iio/adc/cpcap-adc.c:165: warning: Enum value 'CPCAP_ADC_TIMING_IN' not described in enum 'cpcap_adc_timing' drivers/iio/adc/cpcap-adc.c:165: warning: Enum value 'CPCAP_ADC_TIMING_OUT' not described in enum 'cpcap_adc_timing'
--- drivers/iio/adc/cpcap-adc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/iio/adc/cpcap-adc.c +3 -3
@@ -82,7 +82,7 @@#define CPCAP_ADC_MAX_RETRIES 5/* Calibration */ -/** +/* * struct cpcap_adc_ato - timing settings for cpcap adc * * Unfortunately no cpcap documentation available, please document when
@@ -121,7 +121,7 @@ struct cpcap_adc {bool done; }; -/** +/* * enum cpcap_adc_channel - cpcap adc channels */ enum cpcap_adc_channel {
@@ -152,7 +152,7 @@ enum cpcap_adc_channel { CPCAP_ADC_CHANNEL_NUM, }; -/** +/* * enum cpcap_adc_timing - cpcap adc timing options * * CPCAP_ADC_TIMING_IMM seems to be immediate with no timings.
Signature · 1 line
2.25.1
Re: [PATCH 15/30] iio: adc: cpcap-adc: Demote seemingly unintentional kerneldoc header
Quoted 35 lines · On Fri, 17 Jul 2020 17:55:23 +0100 Lee Jones <[email protected]> wrote:
None of the headers demoted here provide any descriptions.
Fixes the following W=1 kernel build warning(s):
drivers/iio/adc/cpcap-adc.c:100: warning: Function parameter or member 'ato_in' not described in 'cpcap_adc_ato'drivers/iio/adc/cpcap-adc.c:100: warning: Function parameter or member 'atox_in' not described in 'cpcap_adc_ato'drivers/iio/adc/cpcap-adc.c:100: warning: Function parameter or member 'adc_ps_factor_in' not described in 'cpcap_adc_ato'drivers/iio/adc/cpcap-adc.c:100: warning: Function parameter or member 'atox_ps_factor_in' not described in 'cpcap_adc_ato'drivers/iio/adc/cpcap-adc.c:100: warning: Function parameter or member 'ato_out' not described in 'cpcap_adc_ato'drivers/iio/adc/cpcap-adc.c:100: warning: Function parameter or member 'atox_out' not described in 'cpcap_adc_ato'drivers/iio/adc/cpcap-adc.c:100: warning: Function parameter or member 'adc_ps_factor_out' not described in 'cpcap_adc_ato'drivers/iio/adc/cpcap-adc.c:100: warning: Function parameter or member 'atox_ps_factor_out' not described in 'cpcap_adc_ato'drivers/iio/adc/cpcap-adc.c:153: warning: Enum value 'CPCAP_ADC_AD0' not described in enum 'cpcap_adc_channel'drivers/iio/adc/cpcap-adc.c:153: warning: Enum value 'CPCAP_ADC_BATTP' not described in enum 'cpcap_adc_channel'drivers/iio/adc/cpcap-adc.c:153: warning: Enum value 'CPCAP_ADC_VBUS' not described in enum 'cpcap_adc_channel'drivers/iio/adc/cpcap-adc.c:153: warning: Enum value 'CPCAP_ADC_AD3' not described in enum 'cpcap_adc_channel'drivers/iio/adc/cpcap-adc.c:153: warning: Enum value 'CPCAP_ADC_BPLUS_AD4' not described in enum 'cpcap_adc_channel'drivers/iio/adc/cpcap-adc.c:153: warning: Enum value 'CPCAP_ADC_CHG_ISENSE' not described in enum 'cpcap_adc_channel'drivers/iio/adc/cpcap-adc.c:153: warning: Enum value 'CPCAP_ADC_BATTI' not described in enum 'cpcap_adc_channel'drivers/iio/adc/cpcap-adc.c:153: warning: Enum value 'CPCAP_ADC_USB_ID' not described in enum 'cpcap_adc_channel'drivers/iio/adc/cpcap-adc.c:153: warning: Enum value 'CPCAP_ADC_AD8' not described in enum 'cpcap_adc_channel'drivers/iio/adc/cpcap-adc.c:153: warning: Enum value 'CPCAP_ADC_AD9' not described in enum 'cpcap_adc_channel'drivers/iio/adc/cpcap-adc.c:153: warning: Enum value 'CPCAP_ADC_LICELL' not described in enum 'cpcap_adc_channel'drivers/iio/adc/cpcap-adc.c:153: warning: Enum value 'CPCAP_ADC_HV_BATTP' not described in enum 'cpcap_adc_channel'drivers/iio/adc/cpcap-adc.c:153: warning: Enum value 'CPCAP_ADC_TSX1_AD12' not described in enum 'cpcap_adc_channel'drivers/iio/adc/cpcap-adc.c:153: warning: Enum value 'CPCAP_ADC_TSX2_AD13' not described in enum 'cpcap_adc_channel'drivers/iio/adc/cpcap-adc.c:153: warning: Enum value 'CPCAP_ADC_TSY1_AD14' not described in enum 'cpcap_adc_channel'drivers/iio/adc/cpcap-adc.c:153: warning: Enum value 'CPCAP_ADC_TSY2_AD15' not described in enum 'cpcap_adc_channel'drivers/iio/adc/cpcap-adc.c:153: warning: Enum value 'CPCAP_ADC_BATTP_PI16' not described in enum 'cpcap_adc_channel'drivers/iio/adc/cpcap-adc.c:153: warning: Enum value 'CPCAP_ADC_BATTI_PI17' not described in enum 'cpcap_adc_channel'drivers/iio/adc/cpcap-adc.c:153: warning: Enum value 'CPCAP_ADC_CHANNEL_NUM' not described in enum 'cpcap_adc_channel'drivers/iio/adc/cpcap-adc.c:165: warning: Enum value 'CPCAP_ADC_TIMING_IMM' not described in enum 'cpcap_adc_timing'drivers/iio/adc/cpcap-adc.c:165: warning: Enum value 'CPCAP_ADC_TIMING_IN' not described in enum 'cpcap_adc_timing'drivers/iio/adc/cpcap-adc.c:165: warning: Enum value 'CPCAP_ADC_TIMING_OUT' not described in enum 'cpcap_adc_timing'
Quoted 2 lines
Cc Tony Lindgren <[email protected]>Signed-off-by Lee Jones <[email protected]>
Applied.
Thanks,
Jonathan
Quoted 35 lines
--- drivers/iio/adc/cpcap-adc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)drivers/iio/adc/cpcap-adc.c +3
-3@@ -82,7 +82,7 @@#define CPCAP_ADC_MAX_RETRIES 5/* Calibration */ -/** +/* * struct cpcap_adc_ato - timing settings for cpcap adc * * Unfortunately no cpcap documentation available, please document when @@ -121,7 +121,7 @@ struct cpcap_adc {bool done; }; -/** +/* * enum cpcap_adc_channel - cpcap adc channels */ enum cpcap_adc_channel {@@ -152,7 +152,7 @@ enum cpcap_adc_channel { CPCAP_ADC_CHANNEL_NUM, }; -/** +/* * enum cpcap_adc_timing - cpcap adc timing options * * CPCAP_ADC_TIMING_IMM seems to be immediate with no timings.
PATCH 16/30 iio: accel: sca3000: Fix 2 misspellings and demote nonconforming kerneldocs
In reply to Lee JonesFixes the following W=1 kernel build warning(s):
drivers/iio/accel/sca3000.c:210: warning: Function parameter or member 'mot_det_mult_xz' not described in 'sca3000_chip_info' drivers/iio/accel/sca3000.c:210: warning: Function parameter or member 'mot_det_mult_y' not described in 'sca3000_chip_info' drivers/iio/accel/sca3000.c:871: warning: Function parameter or member 'indio_dev' not described in 'sca3000_read_event_value' drivers/iio/accel/sca3000.c:871: warning: Function parameter or member 'chan' not described in 'sca3000_read_event_value' drivers/iio/accel/sca3000.c:871: warning: Function parameter or member 'type' not described in 'sca3000_read_event_value' drivers/iio/accel/sca3000.c:871: warning: Function parameter or member 'dir' not described in 'sca3000_read_event_value' drivers/iio/accel/sca3000.c:871: warning: Function parameter or member 'info' not described in 'sca3000_read_event_value' drivers/iio/accel/sca3000.c:871: warning: Function parameter or member 'val' not described in 'sca3000_read_event_value' drivers/iio/accel/sca3000.c:871: warning: Function parameter or member 'val2' not described in 'sca3000_read_event_value' drivers/iio/accel/sca3000.c:1110: warning: Function parameter or member 'indio_dev' not described in 'sca3000_read_event_config' drivers/iio/accel/sca3000.c:1110: warning: Function parameter or member 'chan' not described in 'sca3000_read_event_config' drivers/iio/accel/sca3000.c:1110: warning: Function parameter or member 'type' not described in 'sca3000_read_event_config' drivers/iio/accel/sca3000.c:1110: warning: Function parameter or member 'dir' not described in 'sca3000_read_event_config'
--- drivers/iio/accel/sca3000.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/iio/accel/sca3000.c +6 -6
@@ -186,9 +186,9 @@ struct sca3000_state {* @option_mode_2_freq: option mode 2 sampling frequency * @option_mode_2_3db_freq: 3db cutoff frequency of the low pass filter for * the second option mode. -* @mod_det_mult_xz: Bit wise multipliers to calculate the threshold +* @mot_det_mult_xz: Bit wise multipliers to calculate the threshold * for motion detection in the x and z axis. -* @mod_det_mult_y: Bit wise multipliers to calculate the threshold +* @mot_det_mult_y: Bit wise multipliers to calculate the threshold * for motion detection in the y axis. * * This structure is used to hold information about the functionality of a given
@@ -859,9 +859,9 @@ static ssize_t sca3000_read_av_freq(struct device *dev,*/ static IIO_DEV_ATTR_SAMP_FREQ_AVAIL (sca3000_read_av_freq); -/** +/* * sca3000_read_event_value() - query of a threshold or period -**/ +*/ static int sca3000_read_event_value(struct iio_dev *indio_dev, const struct iio_chan_spec *chan, enum iio_event_type type,
@@ -1100,9 +1100,9 @@ static irqreturn_t sca3000_event_handler(int irq, void *private)return IRQ_HANDLED ; } -/** +/* * sca3000_read_event_config() what events are enabled -**/ +*/ static int sca3000_read_event_config(struct iio_dev *indio_dev, const struct iio_chan_spec *chan, enum iio_event_type type,
Signature · 1 line
2.25.1
Re: [PATCH 16/30] iio: accel: sca3000: Fix 2 misspellings and demote nonconforming kerneldocs
Quoted 16 lines · On Fri, 17 Jul 2020 17:55:24 +0100 Lee Jones <[email protected]> wrote:
Fixes the following W=1 kernel build warning(s):
drivers/iio/accel/sca3000.c:210: warning: Function parameter or member 'mot_det_mult_xz' not described in 'sca3000_chip_info'drivers/iio/accel/sca3000.c:210: warning: Function parameter or member 'mot_det_mult_y' not described in 'sca3000_chip_info'drivers/iio/accel/sca3000.c:871: warning: Function parameter or member 'indio_dev' not described in 'sca3000_read_event_value'drivers/iio/accel/sca3000.c:871: warning: Function parameter or member 'chan' not described in 'sca3000_read_event_value'drivers/iio/accel/sca3000.c:871: warning: Function parameter or member 'type' not described in 'sca3000_read_event_value'drivers/iio/accel/sca3000.c:871: warning: Function parameter or member 'dir' not described in 'sca3000_read_event_value'drivers/iio/accel/sca3000.c:871: warning: Function parameter or member 'info' not described in 'sca3000_read_event_value'drivers/iio/accel/sca3000.c:871: warning: Function parameter or member 'val' not described in 'sca3000_read_event_value'drivers/iio/accel/sca3000.c:871: warning: Function parameter or member 'val2' not described in 'sca3000_read_event_value'drivers/iio/accel/sca3000.c:1110: warning: Function parameter or member 'indio_dev' not described in 'sca3000_read_event_config'drivers/iio/accel/sca3000.c:1110: warning: Function parameter or member 'chan' not described in 'sca3000_read_event_config'drivers/iio/accel/sca3000.c:1110: warning: Function parameter or member 'type' not described in 'sca3000_read_event_config'drivers/iio/accel/sca3000.c:1110: warning: Function parameter or member 'dir' not described in 'sca3000_read_event_config'
Quoted 2 lines
Cc Christophe JAILLET <[email protected]>Signed-off-by Lee Jones <[email protected]>
Applied.
Thanks,
Jonathan
Quoted 44 lines
--- drivers/iio/accel/sca3000.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)drivers/iio/accel/sca3000.c +6
-6@@ -186,9 +186,9 @@ struct sca3000_state {* @option_mode_2_freq: option mode 2 sampling frequency * @option_mode_2_3db_freq: 3db cutoff frequency of the low pass filter for * the second option mode. -* @mod_det_mult_xz: Bit wise multipliers to calculate the threshold +* @mot_det_mult_xz: Bit wise multipliers to calculate the threshold * for motion detection in the x and z axis. -* @mod_det_mult_y: Bit wise multipliers to calculate the threshold +* @mot_det_mult_y: Bit wise multipliers to calculate the threshold * for motion detection in the y axis. * * This structure is used to hold information about the functionality of a given @@ -859,9 +859,9 @@ static ssize_t sca3000_read_av_freq(struct device *dev,*/ static IIO_DEV_ATTR_SAMP_FREQ_AVAIL (sca3000_read_av_freq); -/** +/* * sca3000_read_event_value() - query of a threshold or period -**/ +*/ static int sca3000_read_event_value(struct iio_dev *indio_dev, const struct iio_chan_spec *chan, enum iio_event_type type,@@ -1100,9 +1100,9 @@ static irqreturn_t sca3000_event_handler(int irq, void *private)return IRQ_HANDLED ; } -/** +/* * sca3000_read_event_config() what events are enabled -**/ +*/ static int sca3000_read_event_config(struct iio_dev *indio_dev, const struct iio_chan_spec *chan, enum iio_event_type type,
PATCH 17/30 iio: gyro: adxrs450: Change ordering of compiler attribute macro
In reply to Lee JonesKerneldoc gets confused if the variable does not follow the type/attribute definitions.
Fixes the following W=1 kernel build warning(s):
drivers/iio/gyro/adxrs450.c:79: warning: Function parameter or member '____cacheline_aligned' not described in 'adxrs450_state'
--- drivers/iio/gyro/adxrs450.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/gyro/adxrs450.c +1 -1
@@ -73,7 +73,7 @@ enum {struct adxrs450_state {struct spi_device *us;struct mutex buf_lock; -__be32 tx____cacheline_aligned ; +__be32 ____cacheline_aligned tx;__be32 rx; };
Signature · 1 line
2.25.1
Jonathan Cameron
maintainerRe: [PATCH 17/30] iio: gyro: adxrs450: Change ordering of compiler attribute macro
Quoted 9 lines · On Fri, 17 Jul 2020 17:55:25 +0100 Lee Jones <[email protected]> wrote:
Kerneldoc gets confused if the variable does not follow the type/attribute definitions.
Fixes the following W=1 kernel build warning(s):
drivers/iio/gyro/adxrs450.c:79: warning: Function parameter or member '____cacheline_aligned' not described in 'adxrs450_state'Cc Michael Hennerich <[email protected]>Signed-off-by Lee Jones <[email protected]>
Holding this one for the conversation about whether we should be fixing the code or the tool.
Thanks,
Jonathan
Quoted 17 lines
--- drivers/iio/gyro/adxrs450.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/iio/gyro/adxrs450.c +1
-1@@ -73,7 +73,7 @@ enum {struct adxrs450_state {struct spi_device *us;struct mutex buf_lock; -__be32 tx____cacheline_aligned ; +__be32 ____cacheline_aligned tx;__be32 rx; };
PATCH 18/30 iio: gyro: fxas21002c: Move 'fxas21002c_reg_fields' to the only file its used
In reply to Lee Jones'fxas21002c_reg_fields' is only used in '*core*', meaning that '*i2c*' and '*spi*' complain of a defined but not used const variable. Let's move it into the source file.
Fixes the following W=1 kernel build warning(s):
In file included from drivers/iio/gyro/fxas21002c_i2c.c:14:
drivers/iio/gyro/fxas21002c.h:79:31: warning: ‘fxas21002c_reg_fields’ defined but not used [-Wunused-const-variable=] 79 | static const struct reg_field fxas21002c_reg_fields[] = {
| ^~~~~~~~~~~~~~~~~~~~~
In file included from drivers/iio/gyro/fxas21002c_spi.c:14:
drivers/iio/gyro/fxas21002c.h:79:31: warning: ‘fxas21002c_reg_fields’ defined but not used [-Wunused-const-variable=] 79 | static const struct reg_field fxas21002c_reg_fields[] = {
| ^~~~~~~~~~~~~~~~~~~~~
--- drivers/iio/gyro/fxas21002c.h | 66 ------------------------------ drivers/iio/gyro/fxas21002c_core.c | 66 ++++++++++++++++++++++++++++++ 2 files changed, 66 insertions(+), 66 deletions(-)
drivers/iio/gyro/fxas21002c.h +0 -66
@@ -76,72 +76,6 @@ enum fxas21002c_fields { F_MAX_FIELDS, }; -static const struct reg_field fxas21002c_reg_fields[] = { - [F_DR_STATUS ] =REG_FIELD (FXAS21002C_REG_STATUS ,0 ,7 ), - [F_OUT_X_MSB ] =REG_FIELD (FXAS21002C_REG_OUT_X_MSB ,0 ,7 ), - [F_OUT_X_LSB ] =REG_FIELD (FXAS21002C_REG_OUT_X_LSB ,0 ,7 ), - [F_OUT_Y_MSB ] =REG_FIELD (FXAS21002C_REG_OUT_Y_MSB ,0 ,7 ), - [F_OUT_Y_LSB ] =REG_FIELD (FXAS21002C_REG_OUT_Y_LSB ,0 ,7 ), - [F_OUT_Z_MSB ] =REG_FIELD (FXAS21002C_REG_OUT_Z_MSB ,0 ,7 ), - [F_OUT_Z_LSB ] =REG_FIELD (FXAS21002C_REG_OUT_Z_LSB ,0 ,7 ), - [F_ZYX_OW ] =REG_FIELD (FXAS21002C_REG_DR_STATUS ,7 ,7 ), - [F_Z_OW ] =REG_FIELD (FXAS21002C_REG_DR_STATUS ,6 ,6 ), - [F_Y_OW ] =REG_FIELD (FXAS21002C_REG_DR_STATUS ,5 ,5 ), - [F_X_OW ] =REG_FIELD (FXAS21002C_REG_DR_STATUS ,4 ,4 ), - [F_ZYX_DR ] =REG_FIELD (FXAS21002C_REG_DR_STATUS ,3 ,3 ), - [F_Z_DR ] =REG_FIELD (FXAS21002C_REG_DR_STATUS ,2 ,2 ), - [F_Y_DR ] =REG_FIELD (FXAS21002C_REG_DR_STATUS ,1 ,1 ), - [F_X_DR ] =REG_FIELD (FXAS21002C_REG_DR_STATUS ,0 ,0 ), - [F_OVF ] =REG_FIELD (FXAS21002C_REG_F_STATUS ,7 ,7 ), - [F_WMKF ] =REG_FIELD (FXAS21002C_REG_F_STATUS ,6 ,6 ), - [F_CNT ] =REG_FIELD (FXAS21002C_REG_F_STATUS ,0 ,5 ), - [F_MODE ] =REG_FIELD (FXAS21002C_REG_F_SETUP ,6 ,7 ), - [F_WMRK ] =REG_FIELD (FXAS21002C_REG_F_SETUP ,0 ,5 ), - [F_EVENT ] =REG_FIELD (FXAS21002C_REG_F_EVENT ,5 ,5 ), - [FE_TIME ] =REG_FIELD (FXAS21002C_REG_F_EVENT ,0 ,4 ), - [F_BOOTEND ] =REG_FIELD (FXAS21002C_REG_INT_SRC_FLAG ,3 ,3 ), - [F_SRC_FIFO ] =REG_FIELD (FXAS21002C_REG_INT_SRC_FLAG ,2 ,2 ), - [F_SRC_RT ] =REG_FIELD (FXAS21002C_REG_INT_SRC_FLAG ,1 ,1 ), - [F_SRC_DRDY ] =REG_FIELD (FXAS21002C_REG_INT_SRC_FLAG ,0 ,0 ), - [F_WHO_AM_I ] =REG_FIELD (FXAS21002C_REG_WHO_AM_I ,0 ,7 ), - [F_BW ] =REG_FIELD (FXAS21002C_REG_CTRL0 ,6 ,7 ), - [F_SPIW ] =REG_FIELD (FXAS21002C_REG_CTRL0 ,5 ,5 ), - [F_SEL ] =REG_FIELD (FXAS21002C_REG_CTRL0 ,3 ,4 ), - [F_HPF_EN ] =REG_FIELD (FXAS21002C_REG_CTRL0 ,2 ,2 ), - [F_FS ] =REG_FIELD (FXAS21002C_REG_CTRL0 ,0 ,1 ), - [F_ELE ] =REG_FIELD (FXAS21002C_REG_RT_CFG ,3 ,3 ), - [F_ZTEFE ] =REG_FIELD (FXAS21002C_REG_RT_CFG ,2 ,2 ), - [F_YTEFE ] =REG_FIELD (FXAS21002C_REG_RT_CFG ,1 ,1 ), - [F_XTEFE ] =REG_FIELD (FXAS21002C_REG_RT_CFG ,0 ,0 ), - [F_EA ] =REG_FIELD (FXAS21002C_REG_RT_SRC ,6 ,6 ), - [F_ZRT ] =REG_FIELD (FXAS21002C_REG_RT_SRC ,5 ,5 ), - [F_ZRT_POL ] =REG_FIELD (FXAS21002C_REG_RT_SRC ,4 ,4 ), - [F_YRT ] =REG_FIELD (FXAS21002C_REG_RT_SRC ,3 ,3 ), - [F_YRT_POL ] =REG_FIELD (FXAS21002C_REG_RT_SRC ,2 ,2 ), - [F_XRT ] =REG_FIELD (FXAS21002C_REG_RT_SRC ,1 ,1 ), - [F_XRT_POL ] =REG_FIELD (FXAS21002C_REG_RT_SRC ,0 ,0 ), - [F_DBCNTM ] =REG_FIELD (FXAS21002C_REG_RT_THS ,7 ,7 ), - [F_THS ] =REG_FIELD (FXAS21002C_REG_RT_SRC ,0 ,6 ), - [F_RT_COUNT ] =REG_FIELD (FXAS21002C_REG_RT_COUNT ,0 ,7 ), - [F_TEMP ] =REG_FIELD (FXAS21002C_REG_TEMP ,0 ,7 ), - [F_RST ] =REG_FIELD (FXAS21002C_REG_CTRL1 ,6 ,6 ), - [F_ST ] =REG_FIELD (FXAS21002C_REG_CTRL1 ,5 ,5 ), - [F_DR ] =REG_FIELD (FXAS21002C_REG_CTRL1 ,2 ,4 ), - [F_ACTIVE ] =REG_FIELD (FXAS21002C_REG_CTRL1 ,1 ,1 ), - [F_READY ] =REG_FIELD (FXAS21002C_REG_CTRL1 ,0 ,0 ), - [F_INT_CFG_FIFO ] =REG_FIELD (FXAS21002C_REG_CTRL2 ,7 ,7 ), - [F_INT_EN_FIFO ] =REG_FIELD (FXAS21002C_REG_CTRL2 ,6 ,6 ), - [F_INT_CFG_RT ] =REG_FIELD (FXAS21002C_REG_CTRL2 ,5 ,5 ), - [F_INT_EN_RT ] =REG_FIELD (FXAS21002C_REG_CTRL2 ,4 ,4 ), - [F_INT_CFG_DRDY ] =REG_FIELD (FXAS21002C_REG_CTRL2 ,3 ,3 ), - [F_INT_EN_DRDY ] =REG_FIELD (FXAS21002C_REG_CTRL2 ,2 ,2 ), - [F_IPOL ] =REG_FIELD (FXAS21002C_REG_CTRL2 ,1 ,1 ), - [F_PP_OD ] =REG_FIELD (FXAS21002C_REG_CTRL2 ,0 ,0 ), - [F_WRAPTOONE ] =REG_FIELD (FXAS21002C_REG_CTRL3 ,3 ,3 ), - [F_EXTCTRLEN ] =REG_FIELD (FXAS21002C_REG_CTRL3 ,2 ,2 ), - [F_FS_DOUBLE ] =REG_FIELD (FXAS21002C_REG_CTRL3 ,0 ,0 ), -}; -extern const struct dev_pm_ops fxas21002c_pm_ops; int fxas21002c_core_probe(struct device *dev, struct regmap *regmap, int irq,
drivers/iio/gyro/fxas21002c_core.c +66 -0
72 lines not on this page · raw message
Signature · 1 line
2.25.1
Re: [PATCH 18/30] iio: gyro: fxas21002c: Move 'fxas21002c_reg_fields' to the only file its used
Quoted 15 lines · On Fri, 17 Jul 2020 17:55:26 +0100 Lee Jones <[email protected]> wrote:
'
fxas21002c_reg_fields' is only used in '*core*', meaning that '*i2c*' and '*spi*' complain of a defined but not used const variable. Let's move it into the source file.Fixes the following W=1 kernel build warning(s):
In file included from
drivers/iio/gyro/fxas21002c_i2c.c:14:
drivers/iio/gyro/fxas21002c.h:79:31: warning: ‘fxas21002c_reg_fields’ defined but not used [-Wunused-const-variable=] 79 | static const structreg_fieldfxas21002c_reg_fields[] = {
| ^~~~~~~~~~~~~~~~~~~~~
In file included fromdrivers/iio/gyro/fxas21002c_spi.c:14:
drivers/iio/gyro/fxas21002c.h:79:31: warning: ‘fxas21002c_reg_fields’ defined but not used [-Wunused-const-variable=] 79 | static const structreg_fieldfxas21002c_reg_fields[] = {
| ^~~~~~~~~~~~~~~~~~~~~
Quoted 2 lines
Cc Rui Miguel Silva <[email protected]>Signed-off-by Lee Jones <[email protected]>
Sensible solution.
Applied
Thanks,
Jonathan
Quoted 159 lines
--- drivers/iio/gyro/fxas21002c.h | 66 ------------------------------ drivers/iio/gyro/fxas21002c_core.c | 66 ++++++++++++++++++++++++++++++ 2 files changed, 66 insertions(+), 66 deletions(-)drivers/iio/gyro/fxas21002c.h +0
-66@@ -76,72 +76,6 @@ enum fxas21002c_fields { F_MAX_FIELDS, }; -static const struct reg_field fxas21002c_reg_fields[] = { - [F_DR_STATUS ] =REG_FIELD (FXAS21002C_REG_STATUS ,0 ,7 ), - [F_OUT_X_MSB ] =REG_FIELD (FXAS21002C_REG_OUT_X_MSB ,0 ,7 ), - [F_OUT_X_LSB ] =REG_FIELD (FXAS21002C_REG_OUT_X_LSB ,0 ,7 ), - [F_OUT_Y_MSB ] =REG_FIELD (FXAS21002C_REG_OUT_Y_MSB ,0 ,7 ), - [F_OUT_Y_LSB ] =REG_FIELD (FXAS21002C_REG_OUT_Y_LSB ,0 ,7 ), - [F_OUT_Z_MSB ] =REG_FIELD (FXAS21002C_REG_OUT_Z_MSB ,0 ,7 ), - [F_OUT_Z_LSB ] =REG_FIELD (FXAS21002C_REG_OUT_Z_LSB ,0 ,7 ), - [F_ZYX_OW ] =REG_FIELD (FXAS21002C_REG_DR_STATUS ,7 ,7 ), - [F_Z_OW ] =REG_FIELD (FXAS21002C_REG_DR_STATUS ,6 ,6 ), - [F_Y_OW ] =REG_FIELD (FXAS21002C_REG_DR_STATUS ,5 ,5 ), - [F_X_OW ] =REG_FIELD (FXAS21002C_REG_DR_STATUS ,4 ,4 ), - [F_ZYX_DR ] =REG_FIELD (FXAS21002C_REG_DR_STATUS ,3 ,3 ), - [F_Z_DR ] =REG_FIELD (FXAS21002C_REG_DR_STATUS ,2 ,2 ), - [F_Y_DR ] =REG_FIELD (FXAS21002C_REG_DR_STATUS ,1 ,1 ), - [F_X_DR ] =REG_FIELD (FXAS21002C_REG_DR_STATUS ,0 ,0 ), - [F_OVF ] =REG_FIELD (FXAS21002C_REG_F_STATUS ,7 ,7 ), - [F_WMKF ] =REG_FIELD (FXAS21002C_REG_F_STATUS ,6 ,6 ), - [F_CNT ] =REG_FIELD (FXAS21002C_REG_F_STATUS ,0 ,5 ), - [F_MODE ] =REG_FIELD (FXAS21002C_REG_F_SETUP ,6 ,7 ), - [F_WMRK ] =REG_FIELD (FXAS21002C_REG_F_SETUP ,0 ,5 ), - [F_EVENT ] =REG_FIELD (FXAS21002C_REG_F_EVENT ,5 ,5 ), - [FE_TIME ] =REG_FIELD (FXAS21002C_REG_F_EVENT ,0 ,4 ), - [F_BOOTEND ] =REG_FIELD (FXAS21002C_REG_INT_SRC_FLAG ,3 ,3 ), - [F_SRC_FIFO ] =REG_FIELD (FXAS21002C_REG_INT_SRC_FLAG ,2 ,2 ), - [F_SRC_RT ] =REG_FIELD (FXAS21002C_REG_INT_SRC_FLAG ,1 ,1 ), - [F_SRC_DRDY ] =REG_FIELD (FXAS21002C_REG_INT_SRC_FLAG ,0 ,0 ), - [F_WHO_AM_I ] =REG_FIELD (FXAS21002C_REG_WHO_AM_I ,0 ,7 ), - [F_BW ] =REG_FIELD (FXAS21002C_REG_CTRL0 ,6 ,7 ), - [F_SPIW ] =REG_FIELD (FXAS21002C_REG_CTRL0 ,5 ,5 ), - [F_SEL ] =REG_FIELD (FXAS21002C_REG_CTRL0 ,3 ,4 ), - [F_HPF_EN ] =REG_FIELD (FXAS21002C_REG_CTRL0 ,2 ,2 ), - [F_FS ] =REG_FIELD (FXAS21002C_REG_CTRL0 ,0 ,1 ), - [F_ELE ] =REG_FIELD (FXAS21002C_REG_RT_CFG ,3 ,3 ), - [F_ZTEFE ] =REG_FIELD (FXAS21002C_REG_RT_CFG ,2 ,2 ), - [F_YTEFE ] =REG_FIELD (FXAS21002C_REG_RT_CFG ,1 ,1 ), - [F_XTEFE ] =REG_FIELD (FXAS21002C_REG_RT_CFG ,0 ,0 ), - [F_EA ] =REG_FIELD (FXAS21002C_REG_RT_SRC ,6 ,6 ), - [F_ZRT ] =REG_FIELD (FXAS21002C_REG_RT_SRC ,5 ,5 ), - [F_ZRT_POL ] =REG_FIELD (FXAS21002C_REG_RT_SRC ,4 ,4 ), - [F_YRT ] =REG_FIELD (FXAS21002C_REG_RT_SRC ,3 ,3 ), - [F_YRT_POL ] =REG_FIELD (FXAS21002C_REG_RT_SRC ,2 ,2 ), - [F_XRT ] =REG_FIELD (FXAS21002C_REG_RT_SRC ,1 ,1 ), - [F_XRT_POL ] =REG_FIELD (FXAS21002C_REG_RT_SRC ,0 ,0 ), - [F_DBCNTM ] =REG_FIELD (FXAS21002C_REG_RT_THS ,7 ,7 ), - [F_THS ] =REG_FIELD (FXAS21002C_REG_RT_SRC ,0 ,6 ), - [F_RT_COUNT ] =REG_FIELD (FXAS21002C_REG_RT_COUNT ,0 ,7 ), - [F_TEMP ] =REG_FIELD (FXAS21002C_REG_TEMP ,0 ,7 ), - [F_RST ] =REG_FIELD (FXAS21002C_REG_CTRL1 ,6 ,6 ), - [F_ST ] =REG_FIELD (FXAS21002C_REG_CTRL1 ,5 ,5 ), - [F_DR ] =REG_FIELD (FXAS21002C_REG_CTRL1 ,2 ,4 ), - [F_ACTIVE ] =REG_FIELD (FXAS21002C_REG_CTRL1 ,1 ,1 ), - [F_READY ] =REG_FIELD (FXAS21002C_REG_CTRL1 ,0 ,0 ), - [F_INT_CFG_FIFO ] =REG_FIELD (FXAS21002C_REG_CTRL2 ,7 ,7 ), - [F_INT_EN_FIFO ] =REG_FIELD (FXAS21002C_REG_CTRL2 ,6 ,6 ), - [F_INT_CFG_RT ] =REG_FIELD (FXAS21002C_REG_CTRL2 ,5 ,5 ), - [F_INT_EN_RT ] =REG_FIELD (FXAS21002C_REG_CTRL2 ,4 ,4 ), - [F_INT_CFG_DRDY ] =REG_FIELD (FXAS21002C_REG_CTRL2 ,3 ,3 ), - [F_INT_EN_DRDY ] =REG_FIELD (FXAS21002C_REG_CTRL2 ,2 ,2 ), - [F_IPOL ] =REG_FIELD (FXAS21002C_REG_CTRL2 ,1 ,1 ), - [F_PP_OD ] =REG_FIELD (FXAS21002C_REG_CTRL2 ,0 ,0 ), - [F_WRAPTOONE ] =REG_FIELD (FXAS21002C_REG_CTRL3 ,3 ,3 ), - [F_EXTCTRLEN ] =REG_FIELD (FXAS21002C_REG_CTRL3 ,2 ,2 ), - [F_FS_DOUBLE ] =REG_FIELD (FXAS21002C_REG_CTRL3 ,0 ,0 ), -}; -extern const struct dev_pm_ops fxas21002c_pm_ops; int fxas21002c_core_probe(struct device *dev, struct regmap *regmap, int irq,drivers/iio/gyro/fxas21002c_core.c +66
-0@@ -42,6 +42,72 @@ enum fxas21002c_mode_state {#define FXAS21002C_AXIS_TO_REG (axis) (FXAS21002C_REG_OUT_X_MSB + ((axis) * 2)) +static const struct reg_field fxas21002c_reg_fields[] = { + [F_DR_STATUS ] =REG_FIELD (FXAS21002C_REG_STATUS ,0 ,7 ), + [F_OUT_X_MSB ] =REG_FIELD (FXAS21002C_REG_OUT_X_MSB ,0 ,7 ), + [F_OUT_X_LSB ] =REG_FIELD (FXAS21002C_REG_OUT_X_LSB ,0 ,7 ), + [F_OUT_Y_MSB ] =REG_FIELD (FXAS21002C_REG_OUT_Y_MSB ,0 ,7 ), + [F_OUT_Y_LSB ] =REG_FIELD (FXAS21002C_REG_OUT_Y_LSB ,0 ,7 ), + [F_OUT_Z_MSB ] =REG_FIELD (FXAS21002C_REG_OUT_Z_MSB ,0 ,7 ), + [F_OUT_Z_LSB ] =REG_FIELD (FXAS21002C_REG_OUT_Z_LSB ,0 ,7 ), + [F_ZYX_OW ] =REG_FIELD (FXAS21002C_REG_DR_STATUS ,7 ,7 ), + [F_Z_OW ] =REG_FIELD (FXAS21002C_REG_DR_STATUS ,6 ,6 ), + [F_Y_OW ] =REG_FIELD (FXAS21002C_REG_DR_STATUS ,5 ,5 ), + [F_X_OW ] =REG_FIELD (FXAS21002C_REG_DR_STATUS ,4 ,4 ), + [F_ZYX_DR ] =REG_FIELD (FXAS21002C_REG_DR_STATUS ,3 ,3 ), + [F_Z_DR ] =REG_FIELD (FXAS21002C_REG_DR_STATUS ,2 ,2 ), + [F_Y_DR ] =REG_FIELD (FXAS21002C_REG_DR_STATUS ,1 ,1 ), + [F_X_DR ] =REG_FIELD (FXAS21002C_REG_DR_STATUS ,0 ,0 ), + [F_OVF ] =REG_FIELD (FXAS21002C_REG_F_STATUS ,7 ,7 ), + [F_WMKF ] =REG_FIELD (FXAS21002C_REG_F_STATUS ,6 ,6 ), + [F_CNT ] =REG_FIELD (FXAS21002C_REG_F_STATUS ,0 ,5 ), + [F_MODE ] =REG_FIELD (FXAS21002C_REG_F_SETUP ,6 ,7 ), + [F_WMRK ] =REG_FIELD (FXAS21002C_REG_F_SETUP ,0 ,5 ), + [F_EVENT ] =REG_FIELD (FXAS21002C_REG_F_EVENT ,5 ,5 ), + [FE_TIME ] =REG_FIELD (FXAS21002C_REG_F_EVENT ,0 ,4 ), + [F_BOOTEND ] =REG_FIELD (FXAS21002C_REG_INT_SRC_FLAG ,3 ,3 ), + [F_SRC_FIFO ] =REG_FIELD (FXAS21002C_REG_INT_SRC_FLAG ,2 ,2 ), + [F_SRC_RT ] =REG_FIELD (FXAS21002C_REG_INT_SRC_FLAG ,1 ,1 ), + [F_SRC_DRDY ] =REG_FIELD (FXAS21002C_REG_INT_SRC_FLAG ,0 ,0 ), + [F_WHO_AM_I ] =REG_FIELD (FXAS21002C_REG_WHO_AM_I ,0 ,7 ), + [F_BW ] =REG_FIELD (FXAS21002C_REG_CTRL0 ,6 ,7 ), + [F_SPIW ] =REG_FIELD (FXAS21002C_REG_CTRL0 ,5 ,5 ), + [F_SEL ] =REG_FIELD (FXAS21002C_REG_CTRL0 ,3 ,4 ), + [F_HPF_EN ] =REG_FIELD (FXAS21002C_REG_CTRL0 ,2 ,2 ), + [F_FS ] =REG_FIELD (FXAS21002C_REG_CTRL0 ,0 ,1 ), + [F_ELE ] =REG_FIELD (FXAS21002C_REG_RT_CFG ,3 ,3 ), + [F_ZTEFE ] =REG_FIELD (FXAS21002C_REG_RT_CFG ,2 ,2 ), + [F_YTEFE ] =REG_FIELD (FXAS21002C_REG_RT_CFG ,1 ,1 ), + [F_XTEFE ] =REG_FIELD (FXAS21002C_REG_RT_CFG ,0 ,0 ), + [F_EA ] =REG_FIELD (FXAS21002C_REG_RT_SRC ,6 ,6 ), + [F_ZRT ] =REG_FIELD (FXAS21002C_REG_RT_SRC ,5 ,5 ), + [F_ZRT_POL ] =REG_FIELD (FXAS21002C_REG_RT_SRC ,4 ,4 ), + [F_YRT ] =REG_FIELD (FXAS21002C_REG_RT_SRC ,3 ,3 ), + [F_YRT_POL ] =REG_FIELD (FXAS21002C_REG_RT_SRC ,2 ,2 ), + [F_XRT ] =REG_FIELD (FXAS21002C_REG_RT_SRC ,1 ,1 ), + [F_XRT_POL ] =REG_FIELD (FXAS21002C_REG_RT_SRC ,0 ,0 ), + [F_DBCNTM ] =REG_FIELD (FXAS21002C_REG_RT_THS ,7 ,7 ), + [F_THS ] =REG_FIELD (FXAS21002C_REG_RT_SRC ,0 ,6 ), + [F_RT_COUNT ] =REG_FIELD (FXAS21002C_REG_RT_COUNT ,0 ,7 ), + [F_TEMP ] =REG_FIELD (FXAS21002C_REG_TEMP ,0 ,7 ), + [F_RST ] =REG_FIELD (FXAS21002C_REG_CTRL1 ,6 ,6 ), + [F_ST ] =REG_FIELD (FXAS21002C_REG_CTRL1 ,5 ,5 ), + [F_DR ] =REG_FIELD (FXAS21002C_REG_CTRL1 ,2 ,4 ), + [F_ACTIVE ] =REG_FIELD (FXAS21002C_REG_CTRL1 ,1 ,1 ), + [F_READY ] =REG_FIELD (FXAS21002C_REG_CTRL1 ,0 ,0 ), + [F_INT_CFG_FIFO ] =REG_FIELD (FXAS21002C_REG_CTRL2 ,7 ,7 ), + [F_INT_EN_FIFO ] =REG_FIELD (FXAS21002C_REG_CTRL2 ,6 ,6 ), + [F_INT_CFG_RT ] =REG_FIELD (FXAS21002C_REG_CTRL2 ,5 ,5 ), + [F_INT_EN_RT ] =REG_FIELD (FXAS21002C_REG_CTRL2 ,4 ,4 ), + [F_INT_CFG_DRDY ] =REG_FIELD (FXAS21002C_REG_CTRL2 ,3 ,3 ), + [F_INT_EN_DRDY ] =REG_FIELD (FXAS21002C_REG_CTRL2 ,2 ,2 ), + [F_IPOL ] =REG_FIELD (FXAS21002C_REG_CTRL2 ,1 ,1 ), + [F_PP_OD ] =REG_FIELD (FXAS21002C_REG_CTRL2 ,0 ,0 ), + [F_WRAPTOONE ] =REG_FIELD (FXAS21002C_REG_CTRL3 ,3 ,3 ), + [F_EXTCTRLEN ] =REG_FIELD (FXAS21002C_REG_CTRL3 ,2 ,2 ), + [F_FS_DOUBLE ] =REG_FIELD (FXAS21002C_REG_CTRL3 ,0 ,0 ), +}; +static const int fxas21002c_odr_values[] = {800 ,400 ,200 ,100 ,50 ,25 ,12 ,12 };
Re: [PATCH 18/30] iio: gyro: fxas21002c: Move 'fxas21002c_reg_fields' to the only file its used
In reply to Lee JonesHi Lee,
Sorry for the late reply, been out of office and catching up with mails now.
Quoted 15 lines · Lee Jones
'
fxas21002c_reg_fields' is only used in '*core*', meaning that '*i2c*' and '*spi*' complain of a defined but not used const variable. Let's move it into the source file.Fixes the following W=1 kernel build warning(s):
In file included from
drivers/iio/gyro/fxas21002c_i2c.c:14:
drivers/iio/gyro/fxas21002c.h:79:31: warning: ‘fxas21002c_reg_fields’ defined but not used [-Wunused-const-variable=] 79 | static const structreg_fieldfxas21002c_reg_fields[] = {
| ^~~~~~~~~~~~~~~~~~~~~
In file included fromdrivers/iio/gyro/fxas21002c_spi.c:14:
drivers/iio/gyro/fxas21002c.h:79:31: warning: ‘fxas21002c_reg_fields’ defined but not used [-Wunused-const-variable=] 79 | static const structreg_fieldfxas21002c_reg_fields[] = {
| ^~~~~~~~~~~~~~~~~~~~~
Quoted 2 lines
Cc Rui Miguel Silva <[email protected]>
Thanks for this, not going in time for the official tagging, since gregkh already picked this up for staging, but fwiw:
------
Cheers,
Rui
Quoted 163 lines
Signed-off-by Lee Jones <[email protected]>--- drivers/iio/gyro/fxas21002c.h | 66 ------------------------------ drivers/iio/gyro/fxas21002c_core.c | 66 ++++++++++++++++++++++++++++++ 2 files changed, 66 insertions(+), 66 deletions(-)drivers/iio/gyro/fxas21002c.h +0
-66@@ -76,72 +76,6 @@ enum fxas21002c_fields { F_MAX_FIELDS, }; -static const struct reg_field fxas21002c_reg_fields[] = { - [F_DR_STATUS ] =REG_FIELD (FXAS21002C_REG_STATUS ,0 ,7 ), - [F_OUT_X_MSB ] =REG_FIELD (FXAS21002C_REG_OUT_X_MSB ,0 ,7 ), - [F_OUT_X_LSB ] =REG_FIELD (FXAS21002C_REG_OUT_X_LSB ,0 ,7 ), - [F_OUT_Y_MSB ] =REG_FIELD (FXAS21002C_REG_OUT_Y_MSB ,0 ,7 ), - [F_OUT_Y_LSB ] =REG_FIELD (FXAS21002C_REG_OUT_Y_LSB ,0 ,7 ), - [F_OUT_Z_MSB ] =REG_FIELD (FXAS21002C_REG_OUT_Z_MSB ,0 ,7 ), - [F_OUT_Z_LSB ] =REG_FIELD (FXAS21002C_REG_OUT_Z_LSB ,0 ,7 ), - [F_ZYX_OW ] =REG_FIELD (FXAS21002C_REG_DR_STATUS ,7 ,7 ), - [F_Z_OW ] =REG_FIELD (FXAS21002C_REG_DR_STATUS ,6 ,6 ), - [F_Y_OW ] =REG_FIELD (FXAS21002C_REG_DR_STATUS ,5 ,5 ), - [F_X_OW ] =REG_FIELD (FXAS21002C_REG_DR_STATUS ,4 ,4 ), - [F_ZYX_DR ] =REG_FIELD (FXAS21002C_REG_DR_STATUS ,3 ,3 ), - [F_Z_DR ] =REG_FIELD (FXAS21002C_REG_DR_STATUS ,2 ,2 ), - [F_Y_DR ] =REG_FIELD (FXAS21002C_REG_DR_STATUS ,1 ,1 ), - [F_X_DR ] =REG_FIELD (FXAS21002C_REG_DR_STATUS ,0 ,0 ), - [F_OVF ] =REG_FIELD (FXAS21002C_REG_F_STATUS ,7 ,7 ), - [F_WMKF ] =REG_FIELD (FXAS21002C_REG_F_STATUS ,6 ,6 ), - [F_CNT ] =REG_FIELD (FXAS21002C_REG_F_STATUS ,0 ,5 ), - [F_MODE ] =REG_FIELD (FXAS21002C_REG_F_SETUP ,6 ,7 ), - [F_WMRK ] =REG_FIELD (FXAS21002C_REG_F_SETUP ,0 ,5 ), - [F_EVENT ] =REG_FIELD (FXAS21002C_REG_F_EVENT ,5 ,5 ), - [FE_TIME ] =REG_FIELD (FXAS21002C_REG_F_EVENT ,0 ,4 ), - [F_BOOTEND ] =REG_FIELD (FXAS21002C_REG_INT_SRC_FLAG ,3 ,3 ), - [F_SRC_FIFO ] =REG_FIELD (FXAS21002C_REG_INT_SRC_FLAG ,2 ,2 ), - [F_SRC_RT ] =REG_FIELD (FXAS21002C_REG_INT_SRC_FLAG ,1 ,1 ), - [F_SRC_DRDY ] =REG_FIELD (FXAS21002C_REG_INT_SRC_FLAG ,0 ,0 ), - [F_WHO_AM_I ] =REG_FIELD (FXAS21002C_REG_WHO_AM_I ,0 ,7 ), - [F_BW ] =REG_FIELD (FXAS21002C_REG_CTRL0 ,6 ,7 ), - [F_SPIW ] =REG_FIELD (FXAS21002C_REG_CTRL0 ,5 ,5 ), - [F_SEL ] =REG_FIELD (FXAS21002C_REG_CTRL0 ,3 ,4 ), - [F_HPF_EN ] =REG_FIELD (FXAS21002C_REG_CTRL0 ,2 ,2 ), - [F_FS ] =REG_FIELD (FXAS21002C_REG_CTRL0 ,0 ,1 ), - [F_ELE ] =REG_FIELD (FXAS21002C_REG_RT_CFG ,3 ,3 ), - [F_ZTEFE ] =REG_FIELD (FXAS21002C_REG_RT_CFG ,2 ,2 ), - [F_YTEFE ] =REG_FIELD (FXAS21002C_REG_RT_CFG ,1 ,1 ), - [F_XTEFE ] =REG_FIELD (FXAS21002C_REG_RT_CFG ,0 ,0 ), - [F_EA ] =REG_FIELD (FXAS21002C_REG_RT_SRC ,6 ,6 ), - [F_ZRT ] =REG_FIELD (FXAS21002C_REG_RT_SRC ,5 ,5 ), - [F_ZRT_POL ] =REG_FIELD (FXAS21002C_REG_RT_SRC ,4 ,4 ), - [F_YRT ] =REG_FIELD (FXAS21002C_REG_RT_SRC ,3 ,3 ), - [F_YRT_POL ] =REG_FIELD (FXAS21002C_REG_RT_SRC ,2 ,2 ), - [F_XRT ] =REG_FIELD (FXAS21002C_REG_RT_SRC ,1 ,1 ), - [F_XRT_POL ] =REG_FIELD (FXAS21002C_REG_RT_SRC ,0 ,0 ), - [F_DBCNTM ] =REG_FIELD (FXAS21002C_REG_RT_THS ,7 ,7 ), - [F_THS ] =REG_FIELD (FXAS21002C_REG_RT_SRC ,0 ,6 ), - [F_RT_COUNT ] =REG_FIELD (FXAS21002C_REG_RT_COUNT ,0 ,7 ), - [F_TEMP ] =REG_FIELD (FXAS21002C_REG_TEMP ,0 ,7 ), - [F_RST ] =REG_FIELD (FXAS21002C_REG_CTRL1 ,6 ,6 ), - [F_ST ] =REG_FIELD (FXAS21002C_REG_CTRL1 ,5 ,5 ), - [F_DR ] =REG_FIELD (FXAS21002C_REG_CTRL1 ,2 ,4 ), - [F_ACTIVE ] =REG_FIELD (FXAS21002C_REG_CTRL1 ,1 ,1 ), - [F_READY ] =REG_FIELD (FXAS21002C_REG_CTRL1 ,0 ,0 ), - [F_INT_CFG_FIFO ] =REG_FIELD (FXAS21002C_REG_CTRL2 ,7 ,7 ), - [F_INT_EN_FIFO ] =REG_FIELD (FXAS21002C_REG_CTRL2 ,6 ,6 ), - [F_INT_CFG_RT ] =REG_FIELD (FXAS21002C_REG_CTRL2 ,5 ,5 ), - [F_INT_EN_RT ] =REG_FIELD (FXAS21002C_REG_CTRL2 ,4 ,4 ), - [F_INT_CFG_DRDY ] =REG_FIELD (FXAS21002C_REG_CTRL2 ,3 ,3 ), - [F_INT_EN_DRDY ] =REG_FIELD (FXAS21002C_REG_CTRL2 ,2 ,2 ), - [F_IPOL ] =REG_FIELD (FXAS21002C_REG_CTRL2 ,1 ,1 ), - [F_PP_OD ] =REG_FIELD (FXAS21002C_REG_CTRL2 ,0 ,0 ), - [F_WRAPTOONE ] =REG_FIELD (FXAS21002C_REG_CTRL3 ,3 ,3 ), - [F_EXTCTRLEN ] =REG_FIELD (FXAS21002C_REG_CTRL3 ,2 ,2 ), - [F_FS_DOUBLE ] =REG_FIELD (FXAS21002C_REG_CTRL3 ,0 ,0 ), -}; -extern const struct dev_pm_ops fxas21002c_pm_ops; int fxas21002c_core_probe(struct device *dev, struct regmap *regmap, int irq,drivers/iio/gyro/fxas21002c_core.c +66
-0@@ -42,6 +42,72 @@ enum fxas21002c_mode_state {#define FXAS21002C_AXIS_TO_REG (axis) (FXAS21002C_REG_OUT_X_MSB + ((axis) * 2)) +static const struct reg_field fxas21002c_reg_fields[] = { + [F_DR_STATUS ] =REG_FIELD (FXAS21002C_REG_STATUS ,0 ,7 ), + [F_OUT_X_MSB ] =REG_FIELD (FXAS21002C_REG_OUT_X_MSB ,0 ,7 ), + [F_OUT_X_LSB ] =REG_FIELD (FXAS21002C_REG_OUT_X_LSB ,0 ,7 ), + [F_OUT_Y_MSB ] =REG_FIELD (FXAS21002C_REG_OUT_Y_MSB ,0 ,7 ), + [F_OUT_Y_LSB ] =REG_FIELD (FXAS21002C_REG_OUT_Y_LSB ,0 ,7 ), + [F_OUT_Z_MSB ] =REG_FIELD (FXAS21002C_REG_OUT_Z_MSB ,0 ,7 ), + [F_OUT_Z_LSB ] =REG_FIELD (FXAS21002C_REG_OUT_Z_LSB ,0 ,7 ), + [F_ZYX_OW ] =REG_FIELD (FXAS21002C_REG_DR_STATUS ,7 ,7 ), + [F_Z_OW ] =REG_FIELD (FXAS21002C_REG_DR_STATUS ,6 ,6 ), + [F_Y_OW ] =REG_FIELD (FXAS21002C_REG_DR_STATUS ,5 ,5 ), + [F_X_OW ] =REG_FIELD (FXAS21002C_REG_DR_STATUS ,4 ,4 ), + [F_ZYX_DR ] =REG_FIELD (FXAS21002C_REG_DR_STATUS ,3 ,3 ), + [F_Z_DR ] =REG_FIELD (FXAS21002C_REG_DR_STATUS ,2 ,2 ), + [F_Y_DR ] =REG_FIELD (FXAS21002C_REG_DR_STATUS ,1 ,1 ), + [F_X_DR ] =REG_FIELD (FXAS21002C_REG_DR_STATUS ,0 ,0 ), + [F_OVF ] =REG_FIELD (FXAS21002C_REG_F_STATUS ,7 ,7 ), + [F_WMKF ] =REG_FIELD (FXAS21002C_REG_F_STATUS ,6 ,6 ), + [F_CNT ] =REG_FIELD (FXAS21002C_REG_F_STATUS ,0 ,5 ), + [F_MODE ] =REG_FIELD (FXAS21002C_REG_F_SETUP ,6 ,7 ), + [F_WMRK ] =REG_FIELD (FXAS21002C_REG_F_SETUP ,0 ,5 ), + [F_EVENT ] =REG_FIELD (FXAS21002C_REG_F_EVENT ,5 ,5 ), + [FE_TIME ] =REG_FIELD (FXAS21002C_REG_F_EVENT ,0 ,4 ), + [F_BOOTEND ] =REG_FIELD (FXAS21002C_REG_INT_SRC_FLAG ,3 ,3 ), + [F_SRC_FIFO ] =REG_FIELD (FXAS21002C_REG_INT_SRC_FLAG ,2 ,2 ), + [F_SRC_RT ] =REG_FIELD (FXAS21002C_REG_INT_SRC_FLAG ,1 ,1 ), + [F_SRC_DRDY ] =REG_FIELD (FXAS21002C_REG_INT_SRC_FLAG ,0 ,0 ), + [F_WHO_AM_I ] =REG_FIELD (FXAS21002C_REG_WHO_AM_I ,0 ,7 ), + [F_BW ] =REG_FIELD (FXAS21002C_REG_CTRL0 ,6 ,7 ), + [F_SPIW ] =REG_FIELD (FXAS21002C_REG_CTRL0 ,5 ,5 ), + [F_SEL ] =REG_FIELD (FXAS21002C_REG_CTRL0 ,3 ,4 ), + [F_HPF_EN ] =REG_FIELD (FXAS21002C_REG_CTRL0 ,2 ,2 ), + [F_FS ] =REG_FIELD (FXAS21002C_REG_CTRL0 ,0 ,1 ), + [F_ELE ] =REG_FIELD (FXAS21002C_REG_RT_CFG ,3 ,3 ), + [F_ZTEFE ] =REG_FIELD (FXAS21002C_REG_RT_CFG ,2 ,2 ), + [F_YTEFE ] =REG_FIELD (FXAS21002C_REG_RT_CFG ,1 ,1 ), + [F_XTEFE ] =REG_FIELD (FXAS21002C_REG_RT_CFG ,0 ,0 ), + [F_EA ] =REG_FIELD (FXAS21002C_REG_RT_SRC ,6 ,6 ), + [F_ZRT ] =REG_FIELD (FXAS21002C_REG_RT_SRC ,5 ,5 ), + [F_ZRT_POL ] =REG_FIELD (FXAS21002C_REG_RT_SRC ,4 ,4 ), + [F_YRT ] =REG_FIELD (FXAS21002C_REG_RT_SRC ,3 ,3 ), + [F_YRT_POL ] =REG_FIELD (FXAS21002C_REG_RT_SRC ,2 ,2 ), + [F_XRT ] =REG_FIELD (FXAS21002C_REG_RT_SRC ,1 ,1 ), + [F_XRT_POL ] =REG_FIELD (FXAS21002C_REG_RT_SRC ,0 ,0 ), + [F_DBCNTM ] =REG_FIELD (FXAS21002C_REG_RT_THS ,7 ,7 ), + [F_THS ] =REG_FIELD (FXAS21002C_REG_RT_SRC ,0 ,6 ), + [F_RT_COUNT ] =REG_FIELD (FXAS21002C_REG_RT_COUNT ,0 ,7 ), + [F_TEMP ] =REG_FIELD (FXAS21002C_REG_TEMP ,0 ,7 ), + [F_RST ] =REG_FIELD (FXAS21002C_REG_CTRL1 ,6 ,6 ), + [F_ST ] =REG_FIELD (FXAS21002C_REG_CTRL1 ,5 ,5 ), + [F_DR ] =REG_FIELD (FXAS21002C_REG_CTRL1 ,2 ,4 ), + [F_ACTIVE ] =REG_FIELD (FXAS21002C_REG_CTRL1 ,1 ,1 ), + [F_READY ] =REG_FIELD (FXAS21002C_REG_CTRL1 ,0 ,0 ), + [F_INT_CFG_FIFO ] =REG_FIELD (FXAS21002C_REG_CTRL2 ,7 ,7 ), + [F_INT_EN_FIFO ] =REG_FIELD (FXAS21002C_REG_CTRL2 ,6 ,6 ), + [F_INT_CFG_RT ] =REG_FIELD (FXAS21002C_REG_CTRL2 ,5 ,5 ), + [F_INT_EN_RT ] =REG_FIELD (FXAS21002C_REG_CTRL2 ,4 ,4 ), + [F_INT_CFG_DRDY ] =REG_FIELD (FXAS21002C_REG_CTRL2 ,3 ,3 ), + [F_INT_EN_DRDY ] =REG_FIELD (FXAS21002C_REG_CTRL2 ,2 ,2 ), + [F_IPOL ] =REG_FIELD (FXAS21002C_REG_CTRL2 ,1 ,1 ), + [F_PP_OD ] =REG_FIELD (FXAS21002C_REG_CTRL2 ,0 ,0 ), + [F_WRAPTOONE ] =REG_FIELD (FXAS21002C_REG_CTRL3 ,3 ,3 ), + [F_EXTCTRLEN ] =REG_FIELD (FXAS21002C_REG_CTRL3 ,2 ,2 ), + [F_FS_DOUBLE ] =REG_FIELD (FXAS21002C_REG_CTRL3 ,0 ,0 ), +}; +static const int fxas21002c_odr_values[] = {800 ,400 ,200 ,100 ,50 ,25 ,12 ,12 };Signature · 1 line
2.25.1
PATCH 19/30 iio: imu: st_lsm6dsx: st_lsm6dsx: Reorder 'inline' declaration
In reply to Lee JonesFixes the following W=1 kernel build warning(s):
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx.h:487:1: warning: ‘inline’ is not at beginning of declaration [-Wold-style-declaration] drivers/iio/imu/st_lsm6dsx/st_lsm6dsx.h:497:44: warning: ‘st_lsm6dsx_accel_ext_info’ defined but not used [-Wunused-const-variable=]
--- drivers/iio/imu/st_lsm6dsx/st_lsm6dsx.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx.h +1 -1
@@ -484,7 +484,7 @@ st_lsm6dsx_write_locked(struct st_lsm6dsx_hw *hw, unsigned int addr,return err; } -static const inline struct iio_mount_matrix * +static inline const struct iio_mount_matrix *st_lsm6dsx_get_mount_matrix (const struct iio_dev *iio_dev,const struct iio_chan_spec *chan) {
Signature · 1 line
2.25.1
Re: [PATCH 19/30] iio: imu: st_lsm6dsx: st_lsm6dsx: Reorder 'inline' declaration
Quoted 8 lines · On Fri, 17 Jul 2020 17:55:27 +0100 Lee Jones <[email protected]> wrote:
Fixes the following W=1 kernel build warning(s):
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx.h:487:1: warning: ‘inline’ is not at beginning of declaration [-Wold-style-declaration]drivers/iio/imu/st_lsm6dsx/st_lsm6dsx.h:497:44: warning: ‘st_lsm6dsx_accel_ext_info’ defined but not used [-Wunused-const-variable=]Cc Lorenzo Bianconi <[email protected]>Cc Denis Ciocca <[email protected]>Signed-off-by Lee Jones <[email protected]>
Applied. Thanks,
Jonathan
Quoted 17 lines
--- drivers/iio/imu/st_lsm6dsx/st_lsm6dsx.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/iio/imu/st_lsm6dsx/st_lsm6dsx.h +1
-1@@ -484,7 +484,7 @@ st_lsm6dsx_write_locked(struct st_lsm6dsx_hw *hw, unsigned int addr,return err; } -static const inline struct iio_mount_matrix * +static inline const struct iio_mount_matrix *st_lsm6dsx_get_mount_matrix (const struct iio_dev *iio_dev,const struct iio_chan_spec *chan) {
PATCH 20/30 iio: adc: max1363: Fix kerneldoc attribute formatting for 'lock'
In reply to Lee JonesKerneldoc expects attributes/parameters to be in '@*.: ' format.
Fixes the following W=1 kernel build warning(s):
drivers/iio/adc/max1363.c:190: warning: Function parameter or member 'lock' not described in 'max1363_state'
--- drivers/iio/adc/max1363.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/adc/max1363.c +1 -1
@@ -150,7 +150,7 @@ struct max1363_chip_info {* @current_mode: the scan mode of this chip * @requestedmask: a valid requested set of channels * @reg: supply regulator -* @lock lock to ensure state is consistent +* @lock: lock to ensure state is consistent * @monitor_on: whether monitor mode is enabled * @monitor_speed: parameter corresponding to device monitor speed setting * @mask_high: bitmask for enabled high thresholds
Signature · 1 line
2.25.1
Re: [PATCH 20/30] iio: adc: max1363: Fix kerneldoc attribute formatting for 'lock'
Quoted 10 lines · On Fri, 17 Jul 2020 17:55:28 +0100 Lee Jones <[email protected]> wrote:
Kerneldoc expects attributes/parameters to be in '@*.: ' format.
Fixes the following W=1 kernel build warning(s):
drivers/iio/adc/max1363.c:190: warning: Function parameter or member 'lock' not described in 'max1363_state'Cc Liam Girdwood <[email protected]>Cc Mark Brown <[email protected]>Cc Rohit Sarkar <[email protected]>Signed-off-by Lee Jones <[email protected]>
Given the age of this driver, I suspect that this is the source of all the cut and paste. Oops.
Applied,
Jonathan
Quoted 17 lines
--- drivers/iio/adc/max1363.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/iio/adc/max1363.c +1
-1@@ -150,7 +150,7 @@ struct max1363_chip_info {* @current_mode: the scan mode of this chip * @requestedmask: a valid requested set of channels * @reg: supply regulator -* @lock lock to ensure state is consistent +* @lock: lock to ensure state is consistent * @monitor_on: whether monitor mode is enabled * @monitor_speed: parameter corresponding to device monitor speed setting * @mask_high: bitmask for enabled high thresholds
PATCH 21/30 iio: adc: max9611: Demote obvious misuse of kerneldoc to standard comment blocks
In reply to Lee JonesNo attempt has been made to document any of the demoted structs here.
Fixes the following W=1 kernel build warning(s):
drivers/iio/adc/max9611.c:117: warning: cannot understand function prototype: 'const unsigned int max9611_mux_conf[][2] = ' drivers/iio/adc/max9611.c:145: warning: cannot understand function prototype: 'const unsigned int max9611_gain_conf[][2] = '
--- drivers/iio/adc/max9611.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/iio/adc/max9611.c +2 -2
@@ -110,7 +110,7 @@ enum max9611_conf_ids { CONF_TEMP, }; -/** +/* * max9611_mux_conf - associate ADC mux configuration with register address * where data shall be read from */
@@ -133,7 +133,7 @@ enum max9611_csa_gain_params { CSA_GAIN_OFFS_RAW, }; -/** +/* * max9611_csa_gain_conf - associate gain multiplier with LSB and * offset values. *
Signature · 1 line
2.25.1
Re: [PATCH 21/30] iio: adc: max9611: Demote obvious misuse of kerneldoc to standard comment blocks
Quoted 10 lines · On Fri, 17 Jul 2020 17:55:29 +0100 Lee Jones <[email protected]> wrote:
No attempt has been made to document any of the demoted structs here.
Fixes the following W=1 kernel build warning(s):
drivers/iio/adc/max9611.c:117: warning: cannot understand function prototype: 'const unsigned int max9611_mux_conf[][2] = 'drivers/iio/adc/max9611.c:145: warning: cannot understand function prototype: 'const unsigned int max9611_gain_conf[][2] = 'Cc Jacopo Mondi <[email protected]>Cc Geert Uytterhoeven <[email protected]>Signed-off-by Lee Jones <[email protected]>
Applied
Thanks,
Jonathan
Quoted 26 lines
--- drivers/iio/adc/max9611.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/iio/adc/max9611.c +2
-2@@ -110,7 +110,7 @@ enum max9611_conf_ids { CONF_TEMP, }; -/** +/* * max9611_mux_conf - associate ADC mux configuration with register address * where data shall be read from */ @@ -133,7 +133,7 @@ enum max9611_csa_gain_params { CSA_GAIN_OFFS_RAW, }; -/** +/* * max9611_csa_gain_conf - associate gain multiplier with LSB and * offset values. *
PATCH 22/30 iio: adc: mcp320x: Change ordering of compiler attribute macro
In reply to Lee JonesKerneldoc gets confused if the variable does not follow th type/attribute definitions.
Fixes the following W=1 kernel build warning(s):
drivers/iio/adc/mcp320x.c:96: warning: Function parameter or member '____cacheline_aligned' not described in 'mcp320x'
--- drivers/iio/adc/mcp320x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/adc/mcp320x.c +1 -1
@@ -91,7 +91,7 @@ struct mcp320x {struct mutex lock;const struct mcp320x_chip_info *chip_info; -u8 tx_buf____cacheline_aligned ; +u8 ____cacheline_aligned tx_buf;u8 rx_buf[4 ]; };
Signature · 1 line
2.25.1
Jonathan Cameron
maintainerRe: [PATCH 22/30] iio: adc: mcp320x: Change ordering of compiler attribute macro
Quoted 11 lines · On Fri, 17 Jul 2020 17:55:30 +0100 Lee Jones <[email protected]> wrote:
Kerneldoc gets confused if the variable does not follow th type/attribute definitions.
Fixes the following W=1 kernel build warning(s):
drivers/iio/adc/mcp320x.c:96: warning: Function parameter or member '____cacheline_aligned' not described in 'mcp320x'Cc Oskar Andero <[email protected]>Cc Bendorff Jensen <[email protected]>Cc Soren Andersen <[email protected]>Signed-off-by Lee Jones <[email protected]>
Holding this one whilst we discuss the right fix for this sort of issue.
J
Quoted 17 lines
--- drivers/iio/adc/mcp320x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/iio/adc/mcp320x.c +1
-1@@ -91,7 +91,7 @@ struct mcp320x {struct mutex lock;const struct mcp320x_chip_info *chip_info; -u8 tx_buf____cacheline_aligned ; +u8 ____cacheline_aligned tx_buf;u8 rx_buf[4 ]; };
PATCH 23/30 iio: adc: palmas_gpadc: Demote non-conforming kerneldoc header
In reply to Lee JonesVery few of the struct attributes have been documented here.
Fixes the following W=1 kernel build warning(s):
drivers/iio/adc/palmas_gpadc.c:114: warning: Function parameter or member 'dev' not described in 'palmas_gpadc' drivers/iio/adc/palmas_gpadc.c:114: warning: Function parameter or member 'palmas' not described in 'palmas_gpadc' drivers/iio/adc/palmas_gpadc.c:114: warning: Function parameter or member 'irq' not described in 'palmas_gpadc' drivers/iio/adc/palmas_gpadc.c:114: warning: Function parameter or member 'irq_auto_0' not described in 'palmas_gpadc' drivers/iio/adc/palmas_gpadc.c:114: warning: Function parameter or member 'irq_auto_1' not described in 'palmas_gpadc' drivers/iio/adc/palmas_gpadc.c:114: warning: Function parameter or member 'adc_info' not described in 'palmas_gpadc' drivers/iio/adc/palmas_gpadc.c:114: warning: Function parameter or member 'conv_completion' not described in 'palmas_gpadc' drivers/iio/adc/palmas_gpadc.c:114: warning: Function parameter or member 'wakeup1_data' not described in 'palmas_gpadc' drivers/iio/adc/palmas_gpadc.c:114: warning: Function parameter or member 'wakeup2_data' not described in 'palmas_gpadc' drivers/iio/adc/palmas_gpadc.c:114: warning: Function parameter or member 'wakeup1_enable' not described in 'palmas_gpadc' drivers/iio/adc/palmas_gpadc.c:114: warning: Function parameter or member 'wakeup2_enable' not described in 'palmas_gpadc'
--- drivers/iio/adc/palmas_gpadc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/iio/adc/palmas_gpadc.c +1 -2
@@ -76,7 +76,7 @@ static struct palmas_gpadc_info palmas_gpadc_info[] = { PALMAS_ADC_INFO(IN15, 0, 0, 0, 0, INVALID, INVALID, true), }; -/** +/* * struct palmas_gpadc - the palmas_gpadc structure * @ch0_current: channel 0 current source setting * 0: 0 uA
@@ -94,7 +94,6 @@ static struct palmas_gpadc_info palmas_gpadc_info[] = {* This is the palmas_gpadc structure to store run-time information * and pointers for this driver instance. */ -struct palmas_gpadc {struct device *dev;struct palmas *palmas;
Signature · 1 line
2.25.1
Re: [PATCH 23/30] iio: adc: palmas_gpadc: Demote non-conforming kerneldoc header
Quoted 16 lines · On Fri, 17 Jul 2020 17:55:31 +0100 Lee Jones <[email protected]> wrote:
Very few of the struct attributes have been documented here.
Fixes the following W=1 kernel build warning(s):
drivers/iio/adc/palmas_gpadc.c:114: warning: Function parameter or member 'dev' not described in 'palmas_gpadc'drivers/iio/adc/palmas_gpadc.c:114: warning: Function parameter or member 'palmas' not described in 'palmas_gpadc'drivers/iio/adc/palmas_gpadc.c:114: warning: Function parameter or member 'irq' not described in 'palmas_gpadc'drivers/iio/adc/palmas_gpadc.c:114: warning: Function parameter or member 'irq_auto_0' not described in 'palmas_gpadc'drivers/iio/adc/palmas_gpadc.c:114: warning: Function parameter or member 'irq_auto_1' not described in 'palmas_gpadc'drivers/iio/adc/palmas_gpadc.c:114: warning: Function parameter or member 'adc_info' not described in 'palmas_gpadc'drivers/iio/adc/palmas_gpadc.c:114: warning: Function parameter or member 'conv_completion' not described in 'palmas_gpadc'drivers/iio/adc/palmas_gpadc.c:114: warning: Function parameter or member 'wakeup1_data' not described in 'palmas_gpadc'drivers/iio/adc/palmas_gpadc.c:114: warning: Function parameter or member 'wakeup2_data' not described in 'palmas_gpadc'drivers/iio/adc/palmas_gpadc.c:114: warning: Function parameter or member 'wakeup1_enable' not described in 'palmas_gpadc'drivers/iio/adc/palmas_gpadc.c:114: warning: Function parameter or member 'wakeup2_enable' not described in 'palmas_gpadc'
Quoted 2 lines
Cc Pradeep Goudagunta <[email protected]>Signed-off-by Lee Jones <[email protected]>
Applied.
Thanks,
Jonathan
Quoted 25 lines
--- drivers/iio/adc/palmas_gpadc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)drivers/iio/adc/palmas_gpadc.c +1
-2@@ -76,7 +76,7 @@ static struct palmas_gpadc_info palmas_gpadc_info[] = { PALMAS_ADC_INFO(IN15, 0, 0, 0, 0, INVALID, INVALID, true), }; -/** +/* * struct palmas_gpadc - the palmas_gpadc structure * @ch0_current: channel 0 current source setting * 0: 0 uA @@ -94,7 +94,6 @@ static struct palmas_gpadc_info palmas_gpadc_info[] = {* This is the palmas_gpadc structure to store run-time information * and pointers for this driver instance. */ -struct palmas_gpadc {struct device *dev;struct palmas *palmas;
PATCH 24/30 iio: imu: inv_mpu6050: inv_mpu_core: Demote obvious misuse of kerneldoc to standard comment blocks
In reply to Lee JonesNo attempt has been made to document any of the demoted functions here.
Fixes the following W=1 kernel build warning(s):
drivers/iio/imu/inv_mpu6050/inv_mpu_core.c:444: warning: Function parameter or member 'st' not described in 'inv_mpu6050_set_lpf_regs' drivers/iio/imu/inv_mpu6050/inv_mpu_core.c:444: warning: Function parameter or member 'val' not described in 'inv_mpu6050_set_lpf_regs' drivers/iio/imu/inv_mpu6050/inv_mpu_core.c:480: warning: Function parameter or member 'indio_dev' not described in 'inv_mpu6050_init_config' drivers/iio/imu/inv_mpu6050/inv_mpu_core.c:862: warning: Function parameter or member 'st' not described in 'inv_mpu6050_set_lpf' drivers/iio/imu/inv_mpu6050/inv_mpu_core.c:862: warning: Function parameter or member 'rate' not described in 'inv_mpu6050_set_lpf' drivers/iio/imu/inv_mpu6050/inv_mpu_core.c:893: warning: Function parameter or member 'dev' not described in 'inv_mpu6050_fifo_rate_store' drivers/iio/imu/inv_mpu6050/inv_mpu_core.c:893: warning: Function parameter or member 'attr' not described in 'inv_mpu6050_fifo_rate_store' drivers/iio/imu/inv_mpu6050/inv_mpu_core.c:893: warning: Function parameter or member 'buf' not described in 'inv_mpu6050_fifo_rate_store' drivers/iio/imu/inv_mpu6050/inv_mpu_core.c:893: warning: Function parameter or member 'count' not described in 'inv_mpu6050_fifo_rate_store' drivers/iio/imu/inv_mpu6050/inv_mpu_core.c:954: warning: Function parameter or member 'dev' not described in 'inv_fifo_rate_show' drivers/iio/imu/inv_mpu6050/inv_mpu_core.c:954: warning: Function parameter or member 'attr' not described in 'inv_fifo_rate_show' drivers/iio/imu/inv_mpu6050/inv_mpu_core.c:954: warning: Function parameter or member 'buf' not described in 'inv_fifo_rate_show' drivers/iio/imu/inv_mpu6050/inv_mpu_core.c:975: warning: Function parameter or member 'dev' not described in 'inv_attr_show' drivers/iio/imu/inv_mpu6050/inv_mpu_core.c:975: warning: Function parameter or member 'attr' not described in 'inv_attr_show' drivers/iio/imu/inv_mpu6050/inv_mpu_core.c:975: warning: Function parameter or member 'buf' not described in 'inv_attr_show' drivers/iio/imu/inv_mpu6050/inv_mpu_core.c:1282: warning: Function parameter or member 'st' not described in 'inv_check_and_setup_chip'
--- drivers/iio/imu/inv_mpu6050/inv_mpu_core.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)
drivers/iio/imu/inv_mpu6050/inv_mpu_core.c +7 -7
@@ -433,7 +433,7 @@ static int inv_mpu6050_set_gyro_fsr(struct inv_mpu6050_state *st,return regmap_write (st->map, st->reg->gyro_config, data); } -/** +/* * inv_mpu6050_set_lpf_regs() - set low pass filter registers, chip dependent * * MPU60xx/MPU9150 use only 1 register for accelerometer + gyroscope
@@ -467,7 +467,7 @@ static int inv_mpu6050_set_lpf_regs(struct inv_mpu6050_state *st,return regmap_write (st->map, st->reg->accel_lpf, val); } -/** +/* * inv_mpu6050_init_config() - Initialize hardware, disable FIFO. * * Initial configuration:
@@ -847,7 +847,7 @@ static int inv_mpu6050_write_raw(struct iio_dev *indio_dev,return result; } -/** +/* * inv_mpu6050_set_lpf() - set low pass filer based on fifo rate. * * Based on the Nyquist principle, the bandwidth of the low
@@ -884,7 +884,7 @@ static int inv_mpu6050_set_lpf(struct inv_mpu6050_state *st, int rate)return 0 ; } -/** +/* * inv_mpu6050_fifo_rate_store() - Set fifo rate. */ static ssize_t
@@ -945,7 +945,7 @@ inv_mpu6050_fifo_rate_store(struct device *dev, struct device_attribute *attr,return count; } -/** +/* * inv_fifo_rate_show() - Get the current sampling rate. */ static ssize_t
@@ -962,7 +962,7 @@ inv_fifo_rate_show(struct device *dev, struct device_attribute *attr,return scnprintf (buf,PAGE_SIZE ,"%u\n" , fifo_rate); } -/** +/* * inv_attr_show() - calling this function will show current * parameters. *
@@ -1275,7 +1275,7 @@ static const struct iio_info mpu_info = { .debugfs_reg_access = &inv_mpu6050_reg_access, }; -/** +/* * inv_check_and_setup_chip() - check and setup chip. */ static int inv_check_and_setup_chip (struct inv_mpu6050_state *st)
Signature · 1 line
2.25.1
Re: [PATCH 24/30] iio: imu: inv_mpu6050: inv_mpu_core: Demote obvious misuse of kerneldoc to standard comment blocks
Quoted 21 lines · On Fri, 17 Jul 2020 17:55:32 +0100 Lee Jones <[email protected]> wrote:
No attempt has been made to document any of the demoted functions here.
Fixes the following W=1 kernel build warning(s):
drivers/iio/imu/inv_mpu6050/inv_mpu_core.c:444: warning: Function parameter or member 'st' not described in 'inv_mpu6050_set_lpf_regs'drivers/iio/imu/inv_mpu6050/inv_mpu_core.c:444: warning: Function parameter or member 'val' not described in 'inv_mpu6050_set_lpf_regs'drivers/iio/imu/inv_mpu6050/inv_mpu_core.c:480: warning: Function parameter or member 'indio_dev' not described in 'inv_mpu6050_init_config'drivers/iio/imu/inv_mpu6050/inv_mpu_core.c:862: warning: Function parameter or member 'st' not described in 'inv_mpu6050_set_lpf'drivers/iio/imu/inv_mpu6050/inv_mpu_core.c:862: warning: Function parameter or member 'rate' not described in 'inv_mpu6050_set_lpf'drivers/iio/imu/inv_mpu6050/inv_mpu_core.c:893: warning: Function parameter or member 'dev' not described in 'inv_mpu6050_fifo_rate_store'drivers/iio/imu/inv_mpu6050/inv_mpu_core.c:893: warning: Function parameter or member 'attr' not described in 'inv_mpu6050_fifo_rate_store'drivers/iio/imu/inv_mpu6050/inv_mpu_core.c:893: warning: Function parameter or member 'buf' not described in 'inv_mpu6050_fifo_rate_store'drivers/iio/imu/inv_mpu6050/inv_mpu_core.c:893: warning: Function parameter or member 'count' not described in 'inv_mpu6050_fifo_rate_store'drivers/iio/imu/inv_mpu6050/inv_mpu_core.c:954: warning: Function parameter or member 'dev' not described in 'inv_fifo_rate_show'drivers/iio/imu/inv_mpu6050/inv_mpu_core.c:954: warning: Function parameter or member 'attr' not described in 'inv_fifo_rate_show'drivers/iio/imu/inv_mpu6050/inv_mpu_core.c:954: warning: Function parameter or member 'buf' not described in 'inv_fifo_rate_show'drivers/iio/imu/inv_mpu6050/inv_mpu_core.c:975: warning: Function parameter or member 'dev' not described in 'inv_attr_show'drivers/iio/imu/inv_mpu6050/inv_mpu_core.c:975: warning: Function parameter or member 'attr' not described in 'inv_attr_show'drivers/iio/imu/inv_mpu6050/inv_mpu_core.c:975: warning: Function parameter or member 'buf' not described in 'inv_attr_show'drivers/iio/imu/inv_mpu6050/inv_mpu_core.c:1282: warning: Function parameter or member 'st' not described in 'inv_check_and_setup_chip'
Quoted 2 lines
Cc Jean-Baptiste Maneyrol <[email protected]>Signed-off-by Lee Jones <[email protected]>
Applied.
Thanks,
Jonathan
Quoted 71 lines
--- drivers/iio/imu/inv_mpu6050/inv_mpu_core.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)drivers/iio/imu/inv_mpu6050/inv_mpu_core.c +7
-7@@ -433,7 +433,7 @@ static int inv_mpu6050_set_gyro_fsr(struct inv_mpu6050_state *st,return regmap_write (st->map, st->reg->gyro_config, data); } -/** +/* * inv_mpu6050_set_lpf_regs() - set low pass filter registers, chip dependent * * MPU60xx/MPU9150 use only 1 register for accelerometer + gyroscope @@ -467,7 +467,7 @@ static int inv_mpu6050_set_lpf_regs(struct inv_mpu6050_state *st,return regmap_write (st->map, st->reg->accel_lpf, val); } -/** +/* * inv_mpu6050_init_config() - Initialize hardware, disable FIFO. * * Initial configuration: @@ -847,7 +847,7 @@ static int inv_mpu6050_write_raw(struct iio_dev *indio_dev,return result; } -/** +/* * inv_mpu6050_set_lpf() - set low pass filer based on fifo rate. * * Based on the Nyquist principle, the bandwidth of the low @@ -884,7 +884,7 @@ static int inv_mpu6050_set_lpf(struct inv_mpu6050_state *st, int rate)return 0 ; } -/** +/* * inv_mpu6050_fifo_rate_store() - Set fifo rate. */ static ssize_t@@ -945,7 +945,7 @@ inv_mpu6050_fifo_rate_store(struct device *dev, struct device_attribute *attr,return count; } -/** +/* * inv_fifo_rate_show() - Get the current sampling rate. */ static ssize_t@@ -962,7 +962,7 @@ inv_fifo_rate_show(struct device *dev, struct device_attribute *attr,return scnprintf (buf,PAGE_SIZE ,"%u\n" , fifo_rate); } -/** +/* * inv_attr_show() - calling this function will show current * parameters. * @@ -1275,7 +1275,7 @@ static const struct iio_info mpu_info = { .debugfs_reg_access = &inv_mpu6050_reg_access, }; -/** +/* * inv_check_and_setup_chip() - check and setup chip. */ static int inv_check_and_setup_chip (struct inv_mpu6050_state *st)
PATCH 25/30 iio: imu: inv_mpu6050: inv_mpu_ring: Demote seemingly unintentional kerneldoc header
In reply to Lee JonesThis is the only use of kerneldoc in the source file and no descriptions are provided.
Fixes the following W=1 kernel build warning(s):
drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c:118: warning: Function parameter or member 'irq' not described in 'inv_mpu6050_read_fifo' drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c:118: warning: Function parameter or member 'p' not described in 'inv_mpu6050_read_fifo'
--- drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c +1 -1
@@ -111,7 +111,7 @@ static int inv_reset_fifo(struct iio_dev *indio_dev)return result; } -/** +/* * inv_mpu6050_read_fifo() - Transfer data from hardware FIFO to KFIFO. */ irqreturn_t inv_mpu6050_read_fifo (int irq,void *p)
Signature · 1 line
2.25.1
Jonathan Cameron
maintainerRe: [PATCH 25/30] iio: imu: inv_mpu6050: inv_mpu_ring: Demote seemingly unintentional kerneldoc header
Quoted 10 lines · On Fri, 17 Jul 2020 17:55:33 +0100 Lee Jones <[email protected]> wrote:
This is the only use of kerneldoc in the source file and no descriptions are provided.
Fixes the following W=1 kernel build warning(s):
drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c:118: warning: Function parameter or member 'irq' not described in 'inv_mpu6050_read_fifo'drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c:118: warning: Function parameter or member 'p' not described in 'inv_mpu6050_read_fifo'Cc Jean-Baptiste Maneyrol <[email protected]>Signed-off-by Lee Jones <[email protected]>
Applied to the togreg branch of iio.git and pushed out as testing for the autobuilders to play with it.
Thanks,
Jonathan
Quoted 17 lines
--- drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c +1
-1@@ -111,7 +111,7 @@ static int inv_reset_fifo(struct iio_dev *indio_dev)return result; } -/** +/* * inv_mpu6050_read_fifo() - Transfer data from hardware FIFO to KFIFO. */ irqreturn_t inv_mpu6050_read_fifo (int irq,void *p)
PATCH 26/30 iio: adc: qcom-pm8xxx-xoadc: Demote standard comment block and supply missing description
In reply to Lee JonesKerneldoc is only suitable for documenting functions and struct/enums.
Fixes the following W=1 kernel build warning(s):
drivers/iio/adc/qcom-pm8xxx-xoadc.c:133: warning: Excess function parameter 'PM8XXX_CHANNEL_INTERNAL' description in 'PM8XXX_CHANNEL_INTERNAL' drivers/iio/adc/qcom-pm8xxx-xoadc.c:133: warning: Excess function parameter 'PM8XXX_CHANNEL_125V' description in 'PM8XXX_CHANNEL_INTERNAL' drivers/iio/adc/qcom-pm8xxx-xoadc.c:133: warning: Excess function parameter 'PM8XXX_CHANNEL_INTERNAL_2' description in 'PM8XXX_CHANNEL_INTERNAL' drivers/iio/adc/qcom-pm8xxx-xoadc.c:133: warning: Excess function parameter 'PM8XXX_CHANNEL_MUXOFF' description in 'PM8XXX_CHANNEL_INTERNAL' drivers/iio/adc/qcom-pm8xxx-xoadc.c:412: warning: Function parameter or member 'variant' not described in 'pm8xxx_xoadc'
--- drivers/iio/adc/qcom-pm8xxx-xoadc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/iio/adc/qcom-pm8xxx-xoadc.c +2 -1
@@ -120,7 +120,7 @@#define ADC_ARB_USRP_DATA0 0x19D#define ADC_ARB_USRP_DATA1 0x19C -/** +/* * Physical channels which MUST exist on all PM variants in order to provide * proper reference points for calibration. *
@@ -388,6 +388,7 @@ struct pm8xxx_chan_info {* struct pm8xxx_xoadc - state container for the XOADC * @dev: pointer to device * @map: regmap to access registers +* @variant: XOADC variant characteristics * @vref: reference voltage regulator * characteristics of the channels, and sensible default settings * @nchans: number of channels, configured by the device tree
Signature · 1 line
2.25.1
Re: [PATCH 26/30] iio: adc: qcom-pm8xxx-xoadc: Demote standard comment block and supply missing description
Quoted 10 lines · Lee Jones
Kerneldoc is only suitable for documenting functions and struct/enums.
Fixes the following W=1 kernel build warning(s):
drivers/iio/adc/qcom-pm8xxx-xoadc.c:133: warning: Excess function parameter 'PM8XXX_CHANNEL_INTERNAL' description in 'PM8XXX_CHANNEL_INTERNAL'drivers/iio/adc/qcom-pm8xxx-xoadc.c:133: warning: Excess function parameter 'PM8XXX_CHANNEL_125V' description in 'PM8XXX_CHANNEL_INTERNAL'drivers/iio/adc/qcom-pm8xxx-xoadc.c:133: warning: Excess function parameter 'PM8XXX_CHANNEL_INTERNAL_2' description in 'PM8XXX_CHANNEL_INTERNAL'drivers/iio/adc/qcom-pm8xxx-xoadc.c:133: warning: Excess function parameter 'PM8XXX_CHANNEL_MUXOFF' description in 'PM8XXX_CHANNEL_INTERNAL'drivers/iio/adc/qcom-pm8xxx-xoadc.c:412: warning: Function parameter or member 'variant' not described in 'pm8xxx_xoadc'
Quoted 5 lines
Cc Andy Gross <[email protected]>Cc Bjorn Andersson <[email protected]>Cc Linus Walleij <[email protected]>Signed-off-by Lee Jones <[email protected]>
Quoted 28 lines
--- drivers/iio/adc/qcom-pm8xxx-xoadc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/iio/adc/qcom-pm8xxx-xoadc.c +2
-1@@ -120,7 +120,7 @@#define ADC_ARB_USRP_DATA0 0x19D#define ADC_ARB_USRP_DATA1 0x19C -/** +/* * Physical channels which MUST exist on all PM variants in order to provide * proper reference points for calibration. * @@ -388,6 +388,7 @@ struct pm8xxx_chan_info {* struct pm8xxx_xoadc - state container for the XOADC * @dev: pointer to device * @map: regmap to access registers +* @variant: XOADC variant characteristics * @vref: reference voltage regulator * characteristics of the channels, and sensible default settings * @nchans: number of channels, configured by the device tree Signature · 1 line
2.25.1
Jonathan Cameron
maintainerRe: [PATCH 26/30] iio: adc: qcom-pm8xxx-xoadc: Demote standard comment block and supply missing description
Quoted 12 lines · On Fri, 17 Jul 2020 13:15:25 -0700 Bjorn Andersson…
Quoted 10 lines · Lee Jones
Kerneldoc is only suitable for documenting functions and struct/enums.
Fixes the following W=1 kernel build warning(s):
drivers/iio/adc/qcom-pm8xxx-xoadc.c:133: warning: Excess function parameter 'PM8XXX_CHANNEL_INTERNAL' description in 'PM8XXX_CHANNEL_INTERNAL'drivers/iio/adc/qcom-pm8xxx-xoadc.c:133: warning: Excess function parameter 'PM8XXX_CHANNEL_125V' description in 'PM8XXX_CHANNEL_INTERNAL'drivers/iio/adc/qcom-pm8xxx-xoadc.c:133: warning: Excess function parameter 'PM8XXX_CHANNEL_INTERNAL_2' description in 'PM8XXX_CHANNEL_INTERNAL'drivers/iio/adc/qcom-pm8xxx-xoadc.c:133: warning: Excess function parameter 'PM8XXX_CHANNEL_MUXOFF' description in 'PM8XXX_CHANNEL_INTERNAL'drivers/iio/adc/qcom-pm8xxx-xoadc.c:412: warning: Function parameter or member 'variant' not described in 'pm8xxx_xoadc'
Quoted 8 lines
Quoted 5 lines
Cc Andy Gross <[email protected]>Cc Bjorn Andersson <[email protected]>Cc Linus Walleij <[email protected]>Signed-off-by Lee Jones <[email protected]>Reviewed-by Bjorn Andersson <[email protected]>
Applied to the togreg branch of iio.git and pushed out as testing for the autobuilders to play with it.
Thanks,
Jonathan
Quoted 28 lines
Quoted 28 lines
--- drivers/iio/adc/qcom-pm8xxx-xoadc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/iio/adc/qcom-pm8xxx-xoadc.c +2
-1@@ -120,7 +120,7 @@#define ADC_ARB_USRP_DATA0 0x19D#define ADC_ARB_USRP_DATA1 0x19C -/** +/* * Physical channels which MUST exist on all PM variants in order to provide * proper reference points for calibration. * @@ -388,6 +388,7 @@ struct pm8xxx_chan_info {* struct pm8xxx_xoadc - state container for the XOADC * @dev: pointer to device * @map: regmap to access registers +* @variant: XOADC variant characteristics * @vref: reference voltage regulator * characteristics of the channels, and sensible default settings * @nchans: number of channels, configured by the device tree Signature · 1 line
2.25.1
PATCH 27/30 iio: magnetometer: ak8974: Add description for ak8974's 'scan' attribute
In reply to Lee JonesFixes the following W=1 kernel build warning(s):
drivers/iio/magnetometer/ak8974.c:200: warning: Function parameter or member 'scan' not described in 'ak8974'
--- drivers/iio/magnetometer/ak8974.c | 1 + 1 file changed, 1 insertion(+)
drivers/iio/magnetometer/ak8974.c +1 -0
@@ -180,6 +180,7 @@* @drdy_irq: uses the DRDY IRQ line * @drdy_complete: completion for DRDY * @drdy_active_low: the DRDY IRQ is active low +* @scan: timestamps */ struct ak8974 {struct i2c_client *i2c;
Signature · 1 line
2.25.1
Jonathan Cameron
maintainerRe: [PATCH 27/30] iio: magnetometer: ak8974: Add description for ak8974's 'scan' attribute
Quoted 7 lines · On Fri, 17 Jul 2020 17:55:35 +0100 Lee Jones <[email protected]> wrote:
Fixes the following W=1 kernel build warning(s):
drivers/iio/magnetometer/ak8974.c:200: warning: Function parameter or member 'scan' not described in 'ak8974'Cc Linus Walleij <[email protected]>Cc Samu Onkalo <[email protected]>Signed-off-by Lee Jones <[email protected]>
Applied to the togreg branch of iio.git and pushed out as testing for the autobuidlers to play with it.
Thanks,
Jonathan
Quoted 16 lines
--- drivers/iio/magnetometer/ak8974.c | 1 + 1 file changed, 1 insertion(+)drivers/iio/magnetometer/ak8974.c +1
-0@@ -180,6 +180,7 @@* @drdy_irq: uses the DRDY IRQ line * @drdy_complete: completion for DRDY * @drdy_active_low: the DRDY IRQ is active low +* @scan: timestamps */ struct ak8974 {struct i2c_client *i2c;
PATCH 28/30 iio: imu: st_lsm6dsx: st_lsm6dsx_shub: Demote obvious misuse of kerneldoc to standard comment blocks
In reply to Lee JonesNo attempt has been made to document any of the demoted functions here.
Fixes the following W=1 kernel build warning(s):
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_shub.c:174: warning: Function parameter or member 'hw' not described in 'st_lsm6dsx_shub_read_output' drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_shub.c:174: warning: Function parameter or member 'data' not described in 'st_lsm6dsx_shub_read_output' drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_shub.c:174: warning: Function parameter or member 'len' not described in 'st_lsm6dsx_shub_read_output' drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_shub.c:205: warning: Function parameter or member 'hw' not described in 'st_lsm6dsx_shub_write_reg' drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_shub.c:205: warning: Function parameter or member 'addr' not described in 'st_lsm6dsx_shub_write_reg' drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_shub.c:205: warning: Function parameter or member 'data' not described in 'st_lsm6dsx_shub_write_reg' drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_shub.c:205: warning: Function parameter or member 'len' not described in 'st_lsm6dsx_shub_write_reg' drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_shub.c:285: warning: Function parameter or member 'sensor' not described in 'st_lsm6dsx_shub_read' drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_shub.c:285: warning: Function parameter or member 'addr' not described in 'st_lsm6dsx_shub_read' drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_shub.c:285: warning: Function parameter or member 'data' not described in 'st_lsm6dsx_shub_read' drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_shub.c:285: warning: Function parameter or member 'len' not described in 'st_lsm6dsx_shub_read' drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_shub.c:335: warning: Function parameter or member 'sensor' not described in 'st_lsm6dsx_shub_write' drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_shub.c:335: warning: Function parameter or member 'addr' not described in 'st_lsm6dsx_shub_write' drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_shub.c:335: warning: Function parameter or member 'data' not described in 'st_lsm6dsx_shub_write' drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_shub.c:335: warning: Function parameter or member 'len' not described in 'st_lsm6dsx_shub_write'
--- drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_shub.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_shub.c +4 -4
@@ -163,7 +163,7 @@ static void st_lsm6dsx_shub_wait_complete(struct st_lsm6dsx_hw *hw)msleep ((2000000U / odr) +1 ); } -/** +/* * st_lsm6dsx_shub_read_output - read i2c controller register * * Read st_lsm6dsx i2c controller register
@@ -195,7 +195,7 @@ st_lsm6dsx_shub_read_output(struct st_lsm6dsx_hw *hw, u8 *data,return err; } -/** +/* * st_lsm6dsx_shub_write_reg - write i2c controller register * * Write st_lsm6dsx i2c controller register
@@ -273,7 +273,7 @@ static int st_lsm6dsx_shub_master_enable(struct st_lsm6dsx_sensor *sensor,return err; } -/** +/* * st_lsm6dsx_shub_read - read data from slave device register * * Read data from slave device register. SLV0 is used for
@@ -323,7 +323,7 @@ st_lsm6dsx_shub_read(struct st_lsm6dsx_sensor *sensor, u8 addr, sizeof(config)); } -/** +/* * st_lsm6dsx_shub_write - write data to slave device register * * Write data from slave device register. SLV0 is used for
Signature · 1 line
2.25.1
Re: [PATCH 28/30] iio: imu: st_lsm6dsx: st_lsm6dsx_shub: Demote obvious misuse of kerneldoc to standard comment blocks
Quoted 20 lines · On Fri, 17 Jul 2020 17:55:36 +0100 Lee Jones <[email protected]> wrote:
No attempt has been made to document any of the demoted functions here.
Fixes the following W=1 kernel build warning(s):
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_shub.c:174: warning: Function parameter or member 'hw' not described in 'st_lsm6dsx_shub_read_output'drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_shub.c:174: warning: Function parameter or member 'data' not described in 'st_lsm6dsx_shub_read_output'drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_shub.c:174: warning: Function parameter or member 'len' not described in 'st_lsm6dsx_shub_read_output'drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_shub.c:205: warning: Function parameter or member 'hw' not described in 'st_lsm6dsx_shub_write_reg'drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_shub.c:205: warning: Function parameter or member 'addr' not described in 'st_lsm6dsx_shub_write_reg'drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_shub.c:205: warning: Function parameter or member 'data' not described in 'st_lsm6dsx_shub_write_reg'drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_shub.c:205: warning: Function parameter or member 'len' not described in 'st_lsm6dsx_shub_write_reg'drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_shub.c:285: warning: Function parameter or member 'sensor' not described in 'st_lsm6dsx_shub_read'drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_shub.c:285: warning: Function parameter or member 'addr' not described in 'st_lsm6dsx_shub_read'drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_shub.c:285: warning: Function parameter or member 'data' not described in 'st_lsm6dsx_shub_read'drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_shub.c:285: warning: Function parameter or member 'len' not described in 'st_lsm6dsx_shub_read'drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_shub.c:335: warning: Function parameter or member 'sensor' not described in 'st_lsm6dsx_shub_write'drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_shub.c:335: warning: Function parameter or member 'addr' not described in 'st_lsm6dsx_shub_write'drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_shub.c:335: warning: Function parameter or member 'data' not described in 'st_lsm6dsx_shub_write'drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_shub.c:335: warning: Function parameter or member 'len' not described in 'st_lsm6dsx_shub_write'
Quoted 2 lines
Cc Lorenzo Bianconi <[email protected]>Signed-off-by Lee Jones <[email protected]>
Applied.
Thanks,
Jonathan
Quoted 44 lines
--- drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_shub.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_shub.c +4
-4@@ -163,7 +163,7 @@ static void st_lsm6dsx_shub_wait_complete(struct st_lsm6dsx_hw *hw)msleep ((2000000U / odr) +1 ); } -/** +/* * st_lsm6dsx_shub_read_output - read i2c controller register * * Read st_lsm6dsx i2c controller register @@ -195,7 +195,7 @@ st_lsm6dsx_shub_read_output(struct st_lsm6dsx_hw *hw, u8 *data,return err; } -/** +/* * st_lsm6dsx_shub_write_reg - write i2c controller register * * Write st_lsm6dsx i2c controller register @@ -273,7 +273,7 @@ static int st_lsm6dsx_shub_master_enable(struct st_lsm6dsx_sensor *sensor,return err; } -/** +/* * st_lsm6dsx_shub_read - read data from slave device register * * Read data from slave device register. SLV0 is used for @@ -323,7 +323,7 @@ st_lsm6dsx_shub_read(struct st_lsm6dsx_sensor *sensor, u8 addr, sizeof(config)); } -/** +/* * st_lsm6dsx_shub_write - write data to slave device register * * Write data from slave device register. SLV0 is used for
PATCH 29/30 iio: imu: st_lsm6dsx: st_lsm6dsx: Mark 'st_lsm6dsx_accel_ext_info' as __maybe_unused
In reply to Lee JonesIt doesn't make sense to move it into '*core*' as it's co-located with other, similar definitions which are used in multiple locations.
Fixes the following W=1 kernel build warning(s):
In file included from drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_i2c.c:17:
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx.h:497:44: warning: ‘st_lsm6dsx_accel_ext_info’ defined but not used [-Wunused-const-variable=] 497 | static const struct iio_chan_spec_ext_info st_lsm6dsx_accel_ext_info[] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_spi.c:17:
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx.h:497:44: warning: ‘st_lsm6dsx_accel_ext_info’ defined but not used [-Wunused-const-variable=] 497 | static const struct iio_chan_spec_ext_info st_lsm6dsx_accel_ext_info[] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_i3c.c:16:
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx.h:497:44: warning: ‘st_lsm6dsx_accel_ext_info’ defined but not used [-Wunused-const-variable=] 497 | static const struct iio_chan_spec_ext_info st_lsm6dsx_accel_ext_info[] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~~
--- drivers/iio/imu/st_lsm6dsx/st_lsm6dsx.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx.h +2 -1
@@ -494,7 +494,8 @@ st_lsm6dsx_get_mount_matrix(const struct iio_dev *iio_dev,return &hw->orientation; } -static const struct iio_chan_spec_ext_info st_lsm6dsx_accel_ext_info[] = { +static const +struct iio_chan_spec_ext_info __maybe_unused st_lsm6dsx_accel_ext_info[] = {IIO_MOUNT_MATRIX (IIO_SHARED_BY_ALL , st_lsm6dsx_get_mount_matrix), { } };
Signature · 1 line
2.25.1
Jonathan Cameron
maintainerRe: [PATCH 29/30] iio: imu: st_lsm6dsx: st_lsm6dsx: Mark 'st_lsm6dsx_accel_ext_info' as __maybe_unused
Quoted 18 lines · On Fri, 17 Jul 2020 17:55:37 +0100 Lee Jones <[email protected]> wrote:
It doesn't make sense to move it into '*core*' as it's co-located with other, similar definitions which are used in multiple locations.
Fixes the following W=1 kernel build warning(s):
In file included from
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_i2c.c:17:
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx.h:497:44: warning: ‘st_lsm6dsx_accel_ext_info’ defined but not used [-Wunused-const-variable=] 497 | static const structiio_chan_spec_ext_infost_lsm6dsx_accel_ext_info[] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~~
In file included fromdrivers/iio/imu/st_lsm6dsx/st_lsm6dsx_spi.c:17:
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx.h:497:44: warning: ‘st_lsm6dsx_accel_ext_info’ defined but not used [-Wunused-const-variable=] 497 | static const structiio_chan_spec_ext_infost_lsm6dsx_accel_ext_info[] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~~
In file included fromdrivers/iio/imu/st_lsm6dsx/st_lsm6dsx_i3c.c:16:
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx.h:497:44: warning: ‘st_lsm6dsx_accel_ext_info’ defined but not used [-Wunused-const-variable=] 497 | static const structiio_chan_spec_ext_infost_lsm6dsx_accel_ext_info[] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~~
Quoted 3 lines
Cc Lorenzo Bianconi <[email protected]>Cc Denis Ciocca <[email protected]>Signed-off-by Lee Jones <[email protected]>
Applied to the togreg branch of iio.git and pushed out as testing for the autobuilders to play with it.
Thanks,
Jonathan
Quoted 18 lines
--- drivers/iio/imu/st_lsm6dsx/st_lsm6dsx.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/iio/imu/st_lsm6dsx/st_lsm6dsx.h +2
-1@@ -494,7 +494,8 @@ st_lsm6dsx_get_mount_matrix(const struct iio_dev *iio_dev,return &hw->orientation; } -static const struct iio_chan_spec_ext_info st_lsm6dsx_accel_ext_info[] = { +static const +struct iio_chan_spec_ext_info __maybe_unused st_lsm6dsx_accel_ext_info[] = {IIO_MOUNT_MATRIX (IIO_SHARED_BY_ALL , st_lsm6dsx_get_mount_matrix), { } };
PATCH 30/30 iio: adc: rockchip_saradc: Demote Demote seemingly unintentional kerneldoc header
In reply to Lee JonesThis is the only use of kerneldoc in the source file and no descriptions are provided.
Fixes the following W=1 kernel build warning(s):
drivers/iio/adc/rockchip_saradc.c:190: warning: Function parameter or member 'reset' not described in 'rockchip_saradc_reset_controller'
--- drivers/iio/adc/rockchip_saradc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/adc/rockchip_saradc.c +1 -1
@@ -183,7 +183,7 @@ static const struct of_device_id rockchip_saradc_match[] = { };MODULE_DEVICE_TABLE (of, rockchip_saradc_match); -/** +/* * Reset SARADC Controller. */ static void rockchip_saradc_reset_controller (struct reset_control *reset)
Signature · 1 line
2.25.1
Re: [PATCH 30/30] iio: adc: rockchip_saradc: Demote Demote seemingly unintentional kerneldoc header
Am Freitag, 17. Juli 2020, 18:55:38 CEST schrieb Lee Jones:
Quoted 11 lines
This is the only use of kerneldoc in the source file and no descriptions are provided.
Fixes the following W=1 kernel build warning(s):
drivers/iio/adc/rockchip_saradc.c:190: warning: Function parameter or member 'reset' not described in 'rockchip_saradc_reset_controller'Cc Heiko Stuebner <[email protected]>Cc Philipp Zabel <[email protected]>Signed-off-by Lee Jones <[email protected]>
Subject-line says "Demote Demote..."
Otherwise
Quoted 18 lines
--- drivers/iio/adc/rockchip_saradc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/iio/adc/rockchip_saradc.c +1
-1@@ -183,7 +183,7 @@ static const struct of_device_id rockchip_saradc_match[] = { };MODULE_DEVICE_TABLE (of, rockchip_saradc_match); -/** +/* * Reset SARADC Controller. */ static void rockchip_saradc_reset_controller (struct reset_control *reset)
Jonathan Cameron
maintainerRe: [PATCH 30/30] iio: adc: rockchip_saradc: Demote Demote seemingly unintentional kerneldoc header
Quoted 13 lines · On Fri, 17 Jul 2020 21:10:27 +0200 Heiko Stübner <[email protected]> wrote:
Am Freitag, 17. Juli 2020, 18:55:38 CEST schrieb Lee Jones:
Quoted 11 lines
This is the only use of kerneldoc in the source file and no descriptions are provided.
Fixes the following W=1 kernel build warning(s):
drivers/iio/adc/rockchip_saradc.c:190: warning: Function parameter or member 'reset' not described in 'rockchip_saradc_reset_controller'Cc Heiko Stuebner <[email protected]>Cc Philipp Zabel <[email protected]>Signed-off-by Lee Jones <[email protected]>
Quoted 4 lines
Subject-line says "Demote Demote..."
Otherwise
Reviewed-by Heiko Stuebner <[email protected]>
Fixed up and applied.
Thanks for whole set Lee.
Jonathan
Quoted 24 lines
Quoted 20 lines
--- drivers/iio/adc/rockchip_saradc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/iio/adc/rockchip_saradc.c +1
-1@@ -183,7 +183,7 @@ static const struct of_device_id rockchip_saradc_match[] = { };MODULE_DEVICE_TABLE (of, rockchip_saradc_match); -/** +/* * Reset SARADC Controller. */ static void rockchip_saradc_reset_controller (struct reset_control *reset)