* [PATCH] iio: am2315: Make am2315_acpi_id depend on CONFIG_ACPI
@ 2021-05-04 14:30 Guenter Roeck
2021-05-04 15:11 ` Andy Shevchenko
0 siblings, 1 reply; 4+ messages in thread
From: Guenter Roeck @ 2021-05-04 14:30 UTC (permalink / raw)
To: Jonathan Cameron
Cc: linux-iio, linux-kernel, Guenter Roeck, kernel test robot
With CONFIG_ACPI=n and -Werror, 0-day reports:
drivers/iio/humidity/am2315.c:259:36: error:
'am2315_acpi_id' defined but not used
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
---
drivers/iio/humidity/am2315.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/iio/humidity/am2315.c b/drivers/iio/humidity/am2315.c
index 23bc9c784ef4..e876b039c38f 100644
--- a/drivers/iio/humidity/am2315.c
+++ b/drivers/iio/humidity/am2315.c
@@ -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 = {
--
2.25.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] iio: am2315: Make am2315_acpi_id depend on CONFIG_ACPI
2021-05-04 14:30 [PATCH] iio: am2315: Make am2315_acpi_id depend on CONFIG_ACPI Guenter Roeck
@ 2021-05-04 15:11 ` Andy Shevchenko
2021-05-04 15:15 ` Andy Shevchenko
0 siblings, 1 reply; 4+ messages in thread
From: Andy Shevchenko @ 2021-05-04 15:11 UTC (permalink / raw)
To: Guenter Roeck
Cc: Jonathan Cameron, linux-iio, Linux Kernel Mailing List,
kernel test robot
On Tue, May 4, 2021 at 5:41 PM Guenter Roeck <linux@roeck-us.net> wrote:
>
> With CONFIG_ACPI=n and -Werror, 0-day reports:
>
> drivers/iio/humidity/am2315.c:259:36: error:
> 'am2315_acpi_id' defined but not used
...
> +#ifdef CONFIG_ACPI
> static 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).
> {}
> };
> -
> MODULE_DEVICE_TABLE(acpi, am2315_acpi_id);
> +#endif
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] iio: am2315: Make am2315_acpi_id depend on CONFIG_ACPI
2021-05-04 15:11 ` Andy Shevchenko
@ 2021-05-04 15:15 ` Andy Shevchenko
2021-05-04 15:34 ` Guenter Roeck
0 siblings, 1 reply; 4+ messages in thread
From: Andy Shevchenko @ 2021-05-04 15:15 UTC (permalink / raw)
To: Guenter Roeck
Cc: Jonathan Cameron, linux-iio, Linux Kernel Mailing List,
kernel test robot
On Tue, May 4, 2021 at 6:11 PM Andy Shevchenko
<andy.shevchenko@gmail.com> wrote:
>
> On Tue, May 4, 2021 at 5:41 PM Guenter Roeck <linux@roeck-us.net> wrote:
> >
> > With CONFIG_ACPI=n and -Werror, 0-day reports:
> >
> > drivers/iio/humidity/am2315.c:259:36: error:
> > 'am2315_acpi_id' defined but not used
>
> ...
>
> > +#ifdef CONFIG_ACPI
> > static 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).
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)
> > {}
> > };
> > -
> > MODULE_DEVICE_TABLE(acpi, am2315_acpi_id);
> > +#endif
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] iio: am2315: Make am2315_acpi_id depend on CONFIG_ACPI
2021-05-04 15:15 ` Andy Shevchenko
@ 2021-05-04 15:34 ` Guenter Roeck
0 siblings, 0 replies; 4+ messages in thread
From: Guenter Roeck @ 2021-05-04 15:34 UTC (permalink / raw)
To: Andy Shevchenko
Cc: Jonathan Cameron, linux-iio, Linux Kernel Mailing List,
kernel test robot
Hi Andy,
On Tue, May 04, 2021 at 06:15:44PM +0300, Andy Shevchenko wrote:
> On Tue, May 4, 2021 at 6:11 PM Andy Shevchenko
> <andy.shevchenko@gmail.com> wrote:
> >
> > On Tue, May 4, 2021 at 5:41 PM Guenter Roeck <linux@roeck-us.net> wrote:
> > >
> > > With CONFIG_ACPI=n and -Werror, 0-day reports:
> > >
> > > drivers/iio/humidity/am2315.c:259:36: error:
> > > 'am2315_acpi_id' defined but not used
> >
> > ...
> >
> > > +#ifdef CONFIG_ACPI
> > > static 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).
>
> 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.
> 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
> > > {}
> > > };
> > > -
> > > MODULE_DEVICE_TABLE(acpi, am2315_acpi_id);
> > > +#endif
>
>
> --
> With Best Regards,
> Andy Shevchenko
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-05-04 15:34 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-04 14:30 [PATCH] iio: am2315: Make am2315_acpi_id depend on CONFIG_ACPI Guenter Roeck
2021-05-04 15:11 ` Andy Shevchenko
2021-05-04 15:15 ` Andy Shevchenko
2021-05-04 15:34 ` Guenter Roeck
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).