diff mbox series

[22/30] iio: adc: mcp320x: Change ordering of compiler attribute macro

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

Commit Message

Lee Jones July 17, 2020, 4:55 p.m. UTC
Kerneldoc gets confused if the variable does not follow th
type/attribute definitions.

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

 drivers/iio/adc/mcp320x.c:96: warning: Function parameter or member '____cacheline_aligned' not described in 'mcp320x'

Cc: Oskar Andero <oskar.andero@gmail.com>
Cc: Bendorff Jensen <abj@rosetechnology.dk>
Cc: Soren Andersen <san@rosetechnology.dk>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/iio/adc/mcp320x.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jonathan Cameron July 18, 2020, 4 p.m. UTC | #1
On Fri, 17 Jul 2020 17:55:30 +0100
Lee Jones <lee.jones@linaro.org> wrote:

> Kerneldoc gets confused if the variable does not follow th
> type/attribute definitions.
> 
> Fixes the following W=1 kernel build warning(s):
> 
>  drivers/iio/adc/mcp320x.c:96: warning: Function parameter or member '____cacheline_aligned' not described in 'mcp320x'
> 
> Cc: Oskar Andero <oskar.andero@gmail.com>
> Cc: Bendorff Jensen <abj@rosetechnology.dk>
> Cc: Soren Andersen <san@rosetechnology.dk>
> Signed-off-by: Lee Jones <lee.jones@linaro.org>
Holding this one whilst we discuss the right fix for this sort of issue.

J
> ---
>  drivers/iio/adc/mcp320x.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/iio/adc/mcp320x.c b/drivers/iio/adc/mcp320x.c
> index 2c0eb5de110ca..191a8f644ffe7 100644
> --- a/drivers/iio/adc/mcp320x.c
> +++ b/drivers/iio/adc/mcp320x.c
> @@ -91,7 +91,7 @@ struct mcp320x {
>  	struct mutex lock;
>  	const struct mcp320x_chip_info *chip_info;
>  
> -	u8 tx_buf ____cacheline_aligned;
> +	u8 ____cacheline_aligned tx_buf;
>  	u8 rx_buf[4];
>  };
>
diff mbox series

Patch

diff --git a/drivers/iio/adc/mcp320x.c b/drivers/iio/adc/mcp320x.c
index 2c0eb5de110ca..191a8f644ffe7 100644
--- a/drivers/iio/adc/mcp320x.c
+++ b/drivers/iio/adc/mcp320x.c
@@ -91,7 +91,7 @@  struct mcp320x {
 	struct mutex lock;
 	const struct mcp320x_chip_info *chip_info;
 
-	u8 tx_buf ____cacheline_aligned;
+	u8 ____cacheline_aligned tx_buf;
 	u8 rx_buf[4];
 };