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.
Lee Jones (30):
iio: adc: ad_sigma_delta: Remove unused variable 'ret'
iio: accel: bma220_spi: Do not define 'struct acpi_device_id' when
!CONFIG_ACPI
iio: common: ms_sensors: ms_sensors_i2c: Fix misspelling of parameter
'client'
iio: adc: ad7298: Demote obvious misuse of kerneldoc to standard
comment blocks
iio: chemical: sgp30: Add description for sgp_read_cmd()'s
'duration_us'
iio: adc: ad7923: Demote obvious misuse of kerneldoc to standard
comment blocks
iio: dac: ad5360: Fix kerneldoc attribute formatting for 'lock'
iio: dac: ad5380: Fix kerneldoc attribute formatting for 'lock'
iio: dummy: iio_simple_dummy: Demote unworthy kerneldocs and correct
misspelling
iio: dummy: iio_simple_dummy: Add newline after function-end
iio: dac: ad5421: Fix kerneldoc attribute formatting for 'lock'
iio: gyro: adis16080: Fix formatting issue and compiler attribute
ordering
iio: dummy: iio_simple_dummy_events: Demote file header and supply
descriptions for val2 params
iio: dac: ad5064: Value returned by ad5064_vref_name may not be 'const
* const'
iio: dummy: iio_dummy_evgen: Demote file header and supply description
for 'irq_sim_domain'
iio: adc: ad7887: Demote seemingly unintentional kerneldoc header
iio: adc: ad7949: Fix misspelling issue and compiler attribute
ordering
iio: dummy: iio_simple_dummy_buffer: Demote file header and correct
misspelling
iio: dac: ad5064: Fix a few kerneldoc misdemeanours
iio: dac: ad5446: Complete 'struct ad5446_state' doc and demote
unworthy kerneldocs
iio: dac: ad5449: Fix kerneldoc attribute formatting for 'lock'
iio: dac: ad5755: Fix kerneldoc attribute formatting for 'lock'
iio: dac: ad5758: Move and fix-up kerneldoc header and demote unworthy
kerneldoc
iio: dac: ad5761: Fix kerneldoc attribute formatting for 'lock'
iio: dac: ad5764: Fix misdocumenting and formatting error
iio: dac: ad5791: Complete 'struct ad5791_chip_info' documentation
iio: light: cm32181: Fix formatting and docrot issues in
cm32181_acpi_get_cpm()
iio: magnetometer: mmc35240: Fix function header formatting
iio: imu: kmx61: Fix formatting in kerneldoc function headers
iio: dac: ad7303: Complete 'struct ad7303_state' doc and reorder
compiler attribute
drivers/iio/accel/bma220_spi.c | 2 ++
drivers/iio/adc/ad7298.c | 8 ++++----
drivers/iio/adc/ad7887.c | 2 +-
drivers/iio/adc/ad7923.c | 8 ++++----
drivers/iio/adc/ad7949.c | 4 ++--
drivers/iio/adc/ad_sigma_delta.c | 7 ++-----
drivers/iio/chemical/sgp30.c | 1 +
drivers/iio/common/ms_sensors/ms_sensors_i2c.c | 2 +-
drivers/iio/dac/ad5064.c | 10 +++++-----
drivers/iio/dac/ad5360.c | 2 +-
drivers/iio/dac/ad5380.c | 2 +-
drivers/iio/dac/ad5421.c | 2 +-
drivers/iio/dac/ad5446.c | 11 +++++++----
drivers/iio/dac/ad5449.c | 2 +-
drivers/iio/dac/ad5755.c | 2 +-
drivers/iio/dac/ad5758.c | 18 +++++++++---------
drivers/iio/dac/ad5761.c | 2 +-
drivers/iio/dac/ad5764.c | 5 ++---
drivers/iio/dac/ad5791.c | 10 ++++------
drivers/iio/dac/ad7303.c | 5 ++++-
drivers/iio/dummy/iio_dummy_evgen.c | 4 +++-
drivers/iio/dummy/iio_simple_dummy.c | 7 ++++---
drivers/iio/dummy/iio_simple_dummy_buffer.c | 4 ++--
drivers/iio/dummy/iio_simple_dummy_events.c | 4 +++-
drivers/iio/gyro/adis16080.c | 4 ++--
drivers/iio/imu/kmx61.c | 14 +++++++-------
drivers/iio/light/cm32181.c | 8 ++++----
drivers/iio/magnetometer/mmc35240.c | 4 ++--
28 files changed, 81 insertions(+), 73 deletions(-)
--
2.25.1
File headers are not good candidates for kerneldoc.
Fixes the following W=1 kernel build warning(s):
drivers/iio/dummy/iio_simple_dummy_events.c:21: warning: Incorrect use of kernel-doc format: * iio_simple_dummy_read_event_config() - is event enabled?
drivers/iio/dummy/iio_simple_dummy_events.c:34: warning: Function parameter or member 'indio_dev' not described in 'iio_simple_dummy_read_event_config'
drivers/iio/dummy/iio_simple_dummy_events.c:34: warning: Function parameter or member 'chan' not described in 'iio_simple_dummy_read_event_config'
drivers/iio/dummy/iio_simple_dummy_events.c:34: warning: Function parameter or member 'type' not described in 'iio_simple_dummy_read_event_config'
drivers/iio/dummy/iio_simple_dummy_events.c:34: warning: Function parameter or member 'dir' not described in 'iio_simple_dummy_read_event_config'
drivers/iio/dummy/iio_simple_dummy_events.c:123: warning: Function parameter or member 'val2' not described in 'iio_simple_dummy_read_event_value'
drivers/iio/dummy/iio_simple_dummy_events.c:146: warning: Function parameter or member 'val2' not described in 'iio_simple_dummy_write_event_value'
Signed-off-by: Lee Jones <[email protected]>
---
drivers/iio/dummy/iio_simple_dummy_events.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/iio/dummy/iio_simple_dummy_events.c b/drivers/iio/dummy/iio_simple_dummy_events.c
index b3abaaca6f5ef..63a2b844be508 100644
--- a/drivers/iio/dummy/iio_simple_dummy_events.c
+++ b/drivers/iio/dummy/iio_simple_dummy_events.c
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-2.0-only
-/**
+/*
* Copyright (c) 2011 Jonathan Cameron
*
* Event handling elements of industrial I/O reference driver.
@@ -107,6 +107,7 @@ int iio_simple_dummy_write_event_config(struct iio_dev *indio_dev,
* @dir: direction of the vent whose value is being read
* @info: info type of the event whose value is being read
* @val: value for the event code.
+ * @val2: unused
*
* Many devices provide a large set of events of which only a subset may
* be enabled at a time, with value registers whose meaning changes depending
@@ -136,6 +137,7 @@ int iio_simple_dummy_read_event_value(struct iio_dev *indio_dev,
* @dir: direction of the vent whose value is being set
* @info: info type of the event whose value is being set
* @val: the value to be set.
+ * @val2: unused
*/
int iio_simple_dummy_write_event_value(struct iio_dev *indio_dev,
const struct iio_chan_spec *chan,
--
2.25.1
Kerneldoc expects attributes/parameters to be in '@*.: ' format and
gets confused if the variable does not follow the type/attribute
definitions.
Fixes the following W=1 kernel build warning(s):
drivers/iio/gyro/adis16080.c:49: warning: Function parameter or member 'lock' not described in 'adis16080_state'
drivers/iio/gyro/adis16080.c:49: warning: Function parameter or member '____cacheline_aligned' not described in 'adis16080_state'
Cc: Michael Hennerich <[email protected]>
Cc: Barry Song <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
---
drivers/iio/gyro/adis16080.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/iio/gyro/adis16080.c b/drivers/iio/gyro/adis16080.c
index 1b84b8e112fe1..f38f9abcccbb5 100644
--- a/drivers/iio/gyro/adis16080.c
+++ b/drivers/iio/gyro/adis16080.c
@@ -38,14 +38,14 @@ struct adis16080_chip_info {
* @us: actual spi_device to write data
* @info: chip specific parameters
* @buf: transmit or receive buffer
- * @lock lock to protect buffer during reads
+ * @lock: lock to protect buffer during reads
**/
struct adis16080_state {
struct spi_device *us;
const struct adis16080_chip_info *info;
struct mutex lock;
- __be16 buf ____cacheline_aligned;
+ __be16 ____cacheline_aligned buf;
};
static int adis16080_read_sample(struct iio_dev *indio_dev,
--
2.25.1
Kerneldoc expects attributes/parameters to be in '@*.: ' format.
Fixes the following W=1 kernel build warning(s):
drivers/iio/dac/ad5380.c:64: warning: Function parameter or member 'lock' not described in 'ad5380_state'
Cc: Michael Hennerich <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
---
drivers/iio/dac/ad5380.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/iio/dac/ad5380.c b/drivers/iio/dac/ad5380.c
index b37e5675f7162..fd3358cccc7c5 100644
--- a/drivers/iio/dac/ad5380.c
+++ b/drivers/iio/dac/ad5380.c
@@ -51,7 +51,7 @@ struct ad5380_chip_info {
* @vref_reg: vref supply regulator
* @vref: actual reference voltage used in uA
* @pwr_down: whether the chip is currently in power down mode
- * @lock lock to protect the data buffer during regmap ops
+ * @lock: lock to protect the data buffer during regmap ops
*/
struct ad5380_state {
--
2.25.1
Fixes the following W=1 kernel build warning(s):
drivers/iio/adc/ad_sigma_delta.c: In function ‘ad_sd_trigger_handler’:
drivers/iio/adc/ad_sigma_delta.c:405:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]
405 | int ret;
| ^~~
Cc: Michael Hennerich <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
---
drivers/iio/adc/ad_sigma_delta.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/drivers/iio/adc/ad_sigma_delta.c b/drivers/iio/adc/ad_sigma_delta.c
index dd3d54b3bc8bb..f269b926440da 100644
--- a/drivers/iio/adc/ad_sigma_delta.c
+++ b/drivers/iio/adc/ad_sigma_delta.c
@@ -402,7 +402,6 @@ static irqreturn_t ad_sd_trigger_handler(int irq, void *p)
unsigned int reg_size;
unsigned int data_reg;
uint8_t data[16];
- int ret;
memset(data, 0x00, 16);
@@ -419,14 +418,12 @@ static irqreturn_t ad_sd_trigger_handler(int irq, void *p)
case 4:
case 2:
case 1:
- ret = ad_sd_read_reg_raw(sigma_delta, data_reg, reg_size,
- &data[0]);
+ ad_sd_read_reg_raw(sigma_delta, data_reg, reg_size, &data[0]);
break;
case 3:
/* We store 24 bit samples in a 32 bit word. Keep the upper
* byte set to zero. */
- ret = ad_sd_read_reg_raw(sigma_delta, data_reg, reg_size,
- &data[1]);
+ ad_sd_read_reg_raw(sigma_delta, data_reg, reg_size, &data[1]);
break;
}
--
2.25.1
Probably due to docrot.
Fixes the following W=1 kernel build warning(s):
drivers/iio/common/ms_sensors/ms_sensors_i2c.c:186: warning: Function parameter or member 'client' not described in 'ms_sensors_read_serial'
drivers/iio/common/ms_sensors/ms_sensors_i2c.c:186: warning: Excess function parameter 'cli' description in 'ms_sensors_read_serial'
Cc: William Markezana <[email protected]>
Cc: Ludovic Tancerel <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
---
drivers/iio/common/ms_sensors/ms_sensors_i2c.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/iio/common/ms_sensors/ms_sensors_i2c.c b/drivers/iio/common/ms_sensors/ms_sensors_i2c.c
index b52cba1b3c831..b9e2038d05ef4 100644
--- a/drivers/iio/common/ms_sensors/ms_sensors_i2c.c
+++ b/drivers/iio/common/ms_sensors/ms_sensors_i2c.c
@@ -165,7 +165,7 @@ static bool ms_sensors_crc_valid(u32 value)
/**
* ms_sensors_read_serial() - Serial number read function
- * @cli: pointer to i2c client
+ * @client: pointer to i2c client
* @sn: pointer to 64-bits destination value
*
* Generic i2c serial number read function for Measurement Specialties devices.
--
2.25.1
On Thu, 16 Jul 2020 14:58:59 +0100
Lee Jones <[email protected]> wrote:
> Fixes the following W=1 kernel build warning(s):
>
> drivers/iio/adc/ad_sigma_delta.c: In function ‘ad_sd_trigger_handler’:
> drivers/iio/adc/ad_sigma_delta.c:405:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]
> 405 | int ret;
> | ^~~
>
> Cc: Michael Hennerich <[email protected]>
> Signed-off-by: Lee Jones <[email protected]>
Hi Lee,
My only thought on this one is perhaps we should put a warning in there
if ret isn't as expected. Still never been one yet so I doubt anyone
minds too much.
Applied to the togreg branch of iio.git and pushed out as testing.
Note there is time for reviews from others before I push this out as
a non rebasing branch. I'm also going to need to rebase it once
as previous pull hasn't quite gotten into staging/staging-next yet.
Thanks,
Jonathan
> ---
> drivers/iio/adc/ad_sigma_delta.c | 7 ++-----
> 1 file changed, 2 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/iio/adc/ad_sigma_delta.c b/drivers/iio/adc/ad_sigma_delta.c
> index dd3d54b3bc8bb..f269b926440da 100644
> --- a/drivers/iio/adc/ad_sigma_delta.c
> +++ b/drivers/iio/adc/ad_sigma_delta.c
> @@ -402,7 +402,6 @@ static irqreturn_t ad_sd_trigger_handler(int irq, void *p)
> unsigned int reg_size;
> unsigned int data_reg;
> uint8_t data[16];
> - int ret;
>
> memset(data, 0x00, 16);
>
> @@ -419,14 +418,12 @@ static irqreturn_t ad_sd_trigger_handler(int irq, void *p)
> case 4:
> case 2:
> case 1:
> - ret = ad_sd_read_reg_raw(sigma_delta, data_reg, reg_size,
> - &data[0]);
> + ad_sd_read_reg_raw(sigma_delta, data_reg, reg_size, &data[0]);
> break;
> case 3:
> /* We store 24 bit samples in a 32 bit word. Keep the upper
> * byte set to zero. */
> - ret = ad_sd_read_reg_raw(sigma_delta, data_reg, reg_size,
> - &data[1]);
> + ad_sd_read_reg_raw(sigma_delta, data_reg, reg_size, &data[1]);
> break;
> }
>
On Thu, 16 Jul 2020 14:59:01 +0100
Lee Jones <[email protected]> wrote:
> Probably due to docrot.
>
> Fixes the following W=1 kernel build warning(s):
>
> drivers/iio/common/ms_sensors/ms_sensors_i2c.c:186: warning: Function parameter or member 'client' not described in 'ms_sensors_read_serial'
> drivers/iio/common/ms_sensors/ms_sensors_i2c.c:186: warning: Excess function parameter 'cli' description in 'ms_sensors_read_serial'
>
> Cc: William Markezana <[email protected]>
> Cc: Ludovic Tancerel <[email protected]>
> Signed-off-by: Lee Jones <[email protected]>
Applied
> ---
> drivers/iio/common/ms_sensors/ms_sensors_i2c.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/iio/common/ms_sensors/ms_sensors_i2c.c b/drivers/iio/common/ms_sensors/ms_sensors_i2c.c
> index b52cba1b3c831..b9e2038d05ef4 100644
> --- a/drivers/iio/common/ms_sensors/ms_sensors_i2c.c
> +++ b/drivers/iio/common/ms_sensors/ms_sensors_i2c.c
> @@ -165,7 +165,7 @@ static bool ms_sensors_crc_valid(u32 value)
>
> /**
> * ms_sensors_read_serial() - Serial number read function
> - * @cli: pointer to i2c client
> + * @client: pointer to i2c client
> * @sn: pointer to 64-bits destination value
> *
> * Generic i2c serial number read function for Measurement Specialties devices.
On Thu, 16 Jul 2020 14:59:06 +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/ad5380.c:64: warning: Function parameter or member 'lock' not described in 'ad5380_state'
>
> Cc: Michael Hennerich <[email protected]>
> Signed-off-by: Lee Jones <[email protected]>
Applied.
> ---
> drivers/iio/dac/ad5380.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/iio/dac/ad5380.c b/drivers/iio/dac/ad5380.c
> index b37e5675f7162..fd3358cccc7c5 100644
> --- a/drivers/iio/dac/ad5380.c
> +++ b/drivers/iio/dac/ad5380.c
> @@ -51,7 +51,7 @@ struct ad5380_chip_info {
> * @vref_reg: vref supply regulator
> * @vref: actual reference voltage used in uA
> * @pwr_down: whether the chip is currently in power down mode
> - * @lock lock to protect the data buffer during regmap ops
> + * @lock: lock to protect the data buffer during regmap ops
> */
>
> struct ad5380_state {
On Thu, 16 Jul 2020 14:58:58 +0100
Lee Jones <[email protected]> wrote:
> 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.
Thanks for these.
One general comment is I'd have appreciated a spot of grouping to bring
a particular group of identical problems together in the series.
Example being the @lock(:) ones in this set.
It doesn't matter that much though. I'm just being fussy :)
Jonathan
>
> Lee Jones (30):
> iio: adc: ad_sigma_delta: Remove unused variable 'ret'
> iio: accel: bma220_spi: Do not define 'struct acpi_device_id' when
> !CONFIG_ACPI
> iio: common: ms_sensors: ms_sensors_i2c: Fix misspelling of parameter
> 'client'
> iio: adc: ad7298: Demote obvious misuse of kerneldoc to standard
> comment blocks
> iio: chemical: sgp30: Add description for sgp_read_cmd()'s
> 'duration_us'
> iio: adc: ad7923: Demote obvious misuse of kerneldoc to standard
> comment blocks
> iio: dac: ad5360: Fix kerneldoc attribute formatting for 'lock'
> iio: dac: ad5380: Fix kerneldoc attribute formatting for 'lock'
> iio: dummy: iio_simple_dummy: Demote unworthy kerneldocs and correct
> misspelling
> iio: dummy: iio_simple_dummy: Add newline after function-end
> iio: dac: ad5421: Fix kerneldoc attribute formatting for 'lock'
> iio: gyro: adis16080: Fix formatting issue and compiler attribute
> ordering
> iio: dummy: iio_simple_dummy_events: Demote file header and supply
> descriptions for val2 params
> iio: dac: ad5064: Value returned by ad5064_vref_name may not be 'const
> * const'
> iio: dummy: iio_dummy_evgen: Demote file header and supply description
> for 'irq_sim_domain'
> iio: adc: ad7887: Demote seemingly unintentional kerneldoc header
> iio: adc: ad7949: Fix misspelling issue and compiler attribute
> ordering
> iio: dummy: iio_simple_dummy_buffer: Demote file header and correct
> misspelling
> iio: dac: ad5064: Fix a few kerneldoc misdemeanours
> iio: dac: ad5446: Complete 'struct ad5446_state' doc and demote
> unworthy kerneldocs
> iio: dac: ad5449: Fix kerneldoc attribute formatting for 'lock'
> iio: dac: ad5755: Fix kerneldoc attribute formatting for 'lock'
> iio: dac: ad5758: Move and fix-up kerneldoc header and demote unworthy
> kerneldoc
> iio: dac: ad5761: Fix kerneldoc attribute formatting for 'lock'
> iio: dac: ad5764: Fix misdocumenting and formatting error
> iio: dac: ad5791: Complete 'struct ad5791_chip_info' documentation
> iio: light: cm32181: Fix formatting and docrot issues in
> cm32181_acpi_get_cpm()
> iio: magnetometer: mmc35240: Fix function header formatting
> iio: imu: kmx61: Fix formatting in kerneldoc function headers
> iio: dac: ad7303: Complete 'struct ad7303_state' doc and reorder
> compiler attribute
>
> drivers/iio/accel/bma220_spi.c | 2 ++
> drivers/iio/adc/ad7298.c | 8 ++++----
> drivers/iio/adc/ad7887.c | 2 +-
> drivers/iio/adc/ad7923.c | 8 ++++----
> drivers/iio/adc/ad7949.c | 4 ++--
> drivers/iio/adc/ad_sigma_delta.c | 7 ++-----
> drivers/iio/chemical/sgp30.c | 1 +
> drivers/iio/common/ms_sensors/ms_sensors_i2c.c | 2 +-
> drivers/iio/dac/ad5064.c | 10 +++++-----
> drivers/iio/dac/ad5360.c | 2 +-
> drivers/iio/dac/ad5380.c | 2 +-
> drivers/iio/dac/ad5421.c | 2 +-
> drivers/iio/dac/ad5446.c | 11 +++++++----
> drivers/iio/dac/ad5449.c | 2 +-
> drivers/iio/dac/ad5755.c | 2 +-
> drivers/iio/dac/ad5758.c | 18 +++++++++---------
> drivers/iio/dac/ad5761.c | 2 +-
> drivers/iio/dac/ad5764.c | 5 ++---
> drivers/iio/dac/ad5791.c | 10 ++++------
> drivers/iio/dac/ad7303.c | 5 ++++-
> drivers/iio/dummy/iio_dummy_evgen.c | 4 +++-
> drivers/iio/dummy/iio_simple_dummy.c | 7 ++++---
> drivers/iio/dummy/iio_simple_dummy_buffer.c | 4 ++--
> drivers/iio/dummy/iio_simple_dummy_events.c | 4 +++-
> drivers/iio/gyro/adis16080.c | 4 ++--
> drivers/iio/imu/kmx61.c | 14 +++++++-------
> drivers/iio/light/cm32181.c | 8 ++++----
> drivers/iio/magnetometer/mmc35240.c | 4 ++--
> 28 files changed, 81 insertions(+), 73 deletions(-)
>
On Thu, 16 Jul 2020 14:59:10 +0100
Lee Jones <[email protected]> wrote:
> Kerneldoc expects attributes/parameters to be in '@*.: ' format and
> gets confused if the variable does not follow the type/attribute
> definitions.
>
> Fixes the following W=1 kernel build warning(s):
>
> drivers/iio/gyro/adis16080.c:49: warning: Function parameter or member 'lock' not described in 'adis16080_state'
> drivers/iio/gyro/adis16080.c:49: warning: Function parameter or member '____cacheline_aligned' not described in 'adis16080_state'
>
> Cc: Michael Hennerich <[email protected]>
> Cc: Barry Song <[email protected]>
> Signed-off-by: Lee Jones <[email protected]>
Hmm. You are going to have an awful lot of those ____cacheline_aligned ones.
Might be worth thinking about whether we fix kernel-doc to cope with those.
A quick grep suggests the vast majority of users of this have it after
the element name.
@Jon Corbet : What do you think? Looks like there is special
handling already for ____cacheline_aligned_in_smp. Should we extend
that to this case?
Jonathan
> ---
> drivers/iio/gyro/adis16080.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/iio/gyro/adis16080.c b/drivers/iio/gyro/adis16080.c
> index 1b84b8e112fe1..f38f9abcccbb5 100644
> --- a/drivers/iio/gyro/adis16080.c
> +++ b/drivers/iio/gyro/adis16080.c
> @@ -38,14 +38,14 @@ struct adis16080_chip_info {
> * @us: actual spi_device to write data
> * @info: chip specific parameters
> * @buf: transmit or receive buffer
> - * @lock lock to protect buffer during reads
> + * @lock: lock to protect buffer during reads
> **/
> struct adis16080_state {
> struct spi_device *us;
> const struct adis16080_chip_info *info;
> struct mutex lock;
>
> - __be16 buf ____cacheline_aligned;
> + __be16 ____cacheline_aligned buf;
> };
>
> static int adis16080_read_sample(struct iio_dev *indio_dev,
On Thu, 16 Jul 2020 14:59:11 +0100
Lee Jones <[email protected]> wrote:
> File headers are not good candidates for kerneldoc.
>
> Fixes the following W=1 kernel build warning(s):
>
> drivers/iio/dummy/iio_simple_dummy_events.c:21: warning: Incorrect use of kernel-doc format: * iio_simple_dummy_read_event_config() - is event enabled?
> drivers/iio/dummy/iio_simple_dummy_events.c:34: warning: Function parameter or member 'indio_dev' not described in 'iio_simple_dummy_read_event_config'
> drivers/iio/dummy/iio_simple_dummy_events.c:34: warning: Function parameter or member 'chan' not described in 'iio_simple_dummy_read_event_config'
> drivers/iio/dummy/iio_simple_dummy_events.c:34: warning: Function parameter or member 'type' not described in 'iio_simple_dummy_read_event_config'
> drivers/iio/dummy/iio_simple_dummy_events.c:34: warning: Function parameter or member 'dir' not described in 'iio_simple_dummy_read_event_config'
> drivers/iio/dummy/iio_simple_dummy_events.c:123: warning: Function parameter or member 'val2' not described in 'iio_simple_dummy_read_event_value'
> drivers/iio/dummy/iio_simple_dummy_events.c:146: warning: Function parameter or member 'val2' not described in 'iio_simple_dummy_write_event_value'
>
> Signed-off-by: Lee Jones <[email protected]>
Applied.
J
> ---
> drivers/iio/dummy/iio_simple_dummy_events.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/iio/dummy/iio_simple_dummy_events.c b/drivers/iio/dummy/iio_simple_dummy_events.c
> index b3abaaca6f5ef..63a2b844be508 100644
> --- a/drivers/iio/dummy/iio_simple_dummy_events.c
> +++ b/drivers/iio/dummy/iio_simple_dummy_events.c
> @@ -1,5 +1,5 @@
> // SPDX-License-Identifier: GPL-2.0-only
> -/**
> +/*
> * Copyright (c) 2011 Jonathan Cameron
> *
> * Event handling elements of industrial I/O reference driver.
> @@ -107,6 +107,7 @@ int iio_simple_dummy_write_event_config(struct iio_dev *indio_dev,
> * @dir: direction of the vent whose value is being read
> * @info: info type of the event whose value is being read
> * @val: value for the event code.
> + * @val2: unused
> *
> * Many devices provide a large set of events of which only a subset may
> * be enabled at a time, with value registers whose meaning changes depending
> @@ -136,6 +137,7 @@ int iio_simple_dummy_read_event_value(struct iio_dev *indio_dev,
> * @dir: direction of the vent whose value is being set
> * @info: info type of the event whose value is being set
> * @val: the value to be set.
> + * @val2: unused
> */
> int iio_simple_dummy_write_event_value(struct iio_dev *indio_dev,
> const struct iio_chan_spec *chan,
On Sat, 18 Jul 2020, Jonathan Cameron wrote:
> On Thu, 16 Jul 2020 14:58:58 +0100
> Lee Jones <[email protected]> wrote:
>
> > 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.
> Thanks for these.
>
> One general comment is I'd have appreciated a spot of grouping to bring
> a particular group of identical problems together in the series.
> Example being the @lock(:) ones in this set.
There are a few reasons for me not doing this. Firstly, some of the
files experiencing 'lock:' issues had other problems which needed to
be dealt with anyway. I also do not know what other issues exist
before I start drafting patches - until now I have been going through
the list of issues, file-by-file, from top (first complained about) to
bottom. I have no mechanism (or desire) to pre-read 100's of lines of
warnings to see which ones could be easily grouped. I also wanted to
keep changes encapsulated into 1 patch per file, for bisectability and
revertability proposes.
I'm certainly not disagreeing or arguing with you, just explaining
that it is something that I've thought about.
> It doesn't matter that much though. I'm just being fussy :)
>
> Jonathan
>
> >
> > Lee Jones (30):
> > iio: adc: ad_sigma_delta: Remove unused variable 'ret'
> > iio: accel: bma220_spi: Do not define 'struct acpi_device_id' when
> > !CONFIG_ACPI
> > iio: common: ms_sensors: ms_sensors_i2c: Fix misspelling of parameter
> > 'client'
> > iio: adc: ad7298: Demote obvious misuse of kerneldoc to standard
> > comment blocks
> > iio: chemical: sgp30: Add description for sgp_read_cmd()'s
> > 'duration_us'
> > iio: adc: ad7923: Demote obvious misuse of kerneldoc to standard
> > comment blocks
> > iio: dac: ad5360: Fix kerneldoc attribute formatting for 'lock'
> > iio: dac: ad5380: Fix kerneldoc attribute formatting for 'lock'
> > iio: dummy: iio_simple_dummy: Demote unworthy kerneldocs and correct
> > misspelling
> > iio: dummy: iio_simple_dummy: Add newline after function-end
> > iio: dac: ad5421: Fix kerneldoc attribute formatting for 'lock'
> > iio: gyro: adis16080: Fix formatting issue and compiler attribute
> > ordering
> > iio: dummy: iio_simple_dummy_events: Demote file header and supply
> > descriptions for val2 params
> > iio: dac: ad5064: Value returned by ad5064_vref_name may not be 'const
> > * const'
> > iio: dummy: iio_dummy_evgen: Demote file header and supply description
> > for 'irq_sim_domain'
> > iio: adc: ad7887: Demote seemingly unintentional kerneldoc header
> > iio: adc: ad7949: Fix misspelling issue and compiler attribute
> > ordering
> > iio: dummy: iio_simple_dummy_buffer: Demote file header and correct
> > misspelling
> > iio: dac: ad5064: Fix a few kerneldoc misdemeanours
> > iio: dac: ad5446: Complete 'struct ad5446_state' doc and demote
> > unworthy kerneldocs
> > iio: dac: ad5449: Fix kerneldoc attribute formatting for 'lock'
> > iio: dac: ad5755: Fix kerneldoc attribute formatting for 'lock'
> > iio: dac: ad5758: Move and fix-up kerneldoc header and demote unworthy
> > kerneldoc
> > iio: dac: ad5761: Fix kerneldoc attribute formatting for 'lock'
> > iio: dac: ad5764: Fix misdocumenting and formatting error
> > iio: dac: ad5791: Complete 'struct ad5791_chip_info' documentation
> > iio: light: cm32181: Fix formatting and docrot issues in
> > cm32181_acpi_get_cpm()
> > iio: magnetometer: mmc35240: Fix function header formatting
> > iio: imu: kmx61: Fix formatting in kerneldoc function headers
> > iio: dac: ad7303: Complete 'struct ad7303_state' doc and reorder
> > compiler attribute
> >
> > drivers/iio/accel/bma220_spi.c | 2 ++
> > drivers/iio/adc/ad7298.c | 8 ++++----
> > drivers/iio/adc/ad7887.c | 2 +-
> > drivers/iio/adc/ad7923.c | 8 ++++----
> > drivers/iio/adc/ad7949.c | 4 ++--
> > drivers/iio/adc/ad_sigma_delta.c | 7 ++-----
> > drivers/iio/chemical/sgp30.c | 1 +
> > drivers/iio/common/ms_sensors/ms_sensors_i2c.c | 2 +-
> > drivers/iio/dac/ad5064.c | 10 +++++-----
> > drivers/iio/dac/ad5360.c | 2 +-
> > drivers/iio/dac/ad5380.c | 2 +-
> > drivers/iio/dac/ad5421.c | 2 +-
> > drivers/iio/dac/ad5446.c | 11 +++++++----
> > drivers/iio/dac/ad5449.c | 2 +-
> > drivers/iio/dac/ad5755.c | 2 +-
> > drivers/iio/dac/ad5758.c | 18 +++++++++---------
> > drivers/iio/dac/ad5761.c | 2 +-
> > drivers/iio/dac/ad5764.c | 5 ++---
> > drivers/iio/dac/ad5791.c | 10 ++++------
> > drivers/iio/dac/ad7303.c | 5 ++++-
> > drivers/iio/dummy/iio_dummy_evgen.c | 4 +++-
> > drivers/iio/dummy/iio_simple_dummy.c | 7 ++++---
> > drivers/iio/dummy/iio_simple_dummy_buffer.c | 4 ++--
> > drivers/iio/dummy/iio_simple_dummy_events.c | 4 +++-
> > drivers/iio/gyro/adis16080.c | 4 ++--
> > drivers/iio/imu/kmx61.c | 14 +++++++-------
> > drivers/iio/light/cm32181.c | 8 ++++----
> > drivers/iio/magnetometer/mmc35240.c | 4 ++--
> > 28 files changed, 81 insertions(+), 73 deletions(-)
> >
>
--
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog
On Sat, 18 Jul 2020 15:54:42 +0100
Jonathan Cameron <[email protected]> wrote:
> On Thu, 16 Jul 2020 14:59:10 +0100
> Lee Jones <[email protected]> wrote:
>
> > Kerneldoc expects attributes/parameters to be in '@*.: ' format and
> > gets confused if the variable does not follow the type/attribute
> > definitions.
> >
> > Fixes the following W=1 kernel build warning(s):
> >
> > drivers/iio/gyro/adis16080.c:49: warning: Function parameter or member 'lock' not described in 'adis16080_state'
> > drivers/iio/gyro/adis16080.c:49: warning: Function parameter or member '____cacheline_aligned' not described in 'adis16080_state'
> >
> > Cc: Michael Hennerich <[email protected]>
> > Cc: Barry Song <[email protected]>
> > Signed-off-by: Lee Jones <[email protected]>
> Hmm. You are going to have an awful lot of those ____cacheline_aligned ones.
>
> Might be worth thinking about whether we fix kernel-doc to cope with those.
>
> A quick grep suggests the vast majority of users of this have it after
> the element name.
>
> @Jon Corbet : What do you think? Looks like there is special
> handling already for ____cacheline_aligned_in_smp. Should we extend
> that to this case?
Applied with the ____cacheline_aligned bit dropped as Jon took the patch
to stop kernel-doc complaining about this.
thanks,
Jonathan
>
> Jonathan
>
>
>
> > ---
> > drivers/iio/gyro/adis16080.c | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/iio/gyro/adis16080.c b/drivers/iio/gyro/adis16080.c
> > index 1b84b8e112fe1..f38f9abcccbb5 100644
> > --- a/drivers/iio/gyro/adis16080.c
> > +++ b/drivers/iio/gyro/adis16080.c
> > @@ -38,14 +38,14 @@ struct adis16080_chip_info {
> > * @us: actual spi_device to write data
> > * @info: chip specific parameters
> > * @buf: transmit or receive buffer
> > - * @lock lock to protect buffer during reads
> > + * @lock: lock to protect buffer during reads
> > **/
> > struct adis16080_state {
> > struct spi_device *us;
> > const struct adis16080_chip_info *info;
> > struct mutex lock;
> >
> > - __be16 buf ____cacheline_aligned;
> > + __be16 ____cacheline_aligned buf;
> > };
> >
> > static int adis16080_read_sample(struct iio_dev *indio_dev,
>