iio: chemical: cleanup codestyle warning
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
@@ -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
Quoted 5 lines · On Fri, 24 Jul 2026 00:10:38 +0800 Adi Nata…
Reported by checkpatch:
FILE:drivers/iio/chemical/ccs811.cWARNING: Prefer
__packedover __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
Signed-off-by Adi Nata <[email protected]>--- drivers/iio/chemical/ccs811.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/iio/chemical/ccs811.c +1
-1@@ -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
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.cWARNING: Prefer
__packedover __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
__packedper checkpatch.pl warning.Other than that:
Reviewed-by Joshua Crofts <[email protected]>
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
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
@@ -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
David Lechner
reviewerRe: [PATCH v2] iio: chemical: ccs811: cleanup checkpatch __packed warning
Quoted 5 lines · Adi Nata
Change instance of __attribute__((__packed__)) to
__packedper 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
__packedover __attribute__((__packed__)) +} __attribute__((__packed__));Signed-off-by Adi Nata <[email protected]>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@@ -70,7 +70,7 @@ struct ccs811_reading {u8 status;u8 error;__be16 raw_data; -} __attribute__((__packed__)); +} __packed;struct ccs811_data {struct i2c_client *client;
Jonathan Cameron
maintainerRe: [PATCH v2] iio: chemical: ccs811: cleanup checkpatch __packed warning
In reply to Adi NataQuoted 6 lines · On Sun, 2 Aug 2026 10:25:56 +0800 Adi Nata…
Change instance of __attribute__((__packed__)) to
__packedper checkpatch.pl warning.Reported by checkpatch:
FILE:drivers/iio/chemical/ccs811.c
Quoted 6 lines
WARNING: Prefer
__packedover __attribute__((__packed__)) +} __attribute__((__packed__));Signed-off-by Adi Nata <[email protected]>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@@ -70,7 +70,7 @@ struct ccs811_reading {u8 status;u8 error;__be16 raw_data; -} __attribute__((__packed__)); +} __packed;struct ccs811_data {struct i2c_client *client;