Skip to contentSkip to conversation

iio: chemical: cleanup codestyle warning

PATCH In review Adi Nata 4 participants 6 messages Jul 23 – Aug 2 IIO

lore
Share & tools
lore

Adi Nata

author
#0 lore raw

PATCH 1/1 iio: chemical: cleanup codestyle warning

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

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

---
 drivers/iio/chemical/ccs811.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/chemical/ccs811.c +1 -1
index ce7187ccd706..0e5c79b775a2 100644
@@ -70,7 +70,7 @@ struct ccs811_reading {
 	u8 status;
 	u8 error;
 	__be16 raw_data;
-} __attribute__((__packed__));
+} __packed;
 
 struct ccs811_data {
 	struct i2c_client *client;
Signature · 1 line
2.47.3
Reviewed-by on v1 1/1
#1 lore raw
Quoted 5 lines · On Fri, 24 Jul 2026 00:10:38 +0800 Adi Nata…

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:

Quoted 19 lines
---
 drivers/iio/chemical/ccs811.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/chemical/ccs811.c +1 -1
index ce7187ccd706..0e5c79b775a2 100644
@@ -70,7 +70,7 @@ struct ccs811_reading {
 	u8 status;
 	u8 error;
 	__be16 raw_data;
-} __attribute__((__packed__));
+} __packed;
 
 struct ccs811_data {
 	struct i2c_client *client;
Signature · 2 lines
Kind regards,
Joshua Crofts
#2 lore raw
Quoted 12 lines · On Thu, 23 Jul 2026 23:51:39 +0200 Joshua Crofts <[email protected]>…
Quoted 5 lines · On Fri, 24 Jul 2026 00:10:38 +0800 Adi Nata…

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:

Quoted 6 lines

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

Other than that:

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

Signature · 2 lines
Kind regards,
Joshua Crofts
author
#3 lore raw

PATCH v2 1/1 iio: chemical: ccs811: cleanup checkpatch __packed warning

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__));

v2:
- Rename commit message to include driver name

---
 drivers/iio/chemical/ccs811.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/chemical/ccs811.c +1 -1
index ce7187ccd706..0e5c79b775a2 100644
@@ -70,7 +70,7 @@ struct ccs811_reading {
 	u8 status;
 	u8 error;
 	__be16 raw_data;
-} __attribute__((__packed__));
+} __packed;
 
 struct ccs811_data {
 	struct i2c_client *client;
Signature · 1 line
2.47.3
reviewer
#4 lore raw

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

Quoted 5 lines · Adi Nata

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.

Quoted 26 lines

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

v2:
- Rename commit message to include driver name

---
 drivers/iio/chemical/ccs811.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/chemical/ccs811.c +1 -1
index ce7187ccd706..0e5c79b775a2 100644
@@ -70,7 +70,7 @@ struct ccs811_reading {
 	u8 status;
 	u8 error;
 	__be16 raw_data;
-} __attribute__((__packed__));
+} __packed;
 
 struct ccs811_data {
 	struct i2c_client *client;
maintainer
#5 lore raw

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

In reply to Adi Nata
Quoted 6 lines · On Sun, 2 Aug 2026 10:25:56 +0800 Adi Nata…

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

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

Quoted 6 lines

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

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

Quoted 19 lines

- Rename commit message to include driver name

---
 drivers/iio/chemical/ccs811.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/chemical/ccs811.c +1 -1
index ce7187ccd706..0e5c79b775a2 100644
@@ -70,7 +70,7 @@ struct ccs811_reading {
 	u8 status;
 	u8 error;
 	__be16 raw_data;
-} __attribute__((__packed__));
+} __packed;
 
 struct ccs811_data {
 	struct i2c_client *client;