linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] iio: am2315: Remove ACPI support
@ 2021-05-04 15:37 Guenter Roeck
  2021-05-04 15:41 ` Andy Shevchenko
  0 siblings, 1 reply; 4+ messages in thread
From: Guenter Roeck @ 2021-05-04 15:37 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: linux-iio, linux-kernel, Guenter Roeck, kernel test robot,
	Andy Shevchenko

With CONFIG_ACPI=n and -Werror, 0-day reports:

drivers/iio/humidity/am2315.c:259:36: error:
	'am2315_acpi_id' defined but not used

According to Andy Shevchenko, the ACPI ID used in this driver is fake
and does not really exist. Remove it and with it ACPI support from
the driver.

Reported-by: kernel test robot <lkp@intel.com>
Cc: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
---
v2: Instead of making am2315_acpi_id depend on CONFIG_ACPI,
    remove ACPI support entirely.

 drivers/iio/humidity/am2315.c | 9 ---------
 1 file changed, 9 deletions(-)

diff --git a/drivers/iio/humidity/am2315.c b/drivers/iio/humidity/am2315.c
index 23bc9c784ef4..8d7ec2f5acf8 100644
--- a/drivers/iio/humidity/am2315.c
+++ b/drivers/iio/humidity/am2315.c
@@ -7,7 +7,6 @@
  * 7-bit I2C address: 0x5C.
  */
 
-#include <linux/acpi.h>
 #include <linux/delay.h>
 #include <linux/i2c.h>
 #include <linux/kernel.h>
@@ -256,17 +255,9 @@ static const struct i2c_device_id am2315_i2c_id[] = {
 };
 MODULE_DEVICE_TABLE(i2c, am2315_i2c_id);
 
-static const struct acpi_device_id am2315_acpi_id[] = {
-	{"AOS2315", 0},
-	{}
-};
-
-MODULE_DEVICE_TABLE(acpi, am2315_acpi_id);
-
 static struct i2c_driver am2315_driver = {
 	.driver = {
 		.name = "am2315",
-		.acpi_match_table = ACPI_PTR(am2315_acpi_id),
 	},
 	.probe =            am2315_probe,
 	.id_table =         am2315_i2c_id,
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] iio: am2315: Remove ACPI support
  2021-05-04 15:37 [PATCH v2] iio: am2315: Remove ACPI support Guenter Roeck
@ 2021-05-04 15:41 ` Andy Shevchenko
  2021-05-08 15:25   ` Jonathan Cameron
  0 siblings, 1 reply; 4+ messages in thread
From: Andy Shevchenko @ 2021-05-04 15:41 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:37 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
>
> According to Andy Shevchenko, the ACPI ID used in this driver is fake
> and does not really exist. Remove it and with it ACPI support from
> the driver.

As I have found zarro evidences, I agree with removal. We must not
create fake ACPI IDs on our owns. If anybody will find a device that
is using this broken ID for real, then we may add it back.
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>

> Reported-by: kernel test robot <lkp@intel.com>
> Cc: Andy Shevchenko <andy.shevchenko@gmail.com>
> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
> ---
> v2: Instead of making am2315_acpi_id depend on CONFIG_ACPI,
>     remove ACPI support entirely.
>
>  drivers/iio/humidity/am2315.c | 9 ---------
>  1 file changed, 9 deletions(-)
>
> diff --git a/drivers/iio/humidity/am2315.c b/drivers/iio/humidity/am2315.c
> index 23bc9c784ef4..8d7ec2f5acf8 100644
> --- a/drivers/iio/humidity/am2315.c
> +++ b/drivers/iio/humidity/am2315.c
> @@ -7,7 +7,6 @@
>   * 7-bit I2C address: 0x5C.
>   */
>
> -#include <linux/acpi.h>
>  #include <linux/delay.h>
>  #include <linux/i2c.h>
>  #include <linux/kernel.h>
> @@ -256,17 +255,9 @@ static const struct i2c_device_id am2315_i2c_id[] = {
>  };
>  MODULE_DEVICE_TABLE(i2c, am2315_i2c_id);
>
> -static const struct acpi_device_id am2315_acpi_id[] = {
> -       {"AOS2315", 0},
> -       {}
> -};
> -
> -MODULE_DEVICE_TABLE(acpi, am2315_acpi_id);
> -
>  static struct i2c_driver am2315_driver = {
>         .driver = {
>                 .name = "am2315",
> -               .acpi_match_table = ACPI_PTR(am2315_acpi_id),
>         },
>         .probe =            am2315_probe,
>         .id_table =         am2315_i2c_id,
> --
> 2.25.1
>


-- 
With Best Regards,
Andy Shevchenko

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] iio: am2315: Remove ACPI support
  2021-05-04 15:41 ` Andy Shevchenko
@ 2021-05-08 15:25   ` Jonathan Cameron
  2021-05-08 15:45     ` Jonathan Cameron
  0 siblings, 1 reply; 4+ messages in thread
From: Jonathan Cameron @ 2021-05-08 15:25 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Guenter Roeck, linux-iio, Linux Kernel Mailing List, kernel test robot

On Tue, 4 May 2021 18:41:02 +0300
Andy Shevchenko <andy.shevchenko@gmail.com> wrote:

> On Tue, May 4, 2021 at 6:37 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
> >
> > According to Andy Shevchenko, the ACPI ID used in this driver is fake
> > and does not really exist. Remove it and with it ACPI support from
> > the driver.  
> 
> As I have found zarro evidences, I agree with removal. We must not
> create fake ACPI IDs on our owns. If anybody will find a device that
> is using this broken ID for real, then we may add it back.
> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>

Applied to the togreg branch of iio.git with the commit message changed to
reflect PRP0001 still working with this gone.

Thanks,

Jonathan
> 
> > Reported-by: kernel test robot <lkp@intel.com>
> > Cc: Andy Shevchenko <andy.shevchenko@gmail.com>
> > Signed-off-by: Guenter Roeck <linux@roeck-us.net>
> > ---
> > v2: Instead of making am2315_acpi_id depend on CONFIG_ACPI,
> >     remove ACPI support entirely.
> >
> >  drivers/iio/humidity/am2315.c | 9 ---------
> >  1 file changed, 9 deletions(-)
> >
> > diff --git a/drivers/iio/humidity/am2315.c b/drivers/iio/humidity/am2315.c
> > index 23bc9c784ef4..8d7ec2f5acf8 100644
> > --- a/drivers/iio/humidity/am2315.c
> > +++ b/drivers/iio/humidity/am2315.c
> > @@ -7,7 +7,6 @@
> >   * 7-bit I2C address: 0x5C.
> >   */
> >
> > -#include <linux/acpi.h>
> >  #include <linux/delay.h>
> >  #include <linux/i2c.h>
> >  #include <linux/kernel.h>
> > @@ -256,17 +255,9 @@ static const struct i2c_device_id am2315_i2c_id[] = {
> >  };
> >  MODULE_DEVICE_TABLE(i2c, am2315_i2c_id);
> >
> > -static const struct acpi_device_id am2315_acpi_id[] = {
> > -       {"AOS2315", 0},
> > -       {}
> > -};
> > -
> > -MODULE_DEVICE_TABLE(acpi, am2315_acpi_id);
> > -
> >  static struct i2c_driver am2315_driver = {
> >         .driver = {
> >                 .name = "am2315",
> > -               .acpi_match_table = ACPI_PTR(am2315_acpi_id),
> >         },
> >         .probe =            am2315_probe,
> >         .id_table =         am2315_i2c_id,
> > --
> > 2.25.1
> >  
> 
> 


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] iio: am2315: Remove ACPI support
  2021-05-08 15:25   ` Jonathan Cameron
@ 2021-05-08 15:45     ` Jonathan Cameron
  0 siblings, 0 replies; 4+ messages in thread
From: Jonathan Cameron @ 2021-05-08 15:45 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Guenter Roeck, linux-iio, Linux Kernel Mailing List, kernel test robot

On Sat, 8 May 2021 16:25:35 +0100
Jonathan Cameron <jic23@kernel.org> wrote:

> On Tue, 4 May 2021 18:41:02 +0300
> Andy Shevchenko <andy.shevchenko@gmail.com> wrote:
> 
> > On Tue, May 4, 2021 at 6:37 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
> > >
> > > According to Andy Shevchenko, the ACPI ID used in this driver is fake
> > > and does not really exist. Remove it and with it ACPI support from
> > > the driver.    
> > 
> > As I have found zarro evidences, I agree with removal. We must not
> > create fake ACPI IDs on our owns. If anybody will find a device that
> > is using this broken ID for real, then we may add it back.
> > Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>  
> 
> Applied to the togreg branch of iio.git with the commit message changed to
> reflect PRP0001 still working with this gone.

Changed that commit message again, after realizing that there is
not of_device_id table in this driver currently so I don't think PRP0001
current works either.

> 
> Thanks,
> 
> Jonathan
> >   
> > > Reported-by: kernel test robot <lkp@intel.com>
> > > Cc: Andy Shevchenko <andy.shevchenko@gmail.com>
> > > Signed-off-by: Guenter Roeck <linux@roeck-us.net>
> > > ---
> > > v2: Instead of making am2315_acpi_id depend on CONFIG_ACPI,
> > >     remove ACPI support entirely.
> > >
> > >  drivers/iio/humidity/am2315.c | 9 ---------
> > >  1 file changed, 9 deletions(-)
> > >
> > > diff --git a/drivers/iio/humidity/am2315.c b/drivers/iio/humidity/am2315.c
> > > index 23bc9c784ef4..8d7ec2f5acf8 100644
> > > --- a/drivers/iio/humidity/am2315.c
> > > +++ b/drivers/iio/humidity/am2315.c
> > > @@ -7,7 +7,6 @@
> > >   * 7-bit I2C address: 0x5C.
> > >   */
> > >
> > > -#include <linux/acpi.h>
> > >  #include <linux/delay.h>
> > >  #include <linux/i2c.h>
> > >  #include <linux/kernel.h>
> > > @@ -256,17 +255,9 @@ static const struct i2c_device_id am2315_i2c_id[] = {
> > >  };
> > >  MODULE_DEVICE_TABLE(i2c, am2315_i2c_id);
> > >
> > > -static const struct acpi_device_id am2315_acpi_id[] = {
> > > -       {"AOS2315", 0},
> > > -       {}
> > > -};
> > > -
> > > -MODULE_DEVICE_TABLE(acpi, am2315_acpi_id);
> > > -
> > >  static struct i2c_driver am2315_driver = {
> > >         .driver = {
> > >                 .name = "am2315",
> > > -               .acpi_match_table = ACPI_PTR(am2315_acpi_id),
> > >         },
> > >         .probe =            am2315_probe,
> > >         .id_table =         am2315_i2c_id,
> > > --
> > > 2.25.1
> > >    
> > 
> >   
> 


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-05-08 15:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-04 15:37 [PATCH v2] iio: am2315: Remove ACPI support Guenter Roeck
2021-05-04 15:41 ` Andy Shevchenko
2021-05-08 15:25   ` Jonathan Cameron
2021-05-08 15:45     ` Jonathan Cameron

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).