[PATCH] iio: chemical: cleanup codestyle warning

Adi Nata posted 1 patch 12 hours ago
drivers/iio/chemical/ccs811.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] iio: chemical: cleanup codestyle warning
Posted by Adi Nata 12 hours ago
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>
---
 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] iio: chemical: cleanup codestyle warning
Posted by Joshua Crofts 7 hours ago
On Fri, 24 Jul 2026 00:10:38 +0800
Adi Nata <adinata.softwareengineer@gmail.com> wrote:

> Reported by checkpatch:
> FILE: drivers/iio/chemical/ccs811.c
> 
> WARNING: Prefer __packed over __attribute__((__packed__))
> +} __attribute__((__packed__));

Perhaps a nit, but I'd change the commit title to "prefer __packed"
and the commit message to something like:

"Change instance of __attribute__((__packed__)) to __packed per
checkpatch.pl warning.

Other than that:

Reviewed-by: Joshua Crofts <joshua.crofts1@gmail.com>
> 
> Signed-off-by: Adi Nata <adinata.softwareengineer@gmail.com>
> ---
>  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;

-- 
Kind regards,
Joshua Crofts
Re: [PATCH] iio: chemical: cleanup codestyle warning
Posted by Joshua Crofts 6 hours ago
On Thu, 23 Jul 2026 23:51:39 +0200
Joshua Crofts <joshua.crofts1@gmail.com> wrote:

> On Fri, 24 Jul 2026 00:10:38 +0800
> Adi Nata <adinata.softwareengineer@gmail.com> wrote:
> 
> > Reported by checkpatch:
> > FILE: drivers/iio/chemical/ccs811.c
> > 
> > WARNING: Prefer __packed over __attribute__((__packed__))
> > +} __attribute__((__packed__));  
> 
> Perhaps a nit, but I'd change the commit title to "prefer __packed"
> and the commit message to something like:
> 
> "Change instance of __attribute__((__packed__)) to __packed per
> checkpatch.pl warning.
> 
> Other than that:
> 
> Reviewed-by: Joshua Crofts <joshua.crofts1@gmail.com>

Additionally, you're missing the driver name in the subject/commit
message, it should be something like "iio: chemical: ccs811: prefer __packed"
-- 
Kind regards,
Joshua Crofts