[PATCH v2] iio: chemical: ccs811: cleanup checkpatch __packed warning

Adi Nata posted 1 patch 2 months ago
drivers/iio/chemical/ccs811.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH v2] iio: chemical: ccs811: cleanup checkpatch __packed warning
Posted by Adi Nata 2 months ago
Change instance of __attribute__((__packed__)) to __packed per
checkpatch.pl warning.

Reported by checkpatch:
FILE: drivers/iio/chemical/ccs811.c

WARNING: Prefer __packed over __attribute__((__packed__))
+} __attribute__((__packed__));

Signed-off-by: Adi Nata <adinata.softwareengineer@gmail.com>

v2:
- Rename commit message to include driver name

---
 drivers/iio/chemical/ccs811.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/iio/chemical/ccs811.c b/drivers/iio/chemical/ccs811.c
index ce7187ccd706..0e5c79b775a2 100644
--- a/drivers/iio/chemical/ccs811.c
+++ b/drivers/iio/chemical/ccs811.c
@@ -70,7 +70,7 @@ struct ccs811_reading {
 	u8 status;
 	u8 error;
 	__be16 raw_data;
-} __attribute__((__packed__));
+} __packed;
 
 struct ccs811_data {
 	struct i2c_client *client;
-- 
2.47.3
Re: [PATCH v2] iio: chemical: ccs811: cleanup checkpatch __packed warning
Posted by Jonathan Cameron 2 months ago
On Sun,  2 Aug 2026 10:25:56 +0800
Adi Nata <adinata.softwareengineer@gmail.com> wrote:

> Change instance of __attribute__((__packed__)) to __packed per
> checkpatch.pl warning.
> 
> Reported by checkpatch:
> FILE: drivers/iio/chemical/ccs811.c
> 
> WARNING: Prefer __packed over __attribute__((__packed__))
> +} __attribute__((__packed__));
> 
> Signed-off-by: Adi Nata <adinata.softwareengineer@gmail.com>
> 
> v2:

This needs to be below the ---

Also please do not send a new version of a series in reply to
an earlier one.  

1. Leads to very confusing threads if there is much discussion.
2. Means your patch is way back in any reviewers inbox as sorting
   is typically be date of first mail in thread.


Thanks,

Jonathan


> - Rename commit message to include driver name
> 
> ---
>  drivers/iio/chemical/ccs811.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/iio/chemical/ccs811.c b/drivers/iio/chemical/ccs811.c
> index ce7187ccd706..0e5c79b775a2 100644
> --- a/drivers/iio/chemical/ccs811.c
> +++ b/drivers/iio/chemical/ccs811.c
> @@ -70,7 +70,7 @@ struct ccs811_reading {
>  	u8 status;
>  	u8 error;
>  	__be16 raw_data;
> -} __attribute__((__packed__));
> +} __packed;
>  
>  struct ccs811_data {
>  	struct i2c_client *client;
Re: [PATCH v2] iio: chemical: ccs811: cleanup checkpatch __packed warning
Posted by David Lechner 2 months ago
On 8/1/26 9:25 PM, Adi Nata wrote:
> Change instance of __attribute__((__packed__)) to __packed per
> checkpatch.pl warning.
> 
> Reported by checkpatch:
> FILE: drivers/iio/chemical/ccs811.c

This same feedback applies to all of the other patches you have been
sending. Making checkpatch happy is not a good reason on it's own.
Find out the reason why checkpatch makes this suggestion in the first
place and use that as the justification for such changes.

> 
> WARNING: Prefer __packed over __attribute__((__packed__))
> +} __attribute__((__packed__));
> 
> Signed-off-by: Adi Nata <adinata.softwareengineer@gmail.com>
> 
> v2:
> - Rename commit message to include driver name
> 
> ---
>  drivers/iio/chemical/ccs811.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/iio/chemical/ccs811.c b/drivers/iio/chemical/ccs811.c
> index ce7187ccd706..0e5c79b775a2 100644
> --- a/drivers/iio/chemical/ccs811.c
> +++ b/drivers/iio/chemical/ccs811.c
> @@ -70,7 +70,7 @@ struct ccs811_reading {
>  	u8 status;
>  	u8 error;
>  	__be16 raw_data;
> -} __attribute__((__packed__));
> +} __packed;
>  
>  struct ccs811_data {
>  	struct i2c_client *client;