Skip to contentSkip to conversation

First batch of W=1 fixes for IIO

PATCH Applied Lee Jones 4 participants 71 messages Jul 16, 2020 – Sep 17, 2020

Subsystems (6)
lore
Share & tools
lore

Lee Jones

author
#0 lore raw

cover First 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.

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(-)
Signature · 7 lines
2.25.1


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
author
#1 lore raw

PATCH 1/30 iio: adc: ad_sigma_delta: Remove unused variable 'ret'

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]>
---
 drivers/iio/adc/ad_sigma_delta.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)
drivers/iio/adc/ad_sigma_delta.c +2 -5
index dd3d54b3bc8bb..f269b926440da 100644
@@ -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;
 	}
 
Signature · 1 line
2.25.1
maintainer
#2 lore raw

Re: [PATCH 01/30] iio: adc: ad_sigma_delta: Remove unused variable 'ret'

Quoted 9 lines · 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]>

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

Quoted 33 lines
---
 drivers/iio/adc/ad_sigma_delta.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)
drivers/iio/adc/ad_sigma_delta.c +2 -5
index dd3d54b3bc8bb..f269b926440da 100644
@@ -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;
 	}
 
author
#3 lore raw

PATCH 2/30 iio: accel: bma220_spi: Do not define 'struct acpi_device_id' when !CONFIG_ACPI

In reply to Lee Jones

Since ACPI_PTR() is used to NULLify the value when !CONFIG_ACPI, struct 'bma220_acpi_id' becomes defined but unused.

Fixes the following W=1 kernel build warning(s):

drivers/iio/accel/bma220_spi.c:312:36: warning: ‘bma220_acpi_id’ defined but not used [-Wunused-const-variable=] 312 | static const struct acpi_device_id bma220_acpi_id[] = {
| ^~~~~~~~~~~~~~

Cc Tiberiu Breana <[email protected]>
---
 drivers/iio/accel/bma220_spi.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/iio/accel/bma220_spi.c +2 -0
index cae905039cb62..439618d815594 100644
@@ -309,12 +309,14 @@ static const struct spi_device_id bma220_spi_id[] = {
 	{}
 };
 
+#ifdef CONFIG_ACPI
 static const struct acpi_device_id bma220_acpi_id[] = {
 	{"BMA0220", 0},
 	{}
 };
 
 MODULE_DEVICE_TABLE(spi, bma220_spi_id);
+#endif
 
 static struct spi_driver bma220_driver = {
 	.driver = {
Signature · 1 line
2.25.1
maintainer
#4 lore raw

Re: [PATCH 02/30] iio: accel: bma220_spi: Do not define 'struct acpi_device_id' when !CONFIG_ACPI

Quoted 11 lines · On Thu, 16 Jul 2020 14:59:00 +0100 Lee Jones <[email protected]> wrote:

Since ACPI_PTR() is used to NULLify the value when !CONFIG_ACPI, struct 'bma220_acpi_id' becomes defined but unused.

Fixes the following W=1 kernel build warning(s):

drivers/iio/accel/bma220_spi.c:312:36: warning: ‘bma220_acpi_id’ defined but not used [-Wunused-const-variable=] 312 | static const struct acpi_device_id bma220_acpi_id[] = {
| ^~~~~~~~~~~~~~

Cc Tiberiu Breana <[email protected]>

Applied to the togreg branch of iio.git and pushed out as testing for the autobulders to play with it.

Thanks,

Jonathan

Quoted 23 lines
---
 drivers/iio/accel/bma220_spi.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/iio/accel/bma220_spi.c +2 -0
index cae905039cb62..439618d815594 100644
@@ -309,12 +309,14 @@ static const struct spi_device_id bma220_spi_id[] = {
 	{}
 };
 
+#ifdef CONFIG_ACPI
 static const struct acpi_device_id bma220_acpi_id[] = {
 	{"BMA0220", 0},
 	{}
 };
 
 MODULE_DEVICE_TABLE(spi, bma220_spi_id);
+#endif
 
 static struct spi_driver bma220_driver = {
 	.driver = {
author
#5 lore raw

PATCH 3/30 iio: common: ms_sensors: ms_sensors_i2c: Fix misspelling of parameter 'client'

In reply to Lee Jones

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]>
---
 drivers/iio/common/ms_sensors/ms_sensors_i2c.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/common/ms_sensors/ms_sensors_i2c.c +1 -1
index b52cba1b3c831..b9e2038d05ef4 100644
@@ -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.
Signature · 1 line
2.25.1
maintainer Applied
#6 lore raw

Re: [PATCH 03/30] iio: common: ms_sensors: ms_sensors_i2c: Fix misspelling of parameter 'client'

Quoted 10 lines · 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]>

Applied

Quoted 17 lines
---
 drivers/iio/common/ms_sensors/ms_sensors_i2c.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/common/ms_sensors/ms_sensors_i2c.c +1 -1
index b52cba1b3c831..b9e2038d05ef4 100644
@@ -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.
author
#7 lore raw

PATCH 4/30 iio: adc: ad7298: Demote obvious misuse of kerneldoc to standard comment blocks

In reply to Lee Jones

No attempt has been made to document either of the demoted functions here.

Fixes the following W=1 kernel build warning(s):

drivers/iio/adc/ad7298.c:106: warning: Function parameter or member 'indio_dev' not described in 'ad7298_update_scan_mode' drivers/iio/adc/ad7298.c:106: warning: Function parameter or member 'active_scan_mask' not described in 'ad7298_update_scan_mode' drivers/iio/adc/ad7298.c:154: warning: Function parameter or member 'irq' not described in 'ad7298_trigger_handler' drivers/iio/adc/ad7298.c:154: warning: Function parameter or member 'p' not described in 'ad7298_trigger_handler'

Cc Michael Hennerich <[email protected]>
---
 drivers/iio/adc/ad7298.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/iio/adc/ad7298.c +4 -4
index dc8d8c5f6ad36..006b6f63cf4e8 100644
@@ -98,9 +98,9 @@ static const struct iio_chan_spec ad7298_channels[] = {
 	IIO_CHAN_SOFT_TIMESTAMP(8),
 };
 
-/**
+/*
  * ad7298_update_scan_mode() setup the spi transfer buffer for the new scan mask
- **/
+ */
 static int ad7298_update_scan_mode(struct iio_dev *indio_dev,
 	const unsigned long *active_scan_mask)
 {
@@ -144,12 +144,12 @@ static int ad7298_update_scan_mode(struct iio_dev *indio_dev,
 	return 0;
 }
 
-/**
+/*
  * ad7298_trigger_handler() bh of trigger launched polling to ring buffer
  *
  * Currently there is no option in this driver to disable the saving of
  * timestamps within the ring.
- **/
+ */
 static irqreturn_t ad7298_trigger_handler(int irq, void *p)
 {
 	struct iio_poll_func *pf = p;
Signature · 1 line
2.25.1
maintainer
#8 lore raw

Re: [PATCH 04/30] iio: adc: ad7298: Demote obvious misuse of kerneldoc to standard comment blocks

Quoted 11 lines · On Thu, 16 Jul 2020 14:59:02 +0100 Lee Jones <[email protected]> wrote:

No attempt has been made to document either of the demoted functions here.

Fixes the following W=1 kernel build warning(s):

drivers/iio/adc/ad7298.c:106: warning: Function parameter or member 'indio_dev' not described in 'ad7298_update_scan_mode' drivers/iio/adc/ad7298.c:106: warning: Function parameter or member 'active_scan_mask' not described in 'ad7298_update_scan_mode' drivers/iio/adc/ad7298.c:154: warning: Function parameter or member 'irq' not described in 'ad7298_trigger_handler' drivers/iio/adc/ad7298.c:154: warning: Function parameter or member 'p' not described in 'ad7298_trigger_handler'

Cc Michael Hennerich <[email protected]>

As both are static, no particular reason they should have kernel-doc comments so agreed we are better fixing this one by demoting rather than adding the missing stuff.
Applied.

Quoted 35 lines
---
 drivers/iio/adc/ad7298.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/iio/adc/ad7298.c +4 -4
index dc8d8c5f6ad36..006b6f63cf4e8 100644
@@ -98,9 +98,9 @@ static const struct iio_chan_spec ad7298_channels[] = {
 	IIO_CHAN_SOFT_TIMESTAMP(8),
 };
 
-/**
+/*
  * ad7298_update_scan_mode() setup the spi transfer buffer for the new scan mask
- **/
+ */
 static int ad7298_update_scan_mode(struct iio_dev *indio_dev,
 	const unsigned long *active_scan_mask)
 {
@@ -144,12 +144,12 @@ static int ad7298_update_scan_mode(struct iio_dev *indio_dev,
 	return 0;
 }
 
-/**
+/*
  * ad7298_trigger_handler() bh of trigger launched polling to ring buffer
  *
  * Currently there is no option in this driver to disable the saving of
  * timestamps within the ring.
- **/
+ */
 static irqreturn_t ad7298_trigger_handler(int irq, void *p)
 {
 	struct iio_poll_func *pf = p;
author
#9 lore raw

PATCH 5/30 iio: chemical: sgp30: Add description for sgp_read_cmd()'s 'duration_us'

In reply to Lee Jones

Fixes the following W=1 kernel build warning(s):

drivers/iio/chemical/sgp30.c:236: warning: Function parameter or member 'duration_us' not described in 'sgp_read_cmd'

Cc Andreas Brauchli <[email protected]>
Cc Pascal Sachs <[email protected]>
---
 drivers/iio/chemical/sgp30.c | 1 +
 1 file changed, 1 insertion(+)
drivers/iio/chemical/sgp30.c +1 -0
index 403e8803471a9..82e407d48a0aa 100644
@@ -227,6 +227,7 @@ static int sgp_verify_buffer(const struct sgp_data *data,
  * @cmd:         SGP Command to issue
  * @buf:         Raw data buffer to use
  * @word_count:  Num words to read, excluding CRC bytes
+ * @duration_us: Time to sleep in microseconds
  *
  * Return:       0 on success, negative error otherwise.
  */
Signature · 1 line
2.25.1
maintainer
#10 lore raw

Re: [PATCH 05/30] iio: chemical: sgp30: Add description for sgp_read_cmd()'s 'duration_us'

Quoted 7 lines · On Thu, 16 Jul 2020 14:59:03 +0100 Lee Jones <[email protected]> wrote:

Fixes the following W=1 kernel build warning(s):

drivers/iio/chemical/sgp30.c:236: warning: Function parameter or member 'duration_us' not described in 'sgp_read_cmd'

Cc Andreas Brauchli <[email protected]>
Cc Pascal Sachs <[email protected]>

Perhaps we can do better on the wording.

drivers/iio/chemical/sgp30.c static int sgp_verify_buffer(const struct sgp_data *data, · line 230

Quoted 13 lines
---
 drivers/iio/chemical/sgp30.c | 1 +
 1 file changed, 1 insertion(+)
drivers/iio/chemical/sgp30.c +1 -0
index 403e8803471a9..82e407d48a0aa 100644
@@ -227,6 +227,7 @@ static int sgp_verify_buffer(const struct sgp_data *data,
  * @cmd:         SGP Command to issue
  * @buf:         Raw data buffer to use
  * @word_count:  Num words to read, excluding CRC bytes
+ * @duration_us: Time to sleep in microseconds

Time taken to sensor to take a reading and data to be ready.

Something like that maybe? I've not checked the datasheet but from code that looks to be what this describes..

Jonathan

Quoted 3 lines
drivers/iio/chemical/sgp30.c +0 -0
  *
  * Return:       0 on success, negative error otherwise.
  */
#11 lore raw

Re: [PATCH 05/30] iio: chemical: sgp30: Add description for sgp_read_cmd()'s 'duration_us'

Quoted 29 lines · On Sat, 18 Jul 2020 15:33:45 +0100 Jonathan Cameron <[email protected]> wrote:
Quoted 7 lines · On Thu, 16 Jul 2020 14:59:03 +0100 Lee Jones <[email protected]> wrote:

Fixes the following W=1 kernel build warning(s):

drivers/iio/chemical/sgp30.c:236: warning: Function parameter or member 'duration_us' not described in 'sgp_read_cmd'

Cc Andreas Brauchli <[email protected]>
Cc Pascal Sachs <[email protected]>

Perhaps we can do better on the wording.

drivers/iio/chemical/sgp30.c static int sgp_verify_buffer(const struct sgp_data *data, · line 230

Quoted 13 lines
---
 drivers/iio/chemical/sgp30.c | 1 +
 1 file changed, 1 insertion(+)
drivers/iio/chemical/sgp30.c +1 -0
index 403e8803471a9..82e407d48a0aa 100644
@@ -227,6 +227,7 @@ static int sgp_verify_buffer(const struct sgp_data *data,
  * @cmd:         SGP Command to issue
  * @buf:         Raw data buffer to use
  * @word_count:  Num words to read, excluding CRC bytes
+ * @duration_us: Time to sleep in microseconds  

Time taken to sensor to take a reading and data to be ready.

Quoted 2 lines

Something like that maybe? I've not checked the datasheet but from code that looks to be what this describes..

Tweaked and applied

Thanks,

Jonathan

Quoted 7 lines

Jonathan

Quoted 3 lines
drivers/iio/chemical/sgp30.c +0 -0
  *
  * Return:       0 on success, negative error otherwise.
  */  
author
#12 lore raw

PATCH 6/30 iio: adc: ad7923: Demote obvious misuse of kerneldoc to standard comment blocks

In reply to Lee Jones

No attempt has been made to document either of the demoted functions here

Fixes the following W=1 kernel build warning(s):

drivers/iio/adc/ad7923.c:159: warning: Function parameter or member 'indio_dev' not described in 'ad7923_update_scan_mode' drivers/iio/adc/ad7923.c:159: warning: Function parameter or member 'active_scan_mask' not described in 'ad7923_update_scan_mode' drivers/iio/adc/ad7923.c:202: warning: Function parameter or member 'irq' not described in 'ad7923_trigger_handler' drivers/iio/adc/ad7923.c:202: warning: Function parameter or member 'p' not described in 'ad7923_trigger_handler'

Cc Michael Hennerich <[email protected]>
Cc Patrick Vasseur <[email protected]>
---
 drivers/iio/adc/ad7923.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/iio/adc/ad7923.c +4 -4
index 1d124c87c6ace..2a11bc7fdb567 100644
@@ -151,9 +151,9 @@ static const struct ad7923_chip_info ad7923_chip_info[] = {
 	},
 };
 
-/**
+/*
  * ad7923_update_scan_mode() setup the spi transfer buffer for the new scan mask
- **/
+ */
 static int ad7923_update_scan_mode(struct iio_dev *indio_dev,
 				   const unsigned long *active_scan_mask)
 {
@@ -192,12 +192,12 @@ static int ad7923_update_scan_mode(struct iio_dev *indio_dev,
 	return 0;
 }
 
-/**
+/*
  * ad7923_trigger_handler() bh of trigger launched polling to ring buffer
  *
  * Currently there is no option in this driver to disable the saving of
  * timestamps within the ring.
- **/
+ */
 static irqreturn_t ad7923_trigger_handler(int irq, void *p)
 {
 	struct iio_poll_func *pf = p;
Signature · 1 line
2.25.1
maintainer
#13 lore raw

Re: [PATCH 06/30] iio: adc: ad7923: Demote obvious misuse of kerneldoc to standard comment blocks

Quoted 4 lines · On Thu, 16 Jul 2020 14:59:04 +0100 Lee Jones <[email protected]> wrote:

No attempt has been made to document either of the demoted functions here

Fixes the following W=1 kernel build warning(s):

Quoted 8 lines

drivers/iio/adc/ad7923.c:159: warning: Function parameter or member 'indio_dev' not described in 'ad7923_update_scan_mode' drivers/iio/adc/ad7923.c:159: warning: Function parameter or member 'active_scan_mask' not described in 'ad7923_update_scan_mode' drivers/iio/adc/ad7923.c:202: warning: Function parameter or member 'irq' not described in 'ad7923_trigger_handler' drivers/iio/adc/ad7923.c:202: warning: Function parameter or member 'p' not described in 'ad7923_trigger_handler'

Cc Michael Hennerich <[email protected]>
Cc Patrick Vasseur <[email protected]>

Both functions are static and hence don't need to be kernel-doc based, hence agree this is the best 'fix'.

Applied to the togreg branch of iio.git and pushed out as testing for the autobuilders to play with it.

Thanks,

Jonathan

Quoted 35 lines
---
 drivers/iio/adc/ad7923.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/iio/adc/ad7923.c +4 -4
index 1d124c87c6ace..2a11bc7fdb567 100644
@@ -151,9 +151,9 @@ static const struct ad7923_chip_info ad7923_chip_info[] = {
 	},
 };
 
-/**
+/*
  * ad7923_update_scan_mode() setup the spi transfer buffer for the new scan mask
- **/
+ */
 static int ad7923_update_scan_mode(struct iio_dev *indio_dev,
 				   const unsigned long *active_scan_mask)
 {
@@ -192,12 +192,12 @@ static int ad7923_update_scan_mode(struct iio_dev *indio_dev,
 	return 0;
 }
 
-/**
+/*
  * ad7923_trigger_handler() bh of trigger launched polling to ring buffer
  *
  * Currently there is no option in this driver to disable the saving of
  * timestamps within the ring.
- **/
+ */
 static irqreturn_t ad7923_trigger_handler(int irq, void *p)
 {
 	struct iio_poll_func *pf = p;
author
#14 lore raw

PATCH 7/30 iio: dac: ad5360: Fix kerneldoc attribute formatting for 'lock'

In reply to Lee Jones

Kerneldoc expects attributes/parameters to be in '@*.: ' format.

Fixes the following W=1 kernel build warning(s):

drivers/iio/dac/ad5360.c:89: warning: Function parameter or member 'lock' not described in 'ad5360_state'

Cc Michael Hennerich <[email protected]>
---
 drivers/iio/dac/ad5360.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/dac/ad5360.c +1 -1
index 3e0c9e84e8dab..e2a2473bfed77 100644
@@ -67,7 +67,7 @@ struct ad5360_chip_info {
  * @chip_info:		chip model specific constants, available modes etc
  * @vref_reg:		vref supply regulators
  * @ctrl:		control register cache
- * @lock		lock to protect the data buffer during SPI ops
+ * @lock:		lock to protect the data buffer during SPI ops
  * @data:		spi transfer buffers
  */
 
Signature · 1 line
2.25.1
maintainer Applied
#15 lore raw

Re: [PATCH 07/30] iio: dac: ad5360: Fix kerneldoc attribute formatting for 'lock'

Quoted 8 lines · On Thu, 16 Jul 2020 14:59:05 +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/ad5360.c:89: warning: Function parameter or member 'lock' not described in 'ad5360_state'

Cc Michael Hennerich <[email protected]>

Applied.

Quoted 17 lines
---
 drivers/iio/dac/ad5360.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/dac/ad5360.c +1 -1
index 3e0c9e84e8dab..e2a2473bfed77 100644
@@ -67,7 +67,7 @@ struct ad5360_chip_info {
  * @chip_info:		chip model specific constants, available modes etc
  * @vref_reg:		vref supply regulators
  * @ctrl:		control register cache
- * @lock		lock to protect the data buffer during SPI ops
+ * @lock:		lock to protect the data buffer during SPI ops
  * @data:		spi transfer buffers
  */
 
author
#16 lore raw

PATCH 8/30 iio: dac: ad5380: Fix kerneldoc attribute formatting for 'lock'

In reply to Lee Jones

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]>
---
 drivers/iio/dac/ad5380.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/dac/ad5380.c +1 -1
index b37e5675f7162..fd3358cccc7c5 100644
@@ -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 {
Signature · 1 line
2.25.1
maintainer Applied
#17 lore raw

Re: [PATCH 08/30] iio: dac: ad5380: Fix kerneldoc attribute formatting for 'lock'

Quoted 8 lines · 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]>

Applied.

Quoted 17 lines
---
 drivers/iio/dac/ad5380.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/dac/ad5380.c +1 -1
index b37e5675f7162..fd3358cccc7c5 100644
@@ -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 {
author
#18 lore raw

PATCH 9/30 iio: dummy: iio_simple_dummy: Demote unworthy kerneldocs and correct misspelling

In reply to Lee Jones

File header comments are not good candidates for kerneldoc. Neither are generic comment blocks.

Fixes the following W=1 kernel build warning(s):

drivers/iio/dummy/iio_simple_dummy.c:26: warning: cannot understand function prototype: 'const struct config_item_type iio_dummy_type = ' drivers/iio/dummy/iio_simple_dummy.c:564: warning: Function parameter or member 'name' not described in 'iio_dummy_probe' drivers/iio/dummy/iio_simple_dummy.c:564: warning: Excess function parameter 'index' description in 'iio_dummy_probe' drivers/iio/dummy/iio_simple_dummy.c:700: warning: cannot understand function prototype: 'const struct iio_sw_device_ops iio_dummy_device_ops = '

---
 drivers/iio/dummy/iio_simple_dummy.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/iio/dummy/iio_simple_dummy.c +3 -3
index 6cb02299a2152..be66b26373723 100644
@@ -1,5 +1,5 @@
 // SPDX-License-Identifier: GPL-2.0-only
-/**
+/*
  * Copyright (c) 2011 Jonathan Cameron
  *
  * A reference industrial I/O driver to illustrate the functionality available.
@@ -553,7 +553,7 @@ static int iio_dummy_init_device(struct iio_dev *indio_dev)
 
 /**
  * iio_dummy_probe() - device instance probe
- * @index: an id number for this instance.
+ * @name: name of this instance.
  *
  * Arguments are bus type specific.
  * I2C: iio_dummy_probe(struct i2c_client *client,
@@ -687,7 +687,7 @@ static int iio_dummy_remove(struct iio_sw_device *swd)
 
 	return 0;
 }
-/**
+/*
  * module_iio_sw_device_driver() -  device driver registration
  *
  * Varies depending on bus type of the device. As there is no device
Signature · 1 line
2.25.1
maintainer Applied
#19 lore raw

Re: [PATCH 09/30] iio: dummy: iio_simple_dummy: Demote unworthy kerneldocs and correct misspelling

Quoted 10 lines · On Thu, 16 Jul 2020 14:59:07 +0100 Lee Jones <[email protected]> wrote:

File header comments are not good candidates for kerneldoc. Neither are generic comment blocks.

Fixes the following W=1 kernel build warning(s):

drivers/iio/dummy/iio_simple_dummy.c:26: warning: cannot understand function prototype: 'const struct config_item_type iio_dummy_type = ' drivers/iio/dummy/iio_simple_dummy.c:564: warning: Function parameter or member 'name' not described in 'iio_dummy_probe' drivers/iio/dummy/iio_simple_dummy.c:564: warning: Excess function parameter 'index' description in 'iio_dummy_probe' drivers/iio/dummy/iio_simple_dummy.c:700: warning: cannot understand function prototype: 'const struct iio_sw_device_ops iio_dummy_device_ops = '

Misspelling is an interesting way of describing that part. I changed it to "wrong parameter in docs".

Applied.

Quoted 34 lines
---
 drivers/iio/dummy/iio_simple_dummy.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/iio/dummy/iio_simple_dummy.c +3 -3
index 6cb02299a2152..be66b26373723 100644
@@ -1,5 +1,5 @@
 // SPDX-License-Identifier: GPL-2.0-only
-/**
+/*
  * Copyright (c) 2011 Jonathan Cameron
  *
  * A reference industrial I/O driver to illustrate the functionality available.
@@ -553,7 +553,7 @@ static int iio_dummy_init_device(struct iio_dev *indio_dev)
 
 /**
  * iio_dummy_probe() - device instance probe
- * @index: an id number for this instance.
+ * @name: name of this instance.
  *
  * Arguments are bus type specific.
  * I2C: iio_dummy_probe(struct i2c_client *client,
@@ -687,7 +687,7 @@ static int iio_dummy_remove(struct iio_sw_device *swd)
 
 	return 0;
 }
-/**
+/*
  * module_iio_sw_device_driver() -  device driver registration
  *
  * Varies depending on bus type of the device. As there is no device
author
#20 lore raw

PATCH 10/30 iio: dummy: iio_simple_dummy: Add newline after function-end

In reply to Lee Jones

Fixes the following checkpatch.pl warning(s):

CHECK: Please use a blank line after function/struct/union/enum declarations #46: FILE: drivers/iio/dummy/iio_simple_dummy.c:690:
}
+/*
total: 0 errors, 0 warnings, 1 checks, 22 lines checked

---
 drivers/iio/dummy/iio_simple_dummy.c | 1 +
 1 file changed, 1 insertion(+)
drivers/iio/dummy/iio_simple_dummy.c +1 -0
index be66b26373723..cc4335963d0cf 100644
@@ -687,6 +687,7 @@ static int iio_dummy_remove(struct iio_sw_device *swd)
 
 	return 0;
 }
+
 /*
  * module_iio_sw_device_driver() -  device driver registration
  *
Signature · 1 line
2.25.1
maintainer Applied
#21 lore raw

Re: [PATCH 10/30] iio: dummy: iio_simple_dummy: Add newline after function-end

Quoted 9 lines · On Thu, 16 Jul 2020 14:59:08 +0100 Lee Jones <[email protected]> wrote:

Fixes the following checkpatch.pl warning(s):

CHECK: Please use a blank line after function/struct/union/enum declarations #46: FILE: drivers/iio/dummy/iio_simple_dummy.c:690:
}
+/*
total: 0 errors, 0 warnings, 1 checks, 22 lines checked

Applied

Quoted 16 lines
---
 drivers/iio/dummy/iio_simple_dummy.c | 1 +
 1 file changed, 1 insertion(+)
drivers/iio/dummy/iio_simple_dummy.c +1 -0
index be66b26373723..cc4335963d0cf 100644
@@ -687,6 +687,7 @@ static int iio_dummy_remove(struct iio_sw_device *swd)
 
 	return 0;
 }
+
 /*
  * module_iio_sw_device_driver() -  device driver registration
  *
author
#22 lore raw

PATCH 11/30 iio: dac: ad5421: Fix kerneldoc attribute formatting for 'lock'

In reply to Lee Jones

Kerneldoc expects attributes/parameters to be in '@*.: ' format.

Fixes the following W=1 kernel build warning(s):

drivers/iio/dac/ad5421.c:82: warning: Function parameter or member 'lock' not described in 'ad5421_state'

Cc Michael Hennerich <[email protected]>
---
 drivers/iio/dac/ad5421.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/dac/ad5421.c +1 -1
index fec27764cea88..95466c86f207a 100644
@@ -62,7 +62,7 @@
  * @current_range:	current range which the device is configured for
  * @data:		spi transfer buffers
  * @fault_mask:		software masking of events
- * @lock	lock to protect the data buffer during SPI ops
+ * @lock:		lock to protect the data buffer during SPI ops
  */
 struct ad5421_state {
 	struct spi_device		*spi;
Signature · 1 line
2.25.1
maintainer Applied
#23 lore raw

Re: [PATCH 11/30] iio: dac: ad5421: Fix kerneldoc attribute formatting for 'lock'

Quoted 8 lines · On Thu, 16 Jul 2020 14:59:09 +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/ad5421.c:82: warning: Function parameter or member 'lock' not described in 'ad5421_state'

Cc Michael Hennerich <[email protected]>

Applied

Thanks,

J

Quoted 17 lines
---
 drivers/iio/dac/ad5421.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/dac/ad5421.c +1 -1
index fec27764cea88..95466c86f207a 100644
@@ -62,7 +62,7 @@
  * @current_range:	current range which the device is configured for
  * @data:		spi transfer buffers
  * @fault_mask:		software masking of events
- * @lock	lock to protect the data buffer during SPI ops
+ * @lock:		lock to protect the data buffer during SPI ops
  */
 struct ad5421_state {
 	struct spi_device		*spi;
author
#24 lore raw

PATCH 12/30 iio: gyro: adis16080: Fix formatting issue and compiler attribute ordering

In reply to Lee Jones

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]>
---
 drivers/iio/gyro/adis16080.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/iio/gyro/adis16080.c +2 -2
index 1b84b8e112fe1..f38f9abcccbb5 100644
@@ -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,
Signature · 1 line
2.25.1
maintainer
#25 lore raw

Re: [PATCH 12/30] iio: gyro: adis16080: Fix formatting issue and compiler attribute ordering

Quoted 4 lines · 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.

Quoted 8 lines

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]>

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

Quoted 25 lines
---
 drivers/iio/gyro/adis16080.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/iio/gyro/adis16080.c +2 -2
index 1b84b8e112fe1..f38f9abcccbb5 100644
@@ -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,
#26 lore raw

Re: [PATCH 12/30] iio: gyro: adis16080: Fix formatting issue and compiler attribute ordering

Quoted 17 lines · On Sat, 18 Jul 2020 15:54:42 +0100 Jonathan Cameron <[email protected]> wrote:
Quoted 4 lines · 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.

Quoted 8 lines

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]>

Hmm. You are going to have an awful lot of those ____cacheline_aligned ones.

Quoted 8 lines

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

Quoted 31 lines

Jonathan

Quoted 25 lines
---
 drivers/iio/gyro/adis16080.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/iio/gyro/adis16080.c +2 -2
index 1b84b8e112fe1..f38f9abcccbb5 100644
@@ -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,  
author
#27 lore raw

PATCH 13/30 iio: dummy: iio_simple_dummy_events: Demote file header and supply descriptions for val2 params

In reply to Lee Jones

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'

---
 drivers/iio/dummy/iio_simple_dummy_events.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/iio/dummy/iio_simple_dummy_events.c +3 -1
index b3abaaca6f5ef..63a2b844be508 100644
@@ -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,
Signature · 1 line
2.25.1
maintainer Applied
#28 lore raw

Re: [PATCH 13/30] iio: dummy: iio_simple_dummy_events: Demote file header and supply descriptions for val2 params

Quoted 12 lines · 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'

Quoted 1 line

Applied.

J

Quoted 31 lines
---
 drivers/iio/dummy/iio_simple_dummy_events.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/iio/dummy/iio_simple_dummy_events.c +3 -1
index b3abaaca6f5ef..63a2b844be508 100644
@@ -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,
author
#29 lore raw

PATCH 14/30 iio: dac: ad5064: Value returned by ad5064_vref_name may not be 'const * const'

In reply to Lee Jones

Fixes the following W=1 kernel build warning(s):

drivers/iio/dac/ad5064.c:790:8: warning: type qualifiers ignored on function return type [-Wignored-qualifiers] 790 | static const char * const ad5064_vref_name(struct ad5064_state *st,
| ^~~~~

Cc Michael Hennerich <[email protected]>
---
 drivers/iio/dac/ad5064.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/dac/ad5064.c +1 -1
index d33642de9720e..303f6d1a5f311 100644
@@ -787,7 +787,7 @@ static const char * const ad5064_vref_names[] = {
 	"vrefD",
 };
 
-static const char * const ad5064_vref_name(struct ad5064_state *st,
+static const char *ad5064_vref_name(struct ad5064_state *st,
 	unsigned int vref)
 {
 	return st->chip_info->shared_vref ? "vref" : ad5064_vref_names[vref];
Signature · 1 line
2.25.1
maintainer Applied
#30 lore raw

Re: [PATCH 14/30] iio: dac: ad5064: Value returned by ad5064_vref_name may not be 'const * const'

Quoted 8 lines · On Thu, 16 Jul 2020 14:59:12 +0100 Lee Jones <[email protected]> wrote:

Fixes the following W=1 kernel build warning(s):

drivers/iio/dac/ad5064.c:790:8: warning: type qualifiers ignored on function return type [-Wignored-qualifiers] 790 | static const char * const ad5064_vref_name(struct ad5064_state *st,
| ^~~~~

Cc Michael Hennerich <[email protected]>

Applied.

Thanks,

Jonathan

Quoted 17 lines
---
 drivers/iio/dac/ad5064.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/dac/ad5064.c +1 -1
index d33642de9720e..303f6d1a5f311 100644
@@ -787,7 +787,7 @@ static const char * const ad5064_vref_names[] = {
 	"vrefD",
 };
 
-static const char * const ad5064_vref_name(struct ad5064_state *st,
+static const char *ad5064_vref_name(struct ad5064_state *st,
 	unsigned int vref)
 {
 	return st->chip_info->shared_vref ? "vref" : ad5064_vref_names[vref];
author
#31 lore raw

PATCH 15/30 iio: dummy: iio_dummy_evgen: Demote file header and supply description for 'irq_sim_domain'

In reply to Lee Jones

File headers are not good candidates for kerneldoc.

Fixes the following W=1 kernel build warning(s):

drivers/iio/dummy/iio_dummy_evgen.c:30: warning: Cannot understand * @regs: irq regs we are faking
on line 30 - I thought it was a doc line
drivers/iio/dummy/iio_dummy_evgen.c:42: warning: Function parameter or member 'irq_sim_domain' not described in 'iio_dummy_eventgen'

Cc Marc Zyngier <[email protected]>
Cc Bartosz Golaszewski <[email protected]>
---
 drivers/iio/dummy/iio_dummy_evgen.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/iio/dummy/iio_dummy_evgen.c +3 -1
index ee85d596e5284..1febbbff0ded6 100644
@@ -1,5 +1,5 @@
 // SPDX-License-Identifier: GPL-2.0-only
-/**
+/*
  * Copyright (c) 2011 Jonathan Cameron
  *
  * Companion module to the iio simple dummy example driver.
@@ -27,11 +27,13 @@
 #define IIO_EVENTGEN_NO 10
 
 /**
+ * struct iio_dummy_eventgen
  * @regs: irq regs we are faking
  * @lock: protect the evgen state
  * @inuse: mask of which irqs are connected
  * @irq_sim: interrupt simulator
  * @base: base of irq range
+ * @irq_sim_domain: irq domain
  */
 struct iio_dummy_eventgen {
 	struct iio_dummy_regs regs[IIO_EVENTGEN_NO];
Signature · 1 line
2.25.1
#32 lore raw

Re: [PATCH 15/30] iio: dummy: iio_dummy_evgen: Demote file header and supply description for 'irq_sim_domain'

Quoted 28 lines · Lee Jones

File headers are not good candidates for kerneldoc.

Fixes the following W=1 kernel build warning(s):

drivers/iio/dummy/iio_dummy_evgen.c:30: warning: Cannot understand * @regs: irq regs we are faking
on line 30 - I thought it was a doc line
drivers/iio/dummy/iio_dummy_evgen.c:42: warning: Function parameter or member 'irq_sim_domain' not described in 'iio_dummy_eventgen'

Cc Marc Zyngier <[email protected]>
Cc Bartosz Golaszewski <[email protected]>
---
 drivers/iio/dummy/iio_dummy_evgen.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/iio/dummy/iio_dummy_evgen.c +1 -1
index ee85d596e5284..1febbbff0ded6 100644
@@ -1,5 +1,5 @@
 // SPDX-License-Identifier: GPL-2.0-only
-/**
+/*
  * Copyright (c) 2011 Jonathan Cameron
  *
  * Companion module to the iio simple dummy example driver.

drivers/iio/dummy/iio_dummy_evgen.c line 36

Quoted 10 lines
drivers/iio/dummy/iio_dummy_evgen.c +2 -0
@@ -27,11 +27,13 @@
 #define IIO_EVENTGEN_NO 10
 
 /**
+ * struct iio_dummy_eventgen
  * @regs: irq regs we are faking
  * @lock: protect the evgen state
  * @inuse: mask of which irqs are connected
  * @irq_sim: interrupt simulator
  * @base: base of irq range
+ * @irq_sim_domain: irq domain

To be even more clear: this could say: "interrupt simulator domain".

Bartosz

Quoted 6 lines
drivers/iio/dummy/iio_dummy_evgen.c +0 -1
  */
 struct iio_dummy_eventgen {
        struct iio_dummy_regs regs[IIO_EVENTGEN_NO];
--

2.25.1

maintainer
#33 lore raw

Re: [PATCH 15/30] iio: dummy: iio_dummy_evgen: Demote file header and supply description for 'irq_sim_domain'

Quoted 31 lines · On Sat, 18 Jul 2020 11:24:40 +0200 Bartosz Golaszewski…
Quoted 30 lines · Lee Jones

File headers are not good candidates for kerneldoc.

Fixes the following W=1 kernel build warning(s):

drivers/iio/dummy/iio_dummy_evgen.c:30: warning: Cannot understand * @regs: irq regs we are faking
on line 30 - I thought it was a doc line
drivers/iio/dummy/iio_dummy_evgen.c:42: warning: Function parameter or member 'irq_sim_domain' not described in 'iio_dummy_eventgen'

Cc Marc Zyngier <[email protected]>
Cc Bartosz Golaszewski <[email protected]>
---
 drivers/iio/dummy/iio_dummy_evgen.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/iio/dummy/iio_dummy_evgen.c +1 -1
index ee85d596e5284..1febbbff0ded6 100644
@@ -1,5 +1,5 @@
 // SPDX-License-Identifier: GPL-2.0-only
-/**
+/*
  * Copyright (c) 2011 Jonathan Cameron
  *
  * Companion module to the iio simple dummy example driver.
@@ -27,11 +27,13 @@
 #define IIO_EVENTGEN_NO 10
 
Quoted 2 lines

drivers/iio/dummy/iio_dummy_evgen.c line 30

Quoted 2 lines
drivers/iio/dummy/iio_dummy_evgen.c +1 -0
 /**
+ * struct iio_dummy_eventgen

Good to say what this structure is. Perhaps "event generator specific state"

Quoted 17 lines

drivers/iio/dummy/iio_dummy_evgen.c line 36

Quoted 6 lines
drivers/iio/dummy/iio_dummy_evgen.c +1 -0
  * @regs: irq regs we are faking
  * @lock: protect the evgen state
  * @inuse: mask of which irqs are connected
  * @irq_sim: interrupt simulator
  * @base: base of irq range
+ * @irq_sim_domain: irq domain  

To be even more clear: this could say: "interrupt simulator domain".

Bartosz

Quoted 6 lines
drivers/iio/dummy/iio_dummy_evgen.c +0 -1
  */
 struct iio_dummy_eventgen {
        struct iio_dummy_regs regs[IIO_EVENTGEN_NO];
--

2.25.1

#34 lore raw

Re: [PATCH 15/30] iio: dummy: iio_dummy_evgen: Demote file header and supply description for 'irq_sim_domain'

Quoted 34 lines · On Sat, 18 Jul 2020 16:00:46 +0100 Jonathan Cameron <[email protected]> wrote:
Quoted 31 lines · On Sat, 18 Jul 2020 11:24:40 +0200 Bartosz Golaszewski…
Quoted 30 lines · Lee Jones

File headers are not good candidates for kerneldoc.

Fixes the following W=1 kernel build warning(s):

drivers/iio/dummy/iio_dummy_evgen.c:30: warning: Cannot understand * @regs: irq regs we are faking
on line 30 - I thought it was a doc line
drivers/iio/dummy/iio_dummy_evgen.c:42: warning: Function parameter or member 'irq_sim_domain' not described in 'iio_dummy_eventgen'

Cc Marc Zyngier <[email protected]>
Cc Bartosz Golaszewski <[email protected]>
---
 drivers/iio/dummy/iio_dummy_evgen.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/iio/dummy/iio_dummy_evgen.c +1 -1
index ee85d596e5284..1febbbff0ded6 100644
@@ -1,5 +1,5 @@
 // SPDX-License-Identifier: GPL-2.0-only
-/**
+/*
  * Copyright (c) 2011 Jonathan Cameron
  *
  * Companion module to the iio simple dummy example driver.
@@ -27,11 +27,13 @@
 #define IIO_EVENTGEN_NO 10
 
Quoted 15 lines
Quoted 2 lines

drivers/iio/dummy/iio_dummy_evgen.c line 30

Quoted 2 lines
drivers/iio/dummy/iio_dummy_evgen.c +1 -0
 /**
+ * struct iio_dummy_eventgen  

Good to say what this structure is. Perhaps "event generator specific state"

Quoted 10 lines

drivers/iio/dummy/iio_dummy_evgen.c line 36

Quoted 6 lines
drivers/iio/dummy/iio_dummy_evgen.c +1 -0
  * @regs: irq regs we are faking
  * @lock: protect the evgen state
  * @inuse: mask of which irqs are connected
  * @irq_sim: interrupt simulator
  * @base: base of irq range
+ * @irq_sim_domain: irq domain    

To be even more clear: this could say: "interrupt simulator domain".

Bartosz

Tweaked during applying and applied.

Quoted 8 lines
Quoted 7 lines
Quoted 7 lines
drivers/iio/dummy/iio_dummy_evgen.c +0 -1
  */
 struct iio_dummy_eventgen {
        struct iio_dummy_regs regs[IIO_EVENTGEN_NO];
--

2.25.1

author
#35 lore raw

PATCH 16/30 iio: adc: ad7887: Demote seemingly unintentional kerneldoc header

In reply to Lee Jones

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/ad7887.c:119: warning: Function parameter or member 'irq' not described in 'ad7887_trigger_handler' drivers/iio/adc/ad7887.c:119: warning: Function parameter or member 'p' not described in 'ad7887_trigger_handler'

Cc Michael Hennerich <[email protected]>
---
 drivers/iio/adc/ad7887.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/adc/ad7887.c +1 -1
index c6a3428e950a9..bbaa0a3daea3c 100644
@@ -109,7 +109,7 @@ static int ad7887_ring_postdisable(struct iio_dev *indio_dev)
 	return spi_sync(st->spi, &st->msg[AD7887_CH0]);
 }
 
-/**
+/*
  * ad7887_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
maintainer Applied
#36 lore raw

Re: [PATCH 16/30] iio: adc: ad7887: Demote seemingly unintentional kerneldoc header

Quoted 10 lines · On Thu, 16 Jul 2020 14:59:14 +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/ad7887.c:119: warning: Function parameter or member 'irq' not described in 'ad7887_trigger_handler' drivers/iio/adc/ad7887.c:119: warning: Function parameter or member 'p' not described in 'ad7887_trigger_handler'

Cc Michael Hennerich <[email protected]>

Applied.

Thanks,

Jonathan

Quoted 17 lines
---
 drivers/iio/adc/ad7887.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/adc/ad7887.c +1 -1
index c6a3428e950a9..bbaa0a3daea3c 100644
@@ -109,7 +109,7 @@ static int ad7887_ring_postdisable(struct iio_dev *indio_dev)
 	return spi_sync(st->spi, &st->msg[AD7887_CH0]);
 }
 
-/**
+/*
  * ad7887_trigger_handler() bh of trigger launched polling to ring buffer
  *
  * Currently there is no option in this driver to disable the saving of
author
#37 lore raw

PATCH 17/30 iio: adc: ad7949: Fix misspelling issue and compiler attribute ordering

In reply to Lee Jones

Kerneldoc gets confused if the variable does not follow the type/attribute definitions.

Fixes the following W=1 kernel build warning(s):

drivers/iio/adc/ad7949.c:58: warning: Function parameter or member 'indio_dev' not described in 'ad7949_adc_chip' drivers/iio/adc/ad7949.c:58: warning: Function parameter or member '____cacheline_aligned' not described in 'ad7949_adc_chip'

Cc Michael Hennerich <[email protected]>
Cc Charles-Antoine Couret <[email protected]>
---
 drivers/iio/adc/ad7949.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/iio/adc/ad7949.c +2 -2
index 2c6f60edb7ced..a3fc42617feb9 100644
@@ -39,7 +39,7 @@ static const struct ad7949_adc_spec ad7949_adc_spec[] = {
  * struct ad7949_adc_chip - AD ADC chip
  * @lock: protects write sequences
  * @vref: regulator generating Vref
- * @iio_dev: reference to iio structure
+ * @indio_dev: reference to iio structure
  * @spi: reference to spi structure
  * @resolution: resolution of the chip
  * @cfg: copy of the configuration register
@@ -54,7 +54,7 @@ struct ad7949_adc_chip {
 	u8 resolution;
 	u16 cfg;
 	unsigned int current_channel;
-	u16 buffer ____cacheline_aligned;
+	u16 ____cacheline_aligned buffer;
 };
 
 static int ad7949_spi_write_cfg(struct ad7949_adc_chip *ad7949_adc, u16 val,
Signature · 1 line
2.25.1
maintainer
#38 lore raw

Re: [PATCH 17/30] iio: adc: ad7949: Fix misspelling issue and compiler attribute ordering

Quoted 7 lines · On Thu, 16 Jul 2020 14:59:15 +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/adc/ad7949.c:58: warning: Function parameter or member 'indio_dev' not described in 'ad7949_adc_chip' drivers/iio/adc/ad7949.c:58: warning: Function parameter or member '____cacheline_aligned' not described in 'ad7949_adc_chip'

Holding this one pending discussion of whether to add ___cacheline_aligned to the stuff kernel-doc effectively skips when processing structures.

Jonathan

Quoted 30 lines
Cc Michael Hennerich <[email protected]>
Cc Charles-Antoine Couret <[email protected]>
---
 drivers/iio/adc/ad7949.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/iio/adc/ad7949.c +2 -2
index 2c6f60edb7ced..a3fc42617feb9 100644
@@ -39,7 +39,7 @@ static const struct ad7949_adc_spec ad7949_adc_spec[] = {
  * struct ad7949_adc_chip - AD ADC chip
  * @lock: protects write sequences
  * @vref: regulator generating Vref
- * @iio_dev: reference to iio structure
+ * @indio_dev: reference to iio structure
  * @spi: reference to spi structure
  * @resolution: resolution of the chip
  * @cfg: copy of the configuration register
@@ -54,7 +54,7 @@ struct ad7949_adc_chip {
 	u8 resolution;
 	u16 cfg;
 	unsigned int current_channel;
-	u16 buffer ____cacheline_aligned;
+	u16 ____cacheline_aligned buffer;
 };
 
 static int ad7949_spi_write_cfg(struct ad7949_adc_chip *ad7949_adc, u16 val,
author
#39 lore raw

PATCH 18/30 iio: dummy: iio_simple_dummy_buffer: Demote file header and correct misspelling

In reply to Lee Jones

File headers are not good candidates for kerneldoc.

Fixes the following W=1 kernel build warning(s):

drivers/iio/dummy/iio_simple_dummy_buffer.c:27: warning: cannot understand function prototype: 'const s16 fakedata[] = ' drivers/iio/dummy/iio_simple_dummy_buffer.c:185: warning: Function parameter or member 'indio_dev' not described in 'iio_simple_dummy_unconfigure_buffer' drivers/iio/dummy/iio_simple_dummy_buffer.c:185: warning: Excess function parameter 'indo_dev' description in 'iio_simple_dummy_unconfigure_buffer'

---
 drivers/iio/dummy/iio_simple_dummy_buffer.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/iio/dummy/iio_simple_dummy_buffer.c +2 -2
index 17606eca42b43..40d30c0a60ce5 100644
@@ -1,5 +1,5 @@
 // SPDX-License-Identifier: GPL-2.0-only
-/**
+/*
  * Copyright (c) 2011 Jonathan Cameron
  *
  * Buffer handling elements of industrial I/O reference driver.
@@ -179,7 +179,7 @@ int iio_simple_dummy_configure_buffer(struct iio_dev *indio_dev)
 
 /**
  * iio_simple_dummy_unconfigure_buffer() - release buffer resources
- * @indo_dev: device instance state
+ * @indio_dev: device instance state
  */
 void iio_simple_dummy_unconfigure_buffer(struct iio_dev *indio_dev)
 {
Signature · 1 line
2.25.1
maintainer Applied
#40 lore raw

Re: [PATCH 18/30] iio: dummy: iio_simple_dummy_buffer: Demote file header and correct misspelling

Quoted 9 lines · On Thu, 16 Jul 2020 14:59:16 +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_buffer.c:27: warning: cannot understand function prototype: 'const s16 fakedata[] = ' drivers/iio/dummy/iio_simple_dummy_buffer.c:185: warning: Function parameter or member 'indio_dev' not described in 'iio_simple_dummy_unconfigure_buffer' drivers/iio/dummy/iio_simple_dummy_buffer.c:185: warning: Excess function parameter 'indo_dev' description in 'iio_simple_dummy_unconfigure_buffer'

Applied.

Jonathan

Quoted 24 lines
---
 drivers/iio/dummy/iio_simple_dummy_buffer.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/iio/dummy/iio_simple_dummy_buffer.c +2 -2
index 17606eca42b43..40d30c0a60ce5 100644
@@ -1,5 +1,5 @@
 // SPDX-License-Identifier: GPL-2.0-only
-/**
+/*
  * Copyright (c) 2011 Jonathan Cameron
  *
  * Buffer handling elements of industrial I/O reference driver.
@@ -179,7 +179,7 @@ int iio_simple_dummy_configure_buffer(struct iio_dev *indio_dev)
 
 /**
  * iio_simple_dummy_unconfigure_buffer() - release buffer resources
- * @indo_dev: device instance state
+ * @indio_dev: device instance state
  */
 void iio_simple_dummy_unconfigure_buffer(struct iio_dev *indio_dev)
 {
author
#41 lore raw

PATCH 19/30 iio: dac: ad5064: Fix a few kerneldoc misdemeanours

In reply to Lee Jones

Misspelling, missing description and compiler attribute ordering.

Fixes the following W=1 kernel build warning(s):

drivers/iio/dac/ad5064.c:71: warning: bad line: internal vref.
drivers/iio/dac/ad5064.c:83: warning: Function parameter or member 'channels' not described in 'ad5064_chip_info' drivers/iio/dac/ad5064.c:125: warning: Function parameter or member 'lock' not described in 'ad5064_state' drivers/iio/dac/ad5064.c:125: warning: Function parameter or member '____cacheline_aligned' not described in 'ad5064_state'

Cc Michael Hennerich <[email protected]>
Cc Liam Girdwood <[email protected]>
Cc Mark Brown <[email protected]>
---
 drivers/iio/dac/ad5064.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/iio/dac/ad5064.c +4 -4
index 303f6d1a5f311..d7109f8f52efa 100644
@@ -68,8 +68,8 @@ enum ad5064_regmap_type {
  * struct ad5064_chip_info - chip specific information
  * @shared_vref:	whether the vref supply is shared between channels
  * @internal_vref:	internal reference voltage. 0 if the chip has no
-			internal vref.
- * @channel:		channel specification
+ *			internal vref.
+ * @channels:		channel specification
  * @num_channels:	number of channels
  * @regmap_type:	register map layout variant
  */
@@ -98,6 +98,7 @@ typedef int (*ad5064_write_func)(struct ad5064_state *st, unsigned int cmd,
  * @use_internal_vref:	set to true if the internal reference voltage should be
  *			used.
  * @write:		register write callback
+ * @lock:		maintain consistency between cached and dev state
  * @data:		i2c/spi transfer buffers
  */
 
@@ -111,7 +112,6 @@ struct ad5064_state {
 	bool				use_internal_vref;
 
 	ad5064_write_func		write;
-	/* Lock used to maintain consistency between cached and dev state */
 	struct mutex lock;
 
 	/*
@@ -121,7 +121,7 @@ struct ad5064_state {
 	union {
 		u8 i2c[3];
 		__be32 spi;
-	} data ____cacheline_aligned;
+	} ____cacheline_aligned data;
 };
 
 enum ad5064_type {
Signature · 1 line
2.25.1
maintainer
#42 lore raw

Re: [PATCH 19/30] iio: dac: ad5064: Fix a few kerneldoc misdemeanours

Quoted 9 lines · On Thu, 16 Jul 2020 14:59:17 +0100 Lee Jones <[email protected]> wrote:

Misspelling, missing description and compiler attribute ordering.

Fixes the following W=1 kernel build warning(s):

drivers/iio/dac/ad5064.c:71: warning: bad line: internal vref.
drivers/iio/dac/ad5064.c:83: warning: Function parameter or member 'channels' not described in 'ad5064_chip_info' drivers/iio/dac/ad5064.c:125: warning: Function parameter or member 'lock' not described in 'ad5064_state' drivers/iio/dac/ad5064.c:125: warning: Function parameter or member '____cacheline_aligned' not described in 'ad5064_state'

Quoted 4 lines
Cc Michael Hennerich <[email protected]>
Cc Liam Girdwood <[email protected]>
Cc Mark Brown <[email protected]>

Holding this one for that discussion around kernel-doc handing of ___cacheline_aligned

Jonathan

Quoted 44 lines
---
 drivers/iio/dac/ad5064.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/iio/dac/ad5064.c +4 -4
index 303f6d1a5f311..d7109f8f52efa 100644
@@ -68,8 +68,8 @@ enum ad5064_regmap_type {
  * struct ad5064_chip_info - chip specific information
  * @shared_vref:	whether the vref supply is shared between channels
  * @internal_vref:	internal reference voltage. 0 if the chip has no
-			internal vref.
- * @channel:		channel specification
+ *			internal vref.
+ * @channels:		channel specification
  * @num_channels:	number of channels
  * @regmap_type:	register map layout variant
  */
@@ -98,6 +98,7 @@ typedef int (*ad5064_write_func)(struct ad5064_state *st, unsigned int cmd,
  * @use_internal_vref:	set to true if the internal reference voltage should be
  *			used.
  * @write:		register write callback
+ * @lock:		maintain consistency between cached and dev state
  * @data:		i2c/spi transfer buffers
  */
 
@@ -111,7 +112,6 @@ struct ad5064_state {
 	bool				use_internal_vref;
 
 	ad5064_write_func		write;
-	/* Lock used to maintain consistency between cached and dev state */
 	struct mutex lock;
 
 	/*
@@ -121,7 +121,7 @@ struct ad5064_state {
 	union {
 		u8 i2c[3];
 		__be32 spi;
-	} data ____cacheline_aligned;
+	} ____cacheline_aligned data;
 };
 
 enum ad5064_type {
maintainer
#43 lore raw

Re: [PATCH 19/30] iio: dac: ad5064: Fix a few kerneldoc misdemeanours

In reply to Lee Jones
Quoted 9 lines · On Thu, 16 Jul 2020 14:59:17 +0100 Lee Jones <[email protected]> wrote:

Misspelling, missing description and compiler attribute ordering.

Fixes the following W=1 kernel build warning(s):

drivers/iio/dac/ad5064.c:71: warning: bad line: internal vref.
drivers/iio/dac/ad5064.c:83: warning: Function parameter or member 'channels' not described in 'ad5064_chip_info' drivers/iio/dac/ad5064.c:125: warning: Function parameter or member 'lock' not described in 'ad5064_state' drivers/iio/dac/ad5064.c:125: warning: Function parameter or member '____cacheline_aligned' not described in 'ad5064_state'

Quoted 4 lines
Cc Michael Hennerich <[email protected]>
Cc Liam Girdwood <[email protected]>
Cc Mark Brown <[email protected]>

Applied with the ___cacheline_aligned bit dropped as now kernel-doc won't complain about that.

Thanks,

Jonathan

Quoted 44 lines
---
 drivers/iio/dac/ad5064.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/iio/dac/ad5064.c +4 -4
index 303f6d1a5f311..d7109f8f52efa 100644
@@ -68,8 +68,8 @@ enum ad5064_regmap_type {
  * struct ad5064_chip_info - chip specific information
  * @shared_vref:	whether the vref supply is shared between channels
  * @internal_vref:	internal reference voltage. 0 if the chip has no
-			internal vref.
- * @channel:		channel specification
+ *			internal vref.
+ * @channels:		channel specification
  * @num_channels:	number of channels
  * @regmap_type:	register map layout variant
  */
@@ -98,6 +98,7 @@ typedef int (*ad5064_write_func)(struct ad5064_state *st, unsigned int cmd,
  * @use_internal_vref:	set to true if the internal reference voltage should be
  *			used.
  * @write:		register write callback
+ * @lock:		maintain consistency between cached and dev state
  * @data:		i2c/spi transfer buffers
  */
 
@@ -111,7 +112,6 @@ struct ad5064_state {
 	bool				use_internal_vref;
 
 	ad5064_write_func		write;
-	/* Lock used to maintain consistency between cached and dev state */
 	struct mutex lock;
 
 	/*
@@ -121,7 +121,7 @@ struct ad5064_state {
 	union {
 		u8 i2c[3];
 		__be32 spi;
-	} data ____cacheline_aligned;
+	} ____cacheline_aligned data;
 };
 
 enum ad5064_type {
author
#44 lore raw

PATCH 20/30 iio: dac: ad5446: Complete 'struct ad5446_state' doc and demote unworthy kerneldocs

In reply to Lee Jones

Fixes the following W=1 kernel build warning(s):

drivers/iio/dac/ad5446.c:48: warning: Function parameter or member 'dev' not described in 'ad5446_state' drivers/iio/dac/ad5446.c:48: warning: Function parameter or member 'cached_val' not described in 'ad5446_state' drivers/iio/dac/ad5446.c:48: warning: Function parameter or member 'pwr_down_mode' not described in 'ad5446_state' drivers/iio/dac/ad5446.c:48: warning: Function parameter or member 'pwr_down' not described in 'ad5446_state' drivers/iio/dac/ad5446.c:48: warning: Function parameter or member 'lock' not described in 'ad5446_state' drivers/iio/dac/ad5446.c:323: warning: cannot understand function prototype: 'enum ad5446_supported_spi_device_ids ' drivers/iio/dac/ad5446.c:545: warning: cannot understand function prototype: 'enum ad5446_supported_i2c_device_ids '

Cc Michael Hennerich <[email protected]>
---
 drivers/iio/dac/ad5446.c | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)
drivers/iio/dac/ad5446.c +7 -4
index 8f8afc8999bc7..15c314f08a007 100644
@@ -29,11 +29,14 @@
 
 /**
  * struct ad5446_state - driver instance specific data
- * @spi:		spi_device
+ * @dev:		this device
  * @chip_info:		chip model specific constants, available modes etc
  * @reg:		supply regulator
  * @vref_mv:		actual reference voltage used
- * @lock		lock to protect the data buffer during write ops
+ * @cached_val:		store/retrieve values during power down
+ * @pwr_down_mode:	power down mode (1k, 100k or tristate)
+ * @pwr_down:		true if the device is in power down
+ * @lock:		lock to protect the data buffer during write ops
  */
 
 struct ad5446_state {
@@ -313,7 +316,7 @@ static int ad5660_write(struct ad5446_state *st, unsigned val)
 	return spi_write(spi, data, sizeof(data));
 }
 
-/**
+/*
  * ad5446_supported_spi_device_ids:
  * The AD5620/40/60 parts are available in different fixed internal reference
  * voltage options. The actual part numbers may look differently
@@ -535,7 +538,7 @@ static int ad5622_write(struct ad5446_state *st, unsigned val)
 	return i2c_master_send(client, (char *)&data, sizeof(data));
 }
 
-/**
+/*
  * ad5446_supported_i2c_device_ids:
  * The AD5620/40/60 parts are available in different fixed internal reference
  * voltage options. The actual part numbers may look differently
Signature · 1 line
2.25.1
maintainer
#45 lore raw

Re: [PATCH 20/30] iio: dac: ad5446: Complete 'struct ad5446_state' doc and demote unworthy kerneldocs

Quoted 10 lines · On Thu, 16 Jul 2020 14:59:18 +0100 Lee Jones <[email protected]> wrote:

Fixes the following W=1 kernel build warning(s):

drivers/iio/dac/ad5446.c:48: warning: Function parameter or member 'dev' not described in 'ad5446_state' drivers/iio/dac/ad5446.c:48: warning: Function parameter or member 'cached_val' not described in 'ad5446_state' drivers/iio/dac/ad5446.c:48: warning: Function parameter or member 'pwr_down_mode' not described in 'ad5446_state' drivers/iio/dac/ad5446.c:48: warning: Function parameter or member 'pwr_down' not described in 'ad5446_state' drivers/iio/dac/ad5446.c:48: warning: Function parameter or member 'lock' not described in 'ad5446_state' drivers/iio/dac/ad5446.c:323: warning: cannot understand function prototype: 'enum ad5446_supported_spi_device_ids ' drivers/iio/dac/ad5446.c:545: warning: cannot understand function prototype: 'enum ad5446_supported_i2c_device_ids '

Quoted 2 lines
Cc Michael Hennerich <[email protected]>

Seems simple so applied.

Thanks,

Jonathan

Quoted 43 lines
---
 drivers/iio/dac/ad5446.c | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)
drivers/iio/dac/ad5446.c +7 -4
index 8f8afc8999bc7..15c314f08a007 100644
@@ -29,11 +29,14 @@
 
 /**
  * struct ad5446_state - driver instance specific data
- * @spi:		spi_device
+ * @dev:		this device
  * @chip_info:		chip model specific constants, available modes etc
  * @reg:		supply regulator
  * @vref_mv:		actual reference voltage used
- * @lock		lock to protect the data buffer during write ops
+ * @cached_val:		store/retrieve values during power down
+ * @pwr_down_mode:	power down mode (1k, 100k or tristate)
+ * @pwr_down:		true if the device is in power down
+ * @lock:		lock to protect the data buffer during write ops
  */
 
 struct ad5446_state {
@@ -313,7 +316,7 @@ static int ad5660_write(struct ad5446_state *st, unsigned val)
 	return spi_write(spi, data, sizeof(data));
 }
 
-/**
+/*
  * ad5446_supported_spi_device_ids:
  * The AD5620/40/60 parts are available in different fixed internal reference
  * voltage options. The actual part numbers may look differently
@@ -535,7 +538,7 @@ static int ad5622_write(struct ad5446_state *st, unsigned val)
 	return i2c_master_send(client, (char *)&data, sizeof(data));
 }
 
-/**
+/*
  * ad5446_supported_i2c_device_ids:
  * The AD5620/40/60 parts are available in different fixed internal reference
  * voltage options. The actual part numbers may look differently
author
#46 lore raw

PATCH 21/30 iio: dac: ad5449: Fix kerneldoc attribute formatting for 'lock'

In reply to Lee Jones

Kerneldoc expects attributes/parameters to be in '@*.: ' format.

Fixes the following W=1 kernel build warning(s):

drivers/iio/dac/ad5449.c:75: warning: Function parameter or member 'lock' not described in 'ad5449'

Cc Michael Hennerich <[email protected]>
---
 drivers/iio/dac/ad5449.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/dac/ad5449.c +1 -1
index d739b10e52362..e9530835479af 100644
@@ -56,7 +56,7 @@ struct ad5449_chip_info {
  * @has_sdo:		whether the SDO line is connected
  * @dac_cache:		Cache for the DAC values
  * @data:		spi transfer buffers
- * @lock		lock to protect the data buffer during SPI ops
+ * @lock:		lock to protect the data buffer during SPI ops
  */
 struct ad5449 {
 	struct spi_device		*spi;
Signature · 1 line
2.25.1
maintainer Applied
#47 lore raw

Re: [PATCH 21/30] iio: dac: ad5449: Fix kerneldoc attribute formatting for 'lock'

Quoted 8 lines · On Thu, 16 Jul 2020 14:59:19 +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/ad5449.c:75: warning: Function parameter or member 'lock' not described in 'ad5449'

Cc Michael Hennerich <[email protected]>

Applied

J

Quoted 17 lines
---
 drivers/iio/dac/ad5449.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/dac/ad5449.c +1 -1
index d739b10e52362..e9530835479af 100644
@@ -56,7 +56,7 @@ struct ad5449_chip_info {
  * @has_sdo:		whether the SDO line is connected
  * @dac_cache:		Cache for the DAC values
  * @data:		spi transfer buffers
- * @lock		lock to protect the data buffer during SPI ops
+ * @lock:		lock to protect the data buffer during SPI ops
  */
 struct ad5449 {
 	struct spi_device		*spi;
maintainer Applied
#48 lore raw

Re: [PATCH 21/30] iio: dac: ad5449: Fix kerneldoc attribute formatting for 'lock'

In reply to Lee Jones
Quoted 8 lines · On Thu, 16 Jul 2020 14:59:19 +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/ad5449.c:75: warning: Function parameter or member 'lock' not described in 'ad5449'

Cc Michael Hennerich <[email protected]>

Applied

Quoted 17 lines
---
 drivers/iio/dac/ad5449.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/dac/ad5449.c +1 -1
index d739b10e52362..e9530835479af 100644
@@ -56,7 +56,7 @@ struct ad5449_chip_info {
  * @has_sdo:		whether the SDO line is connected
  * @dac_cache:		Cache for the DAC values
  * @data:		spi transfer buffers
- * @lock		lock to protect the data buffer during SPI ops
+ * @lock:		lock to protect the data buffer during SPI ops
  */
 struct ad5449 {
 	struct spi_device		*spi;
author
#49 lore raw

PATCH 22/30 iio: dac: ad5755: Fix kerneldoc attribute formatting for 'lock'

In reply to Lee Jones

Kerneldoc expects attributes/parameters to be in '@*.: ' format.

Fixes the following W=1 kernel build warning(s):

drivers/iio/dac/ad5755.c:105: warning: Function parameter or member 'lock' not described in 'ad5755_state'

Cc Michael Hennerich <[email protected]>
---
 drivers/iio/dac/ad5755.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/dac/ad5755.c +1 -1
index 7723bd313fc6e..bee4ed0ce91a8 100644
@@ -82,7 +82,7 @@ struct ad5755_chip_info {
  * @pwr_down:	bitmask which contains  hether a channel is powered down or not
  * @ctrl:	software shadow of the channel ctrl registers
  * @channels:	iio channel spec for the device
- * @lock	lock to protect the data buffer during SPI ops
+ * @lock:	lock to protect the data buffer during SPI ops
  * @data:	spi transfer buffers
  */
 struct ad5755_state {
Signature · 1 line
2.25.1
maintainer Applied
#50 lore raw

Re: [PATCH 22/30] iio: dac: ad5755: Fix kerneldoc attribute formatting for 'lock'

Quoted 8 lines · On Thu, 16 Jul 2020 14:59: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/ad5755.c:105: warning: Function parameter or member 'lock' not described in 'ad5755_state'

Cc Michael Hennerich <[email protected]>

Applied. Thanks,

J

Quoted 17 lines
---
 drivers/iio/dac/ad5755.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/dac/ad5755.c +1 -1
index 7723bd313fc6e..bee4ed0ce91a8 100644
@@ -82,7 +82,7 @@ struct ad5755_chip_info {
  * @pwr_down:	bitmask which contains  hether a channel is powered down or not
  * @ctrl:	software shadow of the channel ctrl registers
  * @channels:	iio channel spec for the device
- * @lock	lock to protect the data buffer during SPI ops
+ * @lock:	lock to protect the data buffer during SPI ops
  * @data:	spi transfer buffers
  */
 struct ad5755_state {
author
#51 lore raw

PATCH 23/30 iio: dac: ad5758: Move and fix-up kerneldoc header and demote unworthy kerneldoc

In reply to Lee Jones

Kerneldoc headers need to come directly before the function/struct that they are documenting. Also fix some missing descriptions and misspellings.

Fixes the following W=1 kernel build warning(s):

drivers/iio/dac/ad5758.c:111: warning: Function parameter or member 'reg' not described in 'ad5758_range' drivers/iio/dac/ad5758.c:111: warning: Function parameter or member 'min' not described in 'ad5758_range' drivers/iio/dac/ad5758.c:111: warning: Function parameter or member 'max' not described in 'ad5758_range' drivers/iio/dac/ad5758.c:122: warning: Function parameter or member 'gpio_reset' not described in 'ad5758_state' drivers/iio/dac/ad5758.c:122: warning: Function parameter or member 'd32' not described in 'ad5758_state' drivers/iio/dac/ad5758.c:137: warning: cannot understand function prototype: 'enum ad5758_output_range '

Cc Michael Hennerich <[email protected]>
Cc Stefan Popa <[email protected]>
---
 drivers/iio/dac/ad5758.c | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)
drivers/iio/dac/ad5758.c +9 -9
index 475646c82b40e..c34740d2c89a1 100644
@@ -92,24 +92,24 @@
 
 #define AD5758_FULL_SCALE_MICRO	65535000000ULL
 
+struct ad5758_range {
+	int reg;
+	int min;
+	int max;
+};
+
 /**
  * struct ad5758_state - driver instance specific data
  * @spi:	spi_device
  * @lock:	mutex lock
+ * @gpio_reset:	gpio descriptor for the reset line
  * @out_range:	struct which stores the output range
  * @dc_dc_mode:	variable which stores the mode of operation
  * @dc_dc_ilim:	variable which stores the dc-to-dc converter current limit
  * @slew_time:	variable which stores the target slew time
  * @pwr_down:	variable which contains whether a channel is powered down or not
- * @data:	spi transfer buffers
+ * @d32:	spi transfer buffers
  */
-
-struct ad5758_range {
-	int reg;
-	int min;
-	int max;
-};
-
 struct ad5758_state {
 	struct spi_device *spi;
 	struct mutex lock;
@@ -122,7 +122,7 @@ struct ad5758_state {
 	__be32 d32[3];
 };
 
-/**
+/*
  * Output ranges corresponding to bits [3:0] from DAC_CONFIG register
  * 0000: 0 V to 5 V voltage range
  * 0001: 0 V to 10 V voltage range
Signature · 1 line
2.25.1
maintainer
#52 lore raw

Re: [PATCH 23/30] iio: dac: ad5758: Move and fix-up kerneldoc header and demote unworthy kerneldoc

Quoted 13 lines · On Thu, 16 Jul 2020 14:59:21 +0100 Lee Jones <[email protected]> wrote:

Kerneldoc headers need to come directly before the function/struct that they are documenting. Also fix some missing descriptions and misspellings.

Fixes the following W=1 kernel build warning(s):

drivers/iio/dac/ad5758.c:111: warning: Function parameter or member 'reg' not described in 'ad5758_range' drivers/iio/dac/ad5758.c:111: warning: Function parameter or member 'min' not described in 'ad5758_range' drivers/iio/dac/ad5758.c:111: warning: Function parameter or member 'max' not described in 'ad5758_range' drivers/iio/dac/ad5758.c:122: warning: Function parameter or member 'gpio_reset' not described in 'ad5758_state' drivers/iio/dac/ad5758.c:122: warning: Function parameter or member 'd32' not described in 'ad5758_state' drivers/iio/dac/ad5758.c:137: warning: cannot understand function prototype: 'enum ad5758_output_range '

Quoted 3 lines
Cc Michael Hennerich <[email protected]>
Cc Stefan Popa <[email protected]>

Applied to the togreg branch of iio.git and pushed out as testing. Plenty of time to add tags or changes if anyone else reviews.

Thanks,

Jonathan

Quoted 50 lines
---
 drivers/iio/dac/ad5758.c | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)
drivers/iio/dac/ad5758.c +9 -9
index 475646c82b40e..c34740d2c89a1 100644
@@ -92,24 +92,24 @@
 
 #define AD5758_FULL_SCALE_MICRO	65535000000ULL
 
+struct ad5758_range {
+	int reg;
+	int min;
+	int max;
+};
+
 /**
  * struct ad5758_state - driver instance specific data
  * @spi:	spi_device
  * @lock:	mutex lock
+ * @gpio_reset:	gpio descriptor for the reset line
  * @out_range:	struct which stores the output range
  * @dc_dc_mode:	variable which stores the mode of operation
  * @dc_dc_ilim:	variable which stores the dc-to-dc converter current limit
  * @slew_time:	variable which stores the target slew time
  * @pwr_down:	variable which contains whether a channel is powered down or not
- * @data:	spi transfer buffers
+ * @d32:	spi transfer buffers
  */
-
-struct ad5758_range {
-	int reg;
-	int min;
-	int max;
-};
-
 struct ad5758_state {
 	struct spi_device *spi;
 	struct mutex lock;
@@ -122,7 +122,7 @@ struct ad5758_state {
 	__be32 d32[3];
 };
 
-/**
+/*
  * Output ranges corresponding to bits [3:0] from DAC_CONFIG register
  * 0000: 0 V to 5 V voltage range
  * 0001: 0 V to 10 V voltage range
author
#53 lore raw

PATCH 24/30 iio: dac: ad5761: Fix kerneldoc attribute formatting for 'lock'

In reply to Lee Jones

Kerneldoc expects attributes/parameters to be in '@*.: ' format.

Fixes the following W=1 kernel build warning(s):

drivers/iio/dac/ad5761.c:80: warning: Function parameter or member 'lock' not described in 'ad5761_state'

Cc Michael Hennerich <[email protected]>
Cc Liam Girdwood <[email protected]>
Cc Mark Brown <[email protected]>
Cc Ricardo Ribalda <[email protected]>
---
 drivers/iio/dac/ad5761.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/dac/ad5761.c +1 -1
index 67c4fa75c6f13..1d9d0e22d6f44 100644
@@ -57,7 +57,7 @@ enum ad5761_supported_device_ids {
  * @use_intref:		true when the internal voltage reference is used
  * @vref:		actual voltage reference in mVolts
  * @range:		output range mode used
- * @lock		lock to protect the data buffer during SPI ops
+ * @lock:		lock to protect the data buffer during SPI ops
  * @data:		cache aligned spi buffer
  */
 struct ad5761_state {
Signature · 1 line
2.25.1
maintainer Applied
#54 lore raw

Re: [PATCH 24/30] iio: dac: ad5761: Fix kerneldoc attribute formatting for 'lock'

Quoted 11 lines · On Thu, 16 Jul 2020 14:59:22 +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/ad5761.c:80: warning: Function parameter or member 'lock' not described in 'ad5761_state'

Cc Michael Hennerich <[email protected]>
Cc Liam Girdwood <[email protected]>
Cc Mark Brown <[email protected]>
Cc Ricardo Ribalda <[email protected]>

Applied,

Thanks,

Jonathan

Quoted 17 lines
---
 drivers/iio/dac/ad5761.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/dac/ad5761.c +1 -1
index 67c4fa75c6f13..1d9d0e22d6f44 100644
@@ -57,7 +57,7 @@ enum ad5761_supported_device_ids {
  * @use_intref:		true when the internal voltage reference is used
  * @vref:		actual voltage reference in mVolts
  * @range:		output range mode used
- * @lock		lock to protect the data buffer during SPI ops
+ * @lock:		lock to protect the data buffer during SPI ops
  * @data:		cache aligned spi buffer
  */
 struct ad5761_state {
author
#55 lore raw

PATCH 25/30 iio: dac: ad5764: Fix misdocumenting and formatting error

In reply to Lee Jones

Attribute descriptions must match the name exactly.

Kerneldoc expects attributes/parameters to be in '@*.: ' format.

Fixes the following W=1 kernel build warning(s):

drivers/iio/dac/ad5764.c:42: warning: Function parameter or member 'channels' not described in 'ad5764_chip_info' drivers/iio/dac/ad5764.c:67: warning: Function parameter or member 'lock' not described in 'ad5764_state'

Cc Michael Hennerich <[email protected]>
---
 drivers/iio/dac/ad5764.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/iio/dac/ad5764.c +2 -3
index 5b0f0fe354f6b..1e16c464241c4 100644
@@ -33,9 +33,8 @@
  * struct ad5764_chip_info - chip specific information
  * @int_vref:	Value of the internal reference voltage in uV - 0 if external
  *		reference voltage is used
- * @channel	channel specification
+ * @channels:	channel specification
 */
-
 struct ad5764_chip_info {
 	unsigned long int_vref;
 	const struct iio_chan_spec *channels;
@@ -46,7 +45,7 @@ struct ad5764_chip_info {
  * @spi:		spi_device
  * @chip_info:		chip info
  * @vref_reg:		vref supply regulators
- * @lock		lock to protect the data buffer during SPI ops
+ * @lock:		lock to protect the data buffer during SPI ops
  * @data:		spi transfer buffers
  */
 
Signature · 1 line
2.25.1
maintainer Applied
#56 lore raw

Re: [PATCH 25/30] iio: dac: ad5764: Fix misdocumenting and formatting error

Quoted 11 lines · On Thu, 16 Jul 2020 14:59:23 +0100 Lee Jones <[email protected]> wrote:

Attribute descriptions must match the name exactly.

Kerneldoc expects attributes/parameters to be in '@*.: ' format.

Fixes the following W=1 kernel build warning(s):

drivers/iio/dac/ad5764.c:42: warning: Function parameter or member 'channels' not described in 'ad5764_chip_info' drivers/iio/dac/ad5764.c:67: warning: Function parameter or member 'lock' not described in 'ad5764_state'

Cc Michael Hennerich <[email protected]>

Applied.

Thanks,

Jonathan

Quoted 28 lines
---
 drivers/iio/dac/ad5764.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/iio/dac/ad5764.c +2 -3
index 5b0f0fe354f6b..1e16c464241c4 100644
@@ -33,9 +33,8 @@
  * struct ad5764_chip_info - chip specific information
  * @int_vref:	Value of the internal reference voltage in uV - 0 if external
  *		reference voltage is used
- * @channel	channel specification
+ * @channels:	channel specification
 */
-
 struct ad5764_chip_info {
 	unsigned long int_vref;
 	const struct iio_chan_spec *channels;
@@ -46,7 +45,7 @@ struct ad5764_chip_info {
  * @spi:		spi_device
  * @chip_info:		chip info
  * @vref_reg:		vref supply regulators
- * @lock		lock to protect the data buffer during SPI ops
+ * @lock:		lock to protect the data buffer during SPI ops
  * @data:		spi transfer buffers
  */
 
author
#57 lore raw

PATCH 26/30 iio: dac: ad5791: Complete 'struct ad5791_chip_info' documentation

In reply to Lee Jones

... and remove seemingly pointless comment.

Fixes the following W=1 kernel build warning(s):

drivers/iio/dac/ad5791.c:97: warning: Function parameter or member 'ctrl' not described in 'ad5791_state' drivers/iio/dac/ad5791.c:97: warning: Function parameter or member 'pwr_down_mode' not described in 'ad5791_state' drivers/iio/dac/ad5791.c:97: warning: Function parameter or member 'pwr_down' not described in 'ad5791_state' drivers/iio/dac/ad5791.c:97: warning: Function parameter or member 'data' not described in 'ad5791_state' drivers/iio/dac/ad5791.c:103: warning: cannot understand function prototype: 'enum ad5791_supported_device_ids '

Cc Michael Hennerich <[email protected]>
---
 drivers/iio/dac/ad5791.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)
drivers/iio/dac/ad5791.c +4 -6
index 1d11f39ed0474..d8485004b1010 100644
@@ -76,9 +76,11 @@ struct ad5791_chip_info {
  * @chip_info:		chip model specific constants
  * @vref_mv:		actual reference voltage used
  * @vref_neg_mv:	voltage of the negative supply
- * @pwr_down_mode	current power down mode
+ * @ctrl:		control regster cache
+ * @pwr_down_mode:	current power down mode
+ * @pwr_down:		true if device is powered down
+ * @data:		spi transfer buffers
  */
-
 struct ad5791_state {
 	struct spi_device		*spi;
 	struct regulator		*reg_vdd;
@@ -96,10 +98,6 @@ struct ad5791_state {
 	} data[3] ____cacheline_aligned;
 };
 
-/**
- * ad5791_supported_device_ids:
- */
-
 enum ad5791_supported_device_ids {
 	ID_AD5760,
 	ID_AD5780,
Signature · 1 line
2.25.1
maintainer Applied
#58 lore raw

Re: [PATCH 26/30] iio: dac: ad5791: Complete 'struct ad5791_chip_info' documentation

Quoted 4 lines · On Thu, 16 Jul 2020 14:59:24 +0100 Lee Jones <[email protected]> wrote:

... and remove seemingly pointless comment.

Fixes the following W=1 kernel build warning(s):

Quoted 8 lines

drivers/iio/dac/ad5791.c:97: warning: Function parameter or member 'ctrl' not described in 'ad5791_state' drivers/iio/dac/ad5791.c:97: warning: Function parameter or member 'pwr_down_mode' not described in 'ad5791_state' drivers/iio/dac/ad5791.c:97: warning: Function parameter or member 'pwr_down' not described in 'ad5791_state' drivers/iio/dac/ad5791.c:97: warning: Function parameter or member 'data' not described in 'ad5791_state' drivers/iio/dac/ad5791.c:103: warning: cannot understand function prototype: 'enum ad5791_supported_device_ids '

Cc Michael Hennerich <[email protected]>

Applied.

Thanks,

Jonathan

Quoted 33 lines
---
 drivers/iio/dac/ad5791.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)
drivers/iio/dac/ad5791.c +4 -6
index 1d11f39ed0474..d8485004b1010 100644
@@ -76,9 +76,11 @@ struct ad5791_chip_info {
  * @chip_info:		chip model specific constants
  * @vref_mv:		actual reference voltage used
  * @vref_neg_mv:	voltage of the negative supply
- * @pwr_down_mode	current power down mode
+ * @ctrl:		control regster cache
+ * @pwr_down_mode:	current power down mode
+ * @pwr_down:		true if device is powered down
+ * @data:		spi transfer buffers
  */
-
 struct ad5791_state {
 	struct spi_device		*spi;
 	struct regulator		*reg_vdd;
@@ -96,10 +98,6 @@ struct ad5791_state {
 	} data[3] ____cacheline_aligned;
 };
 
-/**
- * ad5791_supported_device_ids:
- */
-
 enum ad5791_supported_device_ids {
 	ID_AD5760,
 	ID_AD5780,
author
#59 lore raw

PATCH 27/30 iio: light: cm32181: Fix formatting and docrot issues in cm32181_acpi_get_cpm()

In reply to Lee Jones

Fixes the following W=1 kernel build warning(s):

drivers/iio/light/cm32181.c:107: warning: Function parameter or member 'dev' not described in 'cm32181_acpi_get_cpm' drivers/iio/light/cm32181.c:107: warning: Function parameter or member 'obj_name' not described in 'cm32181_acpi_get_cpm' drivers/iio/light/cm32181.c:107: warning: Function parameter or member 'values' not described in 'cm32181_acpi_get_cpm' drivers/iio/light/cm32181.c:107: warning: Function parameter or member 'count' not described in 'cm32181_acpi_get_cpm'

---
 drivers/iio/light/cm32181.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/iio/light/cm32181.c +4 -4
index 160eb3f99795e..9764099faef9a 100644
@@ -93,10 +93,10 @@ static int cm32181_read_als_it(struct cm32181_chip *cm32181, int *val2);
 #ifdef CONFIG_ACPI
 /**
  * cm32181_acpi_get_cpm() - Get CPM object from ACPI
- * @client	pointer of struct i2c_client.
- * @obj_name	pointer of ACPI object name.
- * @count	maximum size of return array.
- * @vals	pointer of array for return elements.
+ * @dev:	pointer of struct device.
+ * @obj_name:	pointer of ACPI object name.
+ * @values:	pointer of array for return elements.
+ * @count:	maximum size of return array.
  *
  * Convert ACPI CPM table to array.
  *
Signature · 1 line
2.25.1
maintainer
#60 lore raw

Re: [PATCH 27/30] iio: light: cm32181: Fix formatting and docrot issues in cm32181_acpi_get_cpm()

Quoted 9 lines · On Thu, 16 Jul 2020 14:59:25 +0100 Lee Jones <[email protected]> wrote:

Fixes the following W=1 kernel build warning(s):

drivers/iio/light/cm32181.c:107: warning: Function parameter or member 'dev' not described in 'cm32181_acpi_get_cpm' drivers/iio/light/cm32181.c:107: warning: Function parameter or member 'obj_name' not described in 'cm32181_acpi_get_cpm' drivers/iio/light/cm32181.c:107: warning: Function parameter or member 'values' not described in 'cm32181_acpi_get_cpm' drivers/iio/light/cm32181.c:107: warning: Function parameter or member 'count' not described in 'cm32181_acpi_get_cpm'

Applied to the togreg branch of iio.git and pushed out as testing for the autobuilders to play with it.

Thanks,

Jonathan

Quoted 23 lines
---
 drivers/iio/light/cm32181.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/iio/light/cm32181.c +4 -4
index 160eb3f99795e..9764099faef9a 100644
@@ -93,10 +93,10 @@ static int cm32181_read_als_it(struct cm32181_chip *cm32181, int *val2);
 #ifdef CONFIG_ACPI
 /**
  * cm32181_acpi_get_cpm() - Get CPM object from ACPI
- * @client	pointer of struct i2c_client.
- * @obj_name	pointer of ACPI object name.
- * @count	maximum size of return array.
- * @vals	pointer of array for return elements.
+ * @dev:	pointer of struct device.
+ * @obj_name:	pointer of ACPI object name.
+ * @values:	pointer of array for return elements.
+ * @count:	maximum size of return array.
  *
  * Convert ACPI CPM table to array.
  *
author
#61 lore raw

PATCH 28/30 iio: magnetometer: mmc35240: Fix function header formatting

In reply to Lee Jones

All lines in the header must start with " *".

Fixes the following W=1 kernel build warning(s):

drivers/iio/magnetometer/mmc35240.c:304: warning: bad line: compensation for output value.

Cc Daniel Baluta <[email protected]>
---
 drivers/iio/magnetometer/mmc35240.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/iio/magnetometer/mmc35240.c +2 -2
index 1787d656d0094..19e46b1f4ee81 100644
@@ -300,8 +300,8 @@ static int mmc35240_read_measurement(struct mmc35240_data *data, __le16 buf[3])
 }
 
 /**
- * mmc35240_raw_to_mgauss - convert raw readings to milli gauss. Also apply
-			    compensation for output value.
+ * mmc35240_raw_to_mgauss() - convert raw readings to milli gauss. Also apply
+ *			      compensation for output value.
  *
  * @data: device private data
  * @index: axis index for which we want the conversion
Signature · 1 line
2.25.1
maintainer Applied
#62 lore raw

Re: [PATCH 28/30] iio: magnetometer: mmc35240: Fix function header formatting

Quoted 8 lines · On Thu, 16 Jul 2020 14:59:26 +0100 Lee Jones <[email protected]> wrote:

All lines in the header must start with " *".

Fixes the following W=1 kernel build warning(s):

drivers/iio/magnetometer/mmc35240.c:304: warning: bad line: compensation for output value.

Cc Daniel Baluta <[email protected]>

I tweaked this one a tiny bit to drop the brackets you added.
I remember looking this up recently and they are optional in the kernel-doc format. Adds a very small amount of confusion perhaps to add them in here.

Applied

Quoted 19 lines
---
 drivers/iio/magnetometer/mmc35240.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/iio/magnetometer/mmc35240.c +2 -2
index 1787d656d0094..19e46b1f4ee81 100644
@@ -300,8 +300,8 @@ static int mmc35240_read_measurement(struct mmc35240_data *data, __le16 buf[3])
 }
 
 /**
- * mmc35240_raw_to_mgauss - convert raw readings to milli gauss. Also apply
-			    compensation for output value.
+ * mmc35240_raw_to_mgauss() - convert raw readings to milli gauss. Also apply
+ *			      compensation for output value.
  *
  * @data: device private data
  * @index: axis index for which we want the conversion
author
#63 lore raw

PATCH 29/30 iio: imu: kmx61: Fix formatting in kerneldoc function headers

In reply to Lee Jones

Kerneldoc expects attributes/parameters to be in '@*.: ' format.

Fixes the following W=1 kernel build warning(s):

drivers/iio/imu/kmx61.c:327: warning: Function parameter or member 'data' not described in 'kmx61_set_mode' drivers/iio/imu/kmx61.c:327: warning: Function parameter or member 'mode' not described in 'kmx61_set_mode' drivers/iio/imu/kmx61.c:327: warning: Function parameter or member 'device' not described in 'kmx61_set_mode' drivers/iio/imu/kmx61.c:327: warning: Function parameter or member 'update' not described in 'kmx61_set_mode' drivers/iio/imu/kmx61.c:731: warning: Function parameter or member 'data' not described in 'kmx61_set_power_state' drivers/iio/imu/kmx61.c:731: warning: Function parameter or member 'on' not described in 'kmx61_set_power_state' drivers/iio/imu/kmx61.c:731: warning: Function parameter or member 'device' not described in 'kmx61_set_power_state'

Cc Daniel Baluta <[email protected]>
---
 drivers/iio/imu/kmx61.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
drivers/iio/imu/kmx61.c +7 -7
index e67466100aff4..d0cee2e09884d 100644
@@ -312,10 +312,10 @@ static int kmx61_convert_wake_up_odr_to_bit(int val, int val2)
 
 /**
  * kmx61_set_mode() - set KMX61 device operating mode
- * @data - kmx61 device private data pointer
- * @mode - bitmask, indicating operating mode for @device
- * @device - bitmask, indicating device for which @mode needs to be set
- * @update - update stby bits stored in device's private  @data
+ * @data: kmx61 device private data pointer
+ * @mode: bitmask, indicating operating mode for @device
+ * @device: bitmask, indicating device for which @mode needs to be set
+ * @update: update stby bits stored in device's private  @data
  *
  * For each sensor (accelerometer/magnetometer) there are two operating modes
  * STANDBY and OPERATION. Neither accel nor magn can be disabled independently
@@ -718,9 +718,9 @@ static int kmx61_setup_any_motion_interrupt(struct kmx61_data *data,
 
 /**
  * kmx61_set_power_state() - set power state for kmx61 @device
- * @data - kmx61 device private pointer
- * @on - power state to be set for @device
- * @device - bitmask indicating device for which @on state needs to be set
+ * @data: kmx61 device private pointer
+ * @on: power state to be set for @device
+ * @device: bitmask indicating device for which @on state needs to be set
  *
  * Notice that when ACC power state needs to be set to ON and MAG is in
  * OPERATION then we know that kmx61_runtime_resume was already called
Signature · 1 line
2.25.1
maintainer Applied
#64 lore raw

Re: [PATCH 29/30] iio: imu: kmx61: Fix formatting in kerneldoc function headers

Quoted 12 lines · On Thu, 16 Jul 2020 14:59:27 +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/imu/kmx61.c:327: warning: Function parameter or member 'data' not described in 'kmx61_set_mode' drivers/iio/imu/kmx61.c:327: warning: Function parameter or member 'mode' not described in 'kmx61_set_mode' drivers/iio/imu/kmx61.c:327: warning: Function parameter or member 'device' not described in 'kmx61_set_mode' drivers/iio/imu/kmx61.c:327: warning: Function parameter or member 'update' not described in 'kmx61_set_mode' drivers/iio/imu/kmx61.c:731: warning: Function parameter or member 'data' not described in 'kmx61_set_power_state' drivers/iio/imu/kmx61.c:731: warning: Function parameter or member 'on' not described in 'kmx61_set_power_state' drivers/iio/imu/kmx61.c:731: warning: Function parameter or member 'device' not described in 'kmx61_set_power_state'

Quoted 2 lines
Cc Daniel Baluta <[email protected]>

Applied.
Thanks,

Jonathan

Quoted 36 lines
---
 drivers/iio/imu/kmx61.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
drivers/iio/imu/kmx61.c +7 -7
index e67466100aff4..d0cee2e09884d 100644
@@ -312,10 +312,10 @@ static int kmx61_convert_wake_up_odr_to_bit(int val, int val2)
 
 /**
  * kmx61_set_mode() - set KMX61 device operating mode
- * @data - kmx61 device private data pointer
- * @mode - bitmask, indicating operating mode for @device
- * @device - bitmask, indicating device for which @mode needs to be set
- * @update - update stby bits stored in device's private  @data
+ * @data: kmx61 device private data pointer
+ * @mode: bitmask, indicating operating mode for @device
+ * @device: bitmask, indicating device for which @mode needs to be set
+ * @update: update stby bits stored in device's private  @data
  *
  * For each sensor (accelerometer/magnetometer) there are two operating modes
  * STANDBY and OPERATION. Neither accel nor magn can be disabled independently
@@ -718,9 +718,9 @@ static int kmx61_setup_any_motion_interrupt(struct kmx61_data *data,
 
 /**
  * kmx61_set_power_state() - set power state for kmx61 @device
- * @data - kmx61 device private pointer
- * @on - power state to be set for @device
- * @device - bitmask indicating device for which @on state needs to be set
+ * @data: kmx61 device private pointer
+ * @on: power state to be set for @device
+ * @device: bitmask indicating device for which @on state needs to be set
  *
  * Notice that when ACC power state needs to be set to ON and MAG is in
  * OPERATION then we know that kmx61_runtime_resume was already called
author
#65 lore raw

PATCH 30/30 iio: dac: ad7303: Complete 'struct ad7303_state' doc and reorder compiler attribute

In reply to Lee Jones

Kerneldoc gets confused if the variable does not follow the type/attribute definitions.

Fixes the following W=1 kernel build warning(s):

drivers/iio/dac/ad7303.c:49: warning: Function parameter or member 'vdd_reg' not described in 'ad7303_state' drivers/iio/dac/ad7303.c:49: warning: Function parameter or member 'vref_reg' not described in 'ad7303_state' drivers/iio/dac/ad7303.c:49: warning: Function parameter or member 'lock' not described in 'ad7303_state' drivers/iio/dac/ad7303.c:49: warning: Function parameter or member '____cacheline_aligned' not described in 'ad7303_state'

Cc Michael Hennerich <[email protected]>
Cc Liam Girdwood <[email protected]>
Cc Mark Brown <[email protected]>
---
 drivers/iio/dac/ad7303.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/iio/dac/ad7303.c +4 -1
index 15af8a1cce3eb..05d8dc88d4fad 100644
@@ -29,6 +29,9 @@
  * @spi:		the device for this driver instance
  * @config:		cached config register value
  * @dac_cache:		current DAC raw value (chip does not support readback)
+ * @vdd_reg:		reference to VDD regulator
+ * @vref_reg:		reference to VREF regulator
+ * @lock:		protect writes and cache updates
  * @data:		spi transfer buffer
  */
 
@@ -45,7 +48,7 @@ struct ad7303_state {
 	 * DMA (thus cache coherency maintenance) requires the
 	 * transfer buffers to live in their own cache lines.
 	 */
-	__be16 data ____cacheline_aligned;
+	__be16 ____cacheline_aligned data;
 };
 
 static int ad7303_write(struct ad7303_state *st, unsigned int chan,
Signature · 1 line
2.25.1
maintainer
#66 lore raw

Re: [PATCH 30/30] iio: dac: ad7303: Complete 'struct ad7303_state' doc and reorder compiler attribute

Quoted 10 lines · On Thu, 16 Jul 2020 14:59:28 +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/dac/ad7303.c:49: warning: Function parameter or member 'vdd_reg' not described in 'ad7303_state' drivers/iio/dac/ad7303.c:49: warning: Function parameter or member 'vref_reg' not described in 'ad7303_state' drivers/iio/dac/ad7303.c:49: warning: Function parameter or member 'lock' not described in 'ad7303_state' drivers/iio/dac/ad7303.c:49: warning: Function parameter or member '____cacheline_aligned' not described in 'ad7303_state'

Quoted 4 lines
Cc Michael Hennerich <[email protected]>
Cc Liam Girdwood <[email protected]>
Cc Mark Brown <[email protected]>

Holding this one pending that earlier discussion on whether we should screen ____cacheline_aligned out in kernel-doc script.

Thanks,

Jonathan

Quoted 27 lines
---
 drivers/iio/dac/ad7303.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/iio/dac/ad7303.c +4 -1
index 15af8a1cce3eb..05d8dc88d4fad 100644
@@ -29,6 +29,9 @@
  * @spi:		the device for this driver instance
  * @config:		cached config register value
  * @dac_cache:		current DAC raw value (chip does not support readback)
+ * @vdd_reg:		reference to VDD regulator
+ * @vref_reg:		reference to VREF regulator
+ * @lock:		protect writes and cache updates
  * @data:		spi transfer buffer
  */
 
@@ -45,7 +48,7 @@ struct ad7303_state {
 	 * DMA (thus cache coherency maintenance) requires the
 	 * transfer buffers to live in their own cache lines.
 	 */
-	__be16 data ____cacheline_aligned;
+	__be16 ____cacheline_aligned data;
 };
 
 static int ad7303_write(struct ad7303_state *st, unsigned int chan,
maintainer
#67 lore raw

Re: [PATCH 30/30] iio: dac: ad7303: Complete 'struct ad7303_state' doc and reorder compiler attribute

In reply to Lee Jones
Quoted 10 lines · On Thu, 16 Jul 2020 14:59:28 +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/dac/ad7303.c:49: warning: Function parameter or member 'vdd_reg' not described in 'ad7303_state' drivers/iio/dac/ad7303.c:49: warning: Function parameter or member 'vref_reg' not described in 'ad7303_state' drivers/iio/dac/ad7303.c:49: warning: Function parameter or member 'lock' not described in 'ad7303_state' drivers/iio/dac/ad7303.c:49: warning: Function parameter or member '____cacheline_aligned' not described in 'ad7303_state'

Quoted 4 lines
Cc Michael Hennerich <[email protected]>
Cc Liam Girdwood <[email protected]>
Cc Mark Brown <[email protected]>

Applied but with the ____cacheline_aligned bit dropped as we've fixed the kernel-doc script up to ignore that one.

Thanks,

Jonathan

Quoted 27 lines
---
 drivers/iio/dac/ad7303.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/iio/dac/ad7303.c +4 -1
index 15af8a1cce3eb..05d8dc88d4fad 100644
@@ -29,6 +29,9 @@
  * @spi:		the device for this driver instance
  * @config:		cached config register value
  * @dac_cache:		current DAC raw value (chip does not support readback)
+ * @vdd_reg:		reference to VDD regulator
+ * @vref_reg:		reference to VREF regulator
+ * @lock:		protect writes and cache updates
  * @data:		spi transfer buffer
  */
 
@@ -45,7 +48,7 @@ struct ad7303_state {
 	 * DMA (thus cache coherency maintenance) requires the
 	 * transfer buffers to live in their own cache lines.
 	 */
-	__be16 data ____cacheline_aligned;
+	__be16 ____cacheline_aligned data;
 };
 
 static int ad7303_write(struct ad7303_state *st, unsigned int chan,
maintainer
#68 lore raw

Re: [PATCH 30/30] iio: dac: ad7303: Complete 'struct ad7303_state' doc and reorder compiler attribute

In reply to Lee Jones
Quoted 10 lines · On Thu, 16 Jul 2020 14:59:28 +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/dac/ad7303.c:49: warning: Function parameter or member 'vdd_reg' not described in 'ad7303_state' drivers/iio/dac/ad7303.c:49: warning: Function parameter or member 'vref_reg' not described in 'ad7303_state' drivers/iio/dac/ad7303.c:49: warning: Function parameter or member 'lock' not described in 'ad7303_state' drivers/iio/dac/ad7303.c:49: warning: Function parameter or member '____cacheline_aligned' not described in 'ad7303_state'

Quoted 4 lines
Cc Michael Hennerich <[email protected]>
Cc Liam Girdwood <[email protected]>
Cc Mark Brown <[email protected]>

Applied with ___cacheline_aligned bit dropped as now kernel-doc will ignore that.

Thanks,

Jonathan

Quoted 27 lines
---
 drivers/iio/dac/ad7303.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/iio/dac/ad7303.c +4 -1
index 15af8a1cce3eb..05d8dc88d4fad 100644
@@ -29,6 +29,9 @@
  * @spi:		the device for this driver instance
  * @config:		cached config register value
  * @dac_cache:		current DAC raw value (chip does not support readback)
+ * @vdd_reg:		reference to VDD regulator
+ * @vref_reg:		reference to VREF regulator
+ * @lock:		protect writes and cache updates
  * @data:		spi transfer buffer
  */
 
@@ -45,7 +48,7 @@ struct ad7303_state {
 	 * DMA (thus cache coherency maintenance) requires the
 	 * transfer buffers to live in their own cache lines.
 	 */
-	__be16 data ____cacheline_aligned;
+	__be16 ____cacheline_aligned data;
 };
 
 static int ad7303_write(struct ad7303_state *st, unsigned int chan,
maintainer
#69 lore raw
In reply to Lee Jones
Quoted 3 lines · 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

Quoted 79 lines

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(-)
author
#70 lore raw
Quoted 11 lines · Jonathan Cameron
Quoted 3 lines · 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.

Quoted 84 lines

It doesn't matter that much though. I'm just being fussy :)

Jonathan

Quoted 79 lines

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(-)
Signature · 4 lines
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog