iio: am2315: Make am2315_acpi_id depend on CONFIG_ACPI
PATCH 1/1 iio: am2315: Make am2315_acpi_id depend on CONFIG_ACPI
With CONFIG_ACPI=n and -Werror, 0-day reports:
drivers/iio/humidity/am2315.c:259:36: error:
'am2315_acpi_id' defined but not used
--- drivers/iio/humidity/am2315.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/iio/humidity/am2315.c +2 -1
@@ -256,12 +256,13 @@ static const struct i2c_device_id am2315_i2c_id[] = { };MODULE_DEVICE_TABLE (i2c, am2315_i2c_id); +#ifdef CONFIG_ACPI static const struct acpi_device_id am2315_acpi_id[] = { {"AOS2315" ,0 }, {} }; -MODULE_DEVICE_TABLE (acpi, am2315_acpi_id); +#endif static struct i2c_driver am2315_driver = { .driver = {
Signature · 1 line
2.25.1
Quoted 5 lines · Guenter Roeck
With
CONFIG_ACPI=nand -Werror, 0-day reports:
drivers/iio/humidity/am2315.c:259:36: error:
'am2315_acpi_id' defined but not used
...
Quoted 3 lines
+#ifdef
CONFIG_ACPIstatic const struct acpi_device_id am2315_acpi_id[] = { {"AOS2315", 0},
This is a fake ID according to the specification. Do we have any proof that it's being used in the wild?
If no, I prefer to drop this ID section entirely.
If yes, needs a comment which device is using it (however it may be out of the scope of this fix).
Quoted 5 lines
{}};
drivers/iio/humidity/am2315.c +1
-1-MODULE_DEVICE_TABLE (acpi, am2315_acpi_id); +#endif
Signature · 2 lines
With Best Regards, Andy Shevchenko
Quoted 14 lines · Andy Shevchenko
Quoted 5 lines · Guenter Roeck
With
CONFIG_ACPI=nand -Werror, 0-day reports:
drivers/iio/humidity/am2315.c:259:36: error:
'am2315_acpi_id' defined but not used...
Quoted 3 lines
+#ifdef
CONFIG_ACPIstatic const struct acpi_device_id am2315_acpi_id[] = { {"AOS2315", 0},
Quoted 6 lines
This is a fake ID according to the specification. Do we have any proof that it's being used in the wild?
If no, I prefer to drop this ID section entirely.If yes, needs a comment which device is using it (however it may be out of the scope of this fix).
Googling shows zarro results.
(Yes, I know about meta-acpi project and I may fix it there, but it may not be considered as a "being in the wild")
So, please, remove the entire section.
Feel free to add any tag from me (Rb, Ack)
Quoted 5 lines
Quoted 5 lines
{}};
drivers/iio/humidity/am2315.c +1
-1-MODULE_DEVICE_TABLE (acpi, am2315_acpi_id); +#endif
Signature · 2 lines
With Best Regards, Andy Shevchenko
Hi Andy,
Quoted 23 lines · Andy Shevchenko
Quoted 14 lines · Andy Shevchenko
Quoted 5 lines · Guenter Roeck
With
CONFIG_ACPI=nand -Werror, 0-day reports:
drivers/iio/humidity/am2315.c:259:36: error:
'am2315_acpi_id' defined but not used...
Quoted 3 lines
+#ifdef
CONFIG_ACPIstatic const struct acpi_device_id am2315_acpi_id[] = { {"AOS2315", 0},Quoted 6 lines
This is a fake ID according to the specification. Do we have any proof that it's being used in the wild?
If no, I prefer to drop this ID section entirely.If yes, needs a comment which device is using it (however it may be out of the scope of this fix).
Quoted 7 lines
Googling shows zarro results.
(Yes, I know about meta-acpi project and I may fix it there, but it may not be considered as a "being in the wild")
So, please, remove the entire section.
I'll send v2.
Quoted 2 lines
Feel free to add any tag from me (Rb, Ack)
Since the change is substantial, I don't feel comfortable doing that. I'll copy you on v2 and let you add the tags yourself.
Thanks,
Guenter
Quoted 10 lines
Quoted 5 lines
Quoted 5 lines
{}};
drivers/iio/humidity/am2315.c +1
-1-MODULE_DEVICE_TABLE (acpi, am2315_acpi_id); +#endif Signature · 2 lines
With Best Regards, Andy Shevchenko