2020-12-21 20:05:46

by Souptick Joarder

[permalink] [raw]
Subject: [PATCH] input: ariel-pwrbutton.c: Remove unused variable ariel_pwrbutton_id_table[]

Kernel test robot throws below warning ->

>> drivers/input/misc/ariel-pwrbutton.c:152:35: warning: unused variable
>> 'ariel_pwrbutton_id_table' [-Wunused-const-variable]
static const struct spi_device_id ariel_pwrbutton_id_table[] = {
^
1 warning generated.

Remove unused variable ariel_pwrbutton_id_table[] if no plan to use
it further.

Reported-by: kernel test robot <[email protected]>
Signed-off-by: Souptick Joarder <[email protected]>
---
drivers/input/misc/ariel-pwrbutton.c | 6 ------
1 file changed, 6 deletions(-)

diff --git a/drivers/input/misc/ariel-pwrbutton.c b/drivers/input/misc/ariel-pwrbutton.c
index eda86ab..17bbaac 100644
--- a/drivers/input/misc/ariel-pwrbutton.c
+++ b/drivers/input/misc/ariel-pwrbutton.c
@@ -149,12 +149,6 @@ static int ariel_pwrbutton_probe(struct spi_device *spi)
};
MODULE_DEVICE_TABLE(of, ariel_pwrbutton_of_match);

-static const struct spi_device_id ariel_pwrbutton_id_table[] = {
- { "wyse-ariel-ec-input", 0 },
- {}
-};
-MODULE_DEVICE_TABLE(spi, ariel_pwrbutton_id_table);
-
static struct spi_driver ariel_pwrbutton_driver = {
.driver = {
.name = "dell-wyse-ariel-ec-input",
--
1.9.1


2020-12-29 07:46:49

by Souptick Joarder

[permalink] [raw]
Subject: Re: [PATCH] input: ariel-pwrbutton.c: Remove unused variable ariel_pwrbutton_id_table[]

On Tue, Dec 22, 2020 at 1:34 AM Souptick Joarder <[email protected]> wrote:
>
> Kernel test robot throws below warning ->
>
> >> drivers/input/misc/ariel-pwrbutton.c:152:35: warning: unused variable
> >> 'ariel_pwrbutton_id_table' [-Wunused-const-variable]
> static const struct spi_device_id ariel_pwrbutton_id_table[] = {
> ^
> 1 warning generated.
>
> Remove unused variable ariel_pwrbutton_id_table[] if no plan to use
> it further.
>
> Reported-by: kernel test robot <[email protected]>
> Signed-off-by: Souptick Joarder <[email protected]>

Any comment on this patch ?

> ---
> drivers/input/misc/ariel-pwrbutton.c | 6 ------
> 1 file changed, 6 deletions(-)
>
> diff --git a/drivers/input/misc/ariel-pwrbutton.c b/drivers/input/misc/ariel-pwrbutton.c
> index eda86ab..17bbaac 100644
> --- a/drivers/input/misc/ariel-pwrbutton.c
> +++ b/drivers/input/misc/ariel-pwrbutton.c
> @@ -149,12 +149,6 @@ static int ariel_pwrbutton_probe(struct spi_device *spi)
> };
> MODULE_DEVICE_TABLE(of, ariel_pwrbutton_of_match);
>
> -static const struct spi_device_id ariel_pwrbutton_id_table[] = {
> - { "wyse-ariel-ec-input", 0 },
> - {}
> -};
> -MODULE_DEVICE_TABLE(spi, ariel_pwrbutton_id_table);
> -
> static struct spi_driver ariel_pwrbutton_driver = {
> .driver = {
> .name = "dell-wyse-ariel-ec-input",
> --
> 1.9.1
>

2021-01-04 23:39:03

by Dmitry Torokhov

[permalink] [raw]
Subject: Re: [PATCH] input: ariel-pwrbutton.c: Remove unused variable ariel_pwrbutton_id_table[]

On Tue, Dec 29, 2020 at 01:15:10PM +0530, Souptick Joarder wrote:
> On Tue, Dec 22, 2020 at 1:34 AM Souptick Joarder <[email protected]> wrote:
> >
> > Kernel test robot throws below warning ->
> >
> > >> drivers/input/misc/ariel-pwrbutton.c:152:35: warning: unused variable
> > >> 'ariel_pwrbutton_id_table' [-Wunused-const-variable]
> > static const struct spi_device_id ariel_pwrbutton_id_table[] = {
> > ^
> > 1 warning generated.
> >
> > Remove unused variable ariel_pwrbutton_id_table[] if no plan to use
> > it further.
> >
> > Reported-by: kernel test robot <[email protected]>
> > Signed-off-by: Souptick Joarder <[email protected]>
>
> Any comment on this patch ?

Lubomir, would you prefer to remove the table or add it to the driver
structure as ariel_pwrbutton_driver->id_table?

Thanks.

--
Dmitry

2021-01-12 11:12:26

by Lubomir Rintel

[permalink] [raw]
Subject: Re: [PATCH] input: ariel-pwrbutton.c: Remove unused variable ariel_pwrbutton_id_table[]

On Mon, Jan 04, 2021 at 02:02:13PM -0800, Dmitry Torokhov wrote:
> On Tue, Dec 29, 2020 at 01:15:10PM +0530, Souptick Joarder wrote:
> > On Tue, Dec 22, 2020 at 1:34 AM Souptick Joarder <[email protected]> wrote:
> > >
> > > Kernel test robot throws below warning ->
> > >
> > > >> drivers/input/misc/ariel-pwrbutton.c:152:35: warning: unused variable
> > > >> 'ariel_pwrbutton_id_table' [-Wunused-const-variable]
> > > static const struct spi_device_id ariel_pwrbutton_id_table[] = {
> > > ^
> > > 1 warning generated.
> > >
> > > Remove unused variable ariel_pwrbutton_id_table[] if no plan to use
> > > it further.
> > >
> > > Reported-by: kernel test robot <[email protected]>
> > > Signed-off-by: Souptick Joarder <[email protected]>
> >
> > Any comment on this patch ?
>
> Lubomir, would you prefer to remove the table or add it to the driver
> structure as ariel_pwrbutton_driver->id_table?

I believe it can be safely dropped, as the OF match seems to be
sufficient.

Thank you for the patch Souptick.

Reviewed-by: Lubomir Rintel <[email protected]>

>
> Thanks.
>
> --
> Dmitry

2021-01-12 11:13:18

by Dmitry Torokhov

[permalink] [raw]
Subject: Re: [PATCH] input: ariel-pwrbutton.c: Remove unused variable ariel_pwrbutton_id_table[]

On Tue, Jan 12, 2021 at 04:20:28AM +0100, Lubomir Rintel wrote:
> On Mon, Jan 04, 2021 at 02:02:13PM -0800, Dmitry Torokhov wrote:
> > On Tue, Dec 29, 2020 at 01:15:10PM +0530, Souptick Joarder wrote:
> > > On Tue, Dec 22, 2020 at 1:34 AM Souptick Joarder <[email protected]> wrote:
> > > >
> > > > Kernel test robot throws below warning ->
> > > >
> > > > >> drivers/input/misc/ariel-pwrbutton.c:152:35: warning: unused variable
> > > > >> 'ariel_pwrbutton_id_table' [-Wunused-const-variable]
> > > > static const struct spi_device_id ariel_pwrbutton_id_table[] = {
> > > > ^
> > > > 1 warning generated.
> > > >
> > > > Remove unused variable ariel_pwrbutton_id_table[] if no plan to use
> > > > it further.
> > > >
> > > > Reported-by: kernel test robot <[email protected]>
> > > > Signed-off-by: Souptick Joarder <[email protected]>
> > >
> > > Any comment on this patch ?
> >
> > Lubomir, would you prefer to remove the table or add it to the driver
> > structure as ariel_pwrbutton_driver->id_table?
>
> I believe it can be safely dropped, as the OF match seems to be
> sufficient.
>
> Thank you for the patch Souptick.
>
> Reviewed-by: Lubomir Rintel <[email protected]>

Applied, thank you.

--
Dmitry