diff mbox series

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

Message ID 20200716135928.1456727-31-lee.jones@linaro.org (mailing list archive)
State New, archived
Headers show
Series First batch of W=1 fixes for IIO | expand

Commit Message

Lee Jones July 16, 2020, 1:59 p.m. UTC
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 <Michael.Hennerich@analog.com>
Cc: Liam Girdwood <lgirdwood@gmail.com>
Cc: Mark Brown <broonie@kernel.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/iio/dac/ad7303.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Comments

Jonathan Cameron July 18, 2020, 3:18 p.m. UTC | #1
On Thu, 16 Jul 2020 14:59:28 +0100
Lee Jones <lee.jones@linaro.org> 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'
> 
> Cc: Michael Hennerich <Michael.Hennerich@analog.com>
> Cc: Liam Girdwood <lgirdwood@gmail.com>
> Cc: Mark Brown <broonie@kernel.org>
> Signed-off-by: Lee Jones <lee.jones@linaro.org>
Holding this one pending that earlier discussion on whether we should
screen ____cacheline_aligned out in kernel-doc script.

Thanks,

Jonathan

> ---
>  drivers/iio/dac/ad7303.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/iio/dac/ad7303.c b/drivers/iio/dac/ad7303.c
> index 15af8a1cce3eb..05d8dc88d4fad 100644
> --- a/drivers/iio/dac/ad7303.c
> +++ b/drivers/iio/dac/ad7303.c
> @@ -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,
Jonathan Cameron Sept. 17, 2020, 6:29 p.m. UTC | #2
On Thu, 16 Jul 2020 14:59:28 +0100
Lee Jones <lee.jones@linaro.org> 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'
> 
> Cc: Michael Hennerich <Michael.Hennerich@analog.com>
> Cc: Liam Girdwood <lgirdwood@gmail.com>
> Cc: Mark Brown <broonie@kernel.org>
> Signed-off-by: Lee Jones <lee.jones@linaro.org>
Applied but with the ____cacheline_aligned bit dropped as we've fixed the
kernel-doc script up to ignore that one.

Thanks,

Jonathan

> ---
>  drivers/iio/dac/ad7303.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/iio/dac/ad7303.c b/drivers/iio/dac/ad7303.c
> index 15af8a1cce3eb..05d8dc88d4fad 100644
> --- a/drivers/iio/dac/ad7303.c
> +++ b/drivers/iio/dac/ad7303.c
> @@ -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,
Jonathan Cameron Sept. 17, 2020, 6:30 p.m. UTC | #3
On Thu, 16 Jul 2020 14:59:28 +0100
Lee Jones <lee.jones@linaro.org> 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'
> 
> Cc: Michael Hennerich <Michael.Hennerich@analog.com>
> Cc: Liam Girdwood <lgirdwood@gmail.com>
> Cc: Mark Brown <broonie@kernel.org>
> Signed-off-by: Lee Jones <lee.jones@linaro.org>
Applied with ___cacheline_aligned bit dropped as now kernel-doc will ignore
that.

Thanks,

Jonathan

> ---
>  drivers/iio/dac/ad7303.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/iio/dac/ad7303.c b/drivers/iio/dac/ad7303.c
> index 15af8a1cce3eb..05d8dc88d4fad 100644
> --- a/drivers/iio/dac/ad7303.c
> +++ b/drivers/iio/dac/ad7303.c
> @@ -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,
diff mbox series

Patch

diff --git a/drivers/iio/dac/ad7303.c b/drivers/iio/dac/ad7303.c
index 15af8a1cce3eb..05d8dc88d4fad 100644
--- a/drivers/iio/dac/ad7303.c
+++ b/drivers/iio/dac/ad7303.c
@@ -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,