Skip to contentSkip to conversation

mrf29j40: Drop unneeded of_match_ptr()

PATCH In review Andy Shevchenko 3 participants 5 messages May 31, 2021 – Jun 3, 2021

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

PATCH 1/1 mrf29j40: Drop unneeded of_match_ptr()

Driver can be used in different environments and moreover, when compiled with !OF, the compiler may issue a warning due to unused mrf24j40_of_match variable. Hence drop unneeded of_match_ptr() call.

While at it, update headers block to reflect above changes.

---
 drivers/net/ieee802154/mrf24j40.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/ieee802154/mrf24j40.c +2 -2
index b9be530b285f..ff83e00b77af 100644
@@ -8,8 +8,8 @@
 
 #include <linux/spi/spi.h>
 #include <linux/interrupt.h>
+#include <linux/mod_devicetable.h>
 #include <linux/module.h>
-#include <linux/of.h>
 #include <linux/regmap.h>
 #include <linux/ieee802154.h>
 #include <linux/irq.h>
@@ -1388,7 +1388,7 @@ MODULE_DEVICE_TABLE(spi, mrf24j40_ids);
 
 static struct spi_driver mrf24j40_driver = {
 	.driver = {
-		.of_match_table = of_match_ptr(mrf24j40_of_match),
+		.of_match_table = mrf24j40_of_match,
 		.name = "mrf24j40",
 	},
 	.id_table = mrf24j40_ids,
Signature · 1 line
2.30.2
maintainer
#1 lore raw

Hello.

Quoted 27 lines · Andy Shevchenko

Driver can be used in different environments and moreover, when compiled with !OF, the compiler may issue a warning due to unused mrf24j40_of_match variable. Hence drop unneeded of_match_ptr() call.

While at it, update headers block to reflect above changes.

---
  drivers/net/ieee802154/mrf24j40.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/ieee802154/mrf24j40.c +1 -1
index b9be530b285f..ff83e00b77af 100644
@@ -8,8 +8,8 @@
 
  #include <linux/spi/spi.h>
  #include <linux/interrupt.h>
+#include <linux/mod_devicetable.h>
  #include <linux/module.h>
-#include <linux/of.h>
  #include <linux/regmap.h>
  #include <linux/ieee802154.h>
  #include <linux/irq.h>

drivers/net/ieee802154/mrf24j40.c MODULE_DEVICE_TABLE(spi, mrf24j40_ids); · line 1394

Quoted 8 lines
drivers/net/ieee802154/mrf24j40.c +1 -1
@@ -1388,7 +1388,7 @@ MODULE_DEVICE_TABLE(spi, mrf24j40_ids);
 
  static struct spi_driver mrf24j40_driver = {
  	.driver = {
-		.of_match_table = of_match_ptr(mrf24j40_of_match),
+		.of_match_table = mrf24j40_of_match,
  		.name = "mrf24j40",
  	},
  	.id_table = mrf24j40_ids,

I took the freedom to fix the typo in the subject line and add a better prefix:

net: ieee802154: mrf24j40: Drop unneeded of_match_ptr()

This patch has been applied to the wpan tree and will be part of the next pull request to net. Thanks!

regards
Stefan Schmidt

#2 lore raw
Quoted 6 lines · Stefan Schmidt
Quoted 5 lines · Andy Shevchenko

Driver can be used in different environments and moreover, when compiled with !OF, the compiler may issue a warning due to unused mrf24j40_of_match variable. Hence drop unneeded of_match_ptr() call.

While at it, update headers block to reflect above changes.

...

Quoted 4 lines

I took the freedom to fix the typo in the subject line and add a better prefix:

net: ieee802154: mrf24j40: Drop unneeded of_match_ptr()

Right, thanks!

Quoted 2 lines

This patch has been applied to the wpan tree and will be part of the next pull request to net. Thanks!

Btw, which tree are you using for wpan development? I see one with 6 weeks old commits, is that the correct one?

Signature · 2 lines
With Best Regards,
Andy Shevchenko
maintainer
#3 lore raw

Hello.

Quoted 16 lines · Andy Shevchenko
Quoted 6 lines · Stefan Schmidt
Quoted 5 lines · Andy Shevchenko

Driver can be used in different environments and moreover, when compiled with !OF, the compiler may issue a warning due to unused mrf24j40_of_match variable. Hence drop unneeded of_match_ptr() call.

While at it, update headers block to reflect above changes.

...

Quoted 4 lines

I took the freedom to fix the typo in the subject line and add a better prefix:

net: ieee802154: mrf24j40: Drop unneeded of_match_ptr()

Quoted 7 lines

Right, thanks!

Quoted 2 lines

This patch has been applied to the wpan tree and will be part of the next pull request to net. Thanks!

Btw, which tree are you using for wpan development? I see one with 6 weeks old commits, is that the correct one?

I assume you mean this one:
https://git.kernel.org/pub/scm/linux/kernel/git/sschmidt/wpan.git/

Its the correct one. I was a bit busy lately, but luckily ieee802154 patches again net apply fine most of the time as well.

I collected the piled up patches right now and will send a pull request after some testing later today. Once that is merged I will update my tree as well.

regards
Stefan Schmidt

#4 lore raw
Quoted 19 lines · Stefan Schmidt
Quoted 18 lines · Andy Shevchenko
Quoted 6 lines · Stefan Schmidt
Quoted 5 lines · Andy Shevchenko

Driver can be used in different environments and moreover, when compiled with !OF, the compiler may issue a warning due to unused mrf24j40_of_match variable. Hence drop unneeded of_match_ptr() call.

While at it, update headers block to reflect above changes.

...

Quoted 4 lines

I took the freedom to fix the typo in the subject line and add a better prefix:

net: ieee802154: mrf24j40: Drop unneeded of_match_ptr()

Right, thanks!

Quoted 8 lines
Quoted 5 lines
Quoted 2 lines

This patch has been applied to the wpan tree and will be part of the next pull request to net. Thanks!

Btw, which tree are you using for wpan development? I see one with 6 weeks old commits, is that the correct one?

I assume you mean this one:
https://git.kernel.org/pub/scm/linux/kernel/git/sschmidt/wpan.git/

I think so.

Quoted 6 lines

Its the correct one. I was a bit busy lately, but luckily ieee802154 patches again net apply fine most of the time as well.

I collected the piled up patches right now and will send a pull request after some testing later today. Once that is merged I will update my tree as well.

I see. Thanks for explaining your workflow.

Signature · 2 lines
With Best Regards,
Andy Shevchenko