Skip to contentSkip to conversation

iio: common: ssp_sensors: Use __packed instead of __packed__

PATCH Superseded Andy Shevchenko 2 participants 3 messages Nov 27 – Nov 30 IIO

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 iio: common: ssp_sensors: Use __packed instead of __packed__

Sparse can't recognise __packed__ attribute:

.../ssp_sensors/ssp_dev.c:30:3: warning: symbol '__packed__' was not declared. Should it be static?

Use __packed instead of __packed__ to make sparse happy

---
 drivers/iio/common/ssp_sensors/ssp_dev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/common/ssp_sensors/ssp_dev.c +1 -1
index 40b658d39294..456d59dc53dd 100644
@@ -27,7 +27,7 @@ struct ssp_instruction {
 	__le32 a;
 	__le32 b;
 	u8 c;
-} __packed__;
+} __packed;
 
 static const u8 ssp_magnitude_table[] = {110, 85, 171, 71, 203, 195, 0, 67,
 	208, 56, 175, 244, 206, 213, 0, 92, 250, 0, 55, 48, 189, 252, 171,
Signature · 1 line
2.50.1
maintainer
#1 lore raw
Quoted 7 lines · On Fri, 27 Nov 2026 12:58:52 +0100 Andy Shevchenko…

Sparse can't recognise __packed__ attribute:

.../ssp_sensors/ssp_dev.c:30:3: warning: symbol '__packed__' was not declared. Should it be static?

Use __packed instead of __packed__ to make sparse happy

https://sashiko.dev/#/patchset/20261127115852.1720736-1-andriy.shevchenko%40linux.intel.com

I'd been meaning to look into this warning. Seems rather nastier than simply confusing sparse.

Is sashiko right?

Jonathan

Quoted 17 lines
---
 drivers/iio/common/ssp_sensors/ssp_dev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/common/ssp_sensors/ssp_dev.c +1 -1
index 40b658d39294..456d59dc53dd 100644
@@ -27,7 +27,7 @@ struct ssp_instruction {
 	__le32 a;
 	__le32 b;
 	u8 c;
-} __packed__;
+} __packed;
 
 static const u8 ssp_magnitude_table[] = {110, 85, 171, 71, 203, 195, 0, 67,
 	208, 56, 175, 244, 206, 213, 0, 92, 250, 0, 55, 48, 189, 252, 171,
#2 lore raw
Quoted 9 lines · Jonathan Cameron
Quoted 6 lines · On Fri, 27 Nov 2026 12:58:52 +0100 Andy Shevchenko…

Sparse can't recognise __packed__ attribute:

.../ssp_sensors/ssp_dev.c:30:3: warning: symbol '__packed__' was not declared. Should it be static?

Use __packed instead of __packed__ to make sparse happy

Quoted 7 lines
Quoted 1 line

https://sashiko.dev/#/patchset/20261127115852.1720736-1-andriy.shevchenko%40linux.intel.com

I'd been meaning to look into this warning. Seems rather nastier than simply confusing sparse.

Is sashiko right?

Ha, Sashiko is semi-right, this is a regression that my patch actually fixes! I will send a v2 with an amended commit message and necessary tags.

Signature · 2 lines
With Best Regards,
Andy Shevchenko