Skip to contentSkip to conversation

input: ariel-pwrbutton.c: Remove unused variable ariel_pwrbutton_id_table[]

PATCH Applied Souptick Joarder 3 participants 5 messages Dec 21, 2020 – Jan 12, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 input: ariel-pwrbutton.c: Remove unused variable ariel_pwrbutton_id_table[]

Kernel test robot throws below warning ->

Quoted 2 lines
Quoted 2 lines

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.

---
 drivers/input/misc/ariel-pwrbutton.c | 6 ------
 1 file changed, 6 deletions(-)
drivers/input/misc/ariel-pwrbutton.c +0 -6
index eda86ab..17bbaac 100644
@@ -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",
Signature · 1 line
1.9.1
#1 lore raw
Quoted 7 lines · Souptick Joarder

Kernel test robot throws below warning ->

Quoted 2 lines
Quoted 2 lines

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[] = {
                                     ^
Quoted 7 lines

1 warning generated.

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

Any comment on this patch ?

Quoted 24 lines
---
 drivers/input/misc/ariel-pwrbutton.c | 6 ------
 1 file changed, 6 deletions(-)
drivers/input/misc/ariel-pwrbutton.c +0 -7
index eda86ab..17bbaac 100644
@@ -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

maintainer
#2 lore raw
Quoted 10 lines · Souptick Joarder
Quoted 9 lines · Souptick Joarder

Kernel test robot throws below warning ->

Quoted 2 lines
Quoted 2 lines

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.

Quoted 7 lines
Quoted 5 lines

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

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.

Signature · 1 line
Dmitry
Reviewed-by
#3 lore raw
Quoted 14 lines · Dmitry Torokhov
Quoted 13 lines · Souptick Joarder
Quoted 12 lines · Souptick Joarder

Kernel test robot throws below warning ->

Quoted 2 lines
Quoted 2 lines

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.

Quoted 7 lines
Quoted 4 lines
Quoted 2 lines

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.

Quoted 5 lines

Thanks.

Signature · 1 line
Dmitry
maintainer Applied
#4 lore raw
Quoted 23 lines · Lubomir Rintel
Quoted 14 lines · Dmitry Torokhov
Quoted 13 lines · Souptick Joarder
Quoted 12 lines · Souptick Joarder

Kernel test robot throws below warning ->

Quoted 2 lines
Quoted 2 lines

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.

Quoted 7 lines
Quoted 4 lines
Quoted 2 lines

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?

Quoted 6 lines

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

Thank you for the patch Souptick.

Applied, thank you.

Signature · 1 line
Dmitry