diff mbox series

[17/30] iio: gyro: adxrs450: Change ordering of compiler attribute macro

Message ID 20200717165538.3275050-18-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 the
type/attribute definitions.

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

 drivers/iio/gyro/adxrs450.c:79: warning: Function parameter or member '____cacheline_aligned' not described in 'adxrs450_state'

Cc: Michael Hennerich <Michael.Hennerich@analog.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/iio/gyro/adxrs450.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jonathan Cameron July 18, 2020, 3:52 p.m. UTC | #1
On Fri, 17 Jul 2020 17:55:25 +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/gyro/adxrs450.c:79: warning: Function parameter or member '____cacheline_aligned' not described in 'adxrs450_state'
> 
> Cc: Michael Hennerich <Michael.Hennerich@analog.com>
> Signed-off-by: Lee Jones <lee.jones@linaro.org>
Holding this one for the conversation about whether we should be fixing
the code or the tool.

Thanks,

Jonathan

> ---
>  drivers/iio/gyro/adxrs450.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/iio/gyro/adxrs450.c b/drivers/iio/gyro/adxrs450.c
> index b00c0eb442493..e00b97e30cf9d 100644
> --- a/drivers/iio/gyro/adxrs450.c
> +++ b/drivers/iio/gyro/adxrs450.c
> @@ -73,7 +73,7 @@ enum {
>  struct adxrs450_state {
>  	struct spi_device	*us;
>  	struct mutex		buf_lock;
> -	__be32			tx ____cacheline_aligned;
> +	__be32 ____cacheline_aligned tx;
>  	__be32			rx;
>  
>  };
diff mbox series

Patch

diff --git a/drivers/iio/gyro/adxrs450.c b/drivers/iio/gyro/adxrs450.c
index b00c0eb442493..e00b97e30cf9d 100644
--- a/drivers/iio/gyro/adxrs450.c
+++ b/drivers/iio/gyro/adxrs450.c
@@ -73,7 +73,7 @@  enum {
 struct adxrs450_state {
 	struct spi_device	*us;
 	struct mutex		buf_lock;
-	__be32			tx ____cacheline_aligned;
+	__be32 ____cacheline_aligned tx;
 	__be32			rx;
 
 };