Skip to contentSkip to conversation

iio: chemical: sgp30: cleanup codestyle warning

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

lore
Share & tools
lore

Adi Nata

author
#0 lore raw

PATCH 1/1 iio: chemical: sgp30: cleanup codestyle warning

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

---
 drivers/iio/chemical/sgp30.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/chemical/sgp30.c +1 -1
index f10bbebc29e4..c33592a1e0c9 100644
@@ -82,7 +82,7 @@ struct sgp_version {
 struct sgp_crc_word {
 	__be16 value;
 	u8 crc8;
-} __attribute__((__packed__));
+} __packed;
 
 union sgp_reading {
 	u8 start;
Signature · 1 line
2.47.3
Reviewed-by on v1 1/1
#1 lore raw
Quoted 7 lines · On Fri, 24 Jul 2026 00:18:49 +0800 Adi Nata…

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

---

Same issues as with your previous patch. Additionally, the subject contains two [PATCH] tags, perhaps you've used git format-patch or git send-email incorrectly?

After fixing:

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

PATCH v2 1/1 iio: chemical: sgp30: fix checkpatch warn to prefer __packed

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

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

v2:
- Rename commit title and message

---
 drivers/iio/chemical/sgp30.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/chemical/sgp30.c +1 -1
index f10bbebc29e4..c33592a1e0c9 100644
@@ -82,7 +82,7 @@ struct sgp_version {
 struct sgp_crc_word {
 	__be16 value;
 	u8 crc8;
-} __attribute__((__packed__));
+} __packed;
 
 union sgp_reading {
 	u8 start;
Signature · 1 line
2.47.3
Acked-by on v2 1/1
#3 lore raw

Re: [PATCH v2] iio: chemical: sgp30: fix checkpatch warn to prefer __packed

Hello,

Just a few nitpicks. These might not justify a v3, as Jonathan sometimes fixes up such thing while applying.

Quoted 10 lines · Adi Nata

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

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

No empty lines in the S-o-B block, and please put your S-o-b last.

Quoted 2 lines

v2:
- Rename commit title and message

the v2 changelog belongs after the tripple dash.

Quoted 10 lines
---
 drivers/iio/chemical/sgp30.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/chemical/sgp30.c +0 -0
index f10bbebc29e4..c33592a1e0c9 100644

drivers/iio/chemical/sgp30.c struct sgp_version { · line 85

Quoted 5 lines
drivers/iio/chemical/sgp30.c +1 -1
@@ -82,7 +82,7 @@ struct sgp_version {
 struct sgp_crc_word {
 	__be16 value;
 	u8 crc8;
-} __attribute__((__packed__));
+} __packed;

Otherwise looks fine.

Best regards
Uwe

maintainer
#4 lore raw

Re: [PATCH v2] iio: chemical: sgp30: fix checkpatch warn to prefer __packed

Quoted 4 lines · On Sun, 2 Aug 2026 14:34:59 +0200 Uwe Kleine-König…

Hello,

Just a few nitpicks. These might not justify a v3, as Jonathan sometimes fixes up such thing while applying.

There are enough things across various patches from Adi that I'd like new versions incorporating all the various bits of feedback.

But wait a few days first in case there is more to come from additional reviewers!

Thanks,

Jonathan

Quoted 42 lines · Adi Nata
Quoted 10 lines

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

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

No empty lines in the S-o-B block, and please put your S-o-b last.

Quoted 2 lines

v2:
- Rename commit title and message

the v2 changelog belongs after the tripple dash.

Quoted 10 lines
---
 drivers/iio/chemical/sgp30.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/chemical/sgp30.c +0 -0
index f10bbebc29e4..c33592a1e0c9 100644

drivers/iio/chemical/sgp30.c struct sgp_version { · line 85

Quoted 5 lines
drivers/iio/chemical/sgp30.c +1 -1
@@ -82,7 +82,7 @@ struct sgp_version {
 struct sgp_crc_word {
 	__be16 value;
 	u8 crc8;
-} __attribute__((__packed__));
+} __packed;  

Otherwise looks fine.

Best regards
Uwe