netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] atm: fore200e: Drop unnecessary of_match_device()
@ 2023-10-06 21:44 Rob Herring
  2023-10-09 13:13 ` Simon Horman
  2023-10-10 10:50 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: Rob Herring @ 2023-10-06 21:44 UTC (permalink / raw)
  To: Chas Williams; +Cc: linux-atm-general, netdev, linux-kernel

It is not necessary to call of_match_device() in probe. If we made it to
probe, then we've already successfully matched.

Signed-off-by: Rob Herring <robh@kernel.org>
---
 drivers/atm/fore200e.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/drivers/atm/fore200e.c b/drivers/atm/fore200e.c
index fb2be3574c26..50d8ce20ae5b 100644
--- a/drivers/atm/fore200e.c
+++ b/drivers/atm/fore200e.c
@@ -36,7 +36,7 @@
 
 #ifdef CONFIG_SBUS
 #include <linux/of.h>
-#include <linux/of_device.h>
+#include <linux/platform_device.h>
 #include <asm/idprom.h>
 #include <asm/openprom.h>
 #include <asm/oplib.h>
@@ -2520,18 +2520,12 @@ static int fore200e_init(struct fore200e *fore200e, struct device *parent)
 }
 
 #ifdef CONFIG_SBUS
-static const struct of_device_id fore200e_sba_match[];
 static int fore200e_sba_probe(struct platform_device *op)
 {
-	const struct of_device_id *match;
 	struct fore200e *fore200e;
 	static int index = 0;
 	int err;
 
-	match = of_match_device(fore200e_sba_match, &op->dev);
-	if (!match)
-		return -EINVAL;
-
 	fore200e = kzalloc(sizeof(struct fore200e), GFP_KERNEL);
 	if (!fore200e)
 		return -ENOMEM;
-- 
2.40.1


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

* Re: [PATCH] atm: fore200e: Drop unnecessary of_match_device()
  2023-10-06 21:44 [PATCH] atm: fore200e: Drop unnecessary of_match_device() Rob Herring
@ 2023-10-09 13:13 ` Simon Horman
  2023-10-10 10:50 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: Simon Horman @ 2023-10-09 13:13 UTC (permalink / raw)
  To: Rob Herring; +Cc: Chas Williams, linux-atm-general, netdev, linux-kernel

On Fri, Oct 06, 2023 at 04:44:21PM -0500, Rob Herring wrote:
> It is not necessary to call of_match_device() in probe. If we made it to
> probe, then we've already successfully matched.
> 
> Signed-off-by: Rob Herring <robh@kernel.org>

I agree that the check is redundant.
And that with it removed, the forward declaration of fore200e_sba_match
is no longer needed.

Minor nit: I assume the target tree is net-next.
           Ideally that would be specified.

	Subject: [PATCH net-net] ...

Reviewed-by: Simon Horman <horms@kernel.org>

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

* Re: [PATCH] atm: fore200e: Drop unnecessary of_match_device()
  2023-10-06 21:44 [PATCH] atm: fore200e: Drop unnecessary of_match_device() Rob Herring
  2023-10-09 13:13 ` Simon Horman
@ 2023-10-10 10:50 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2023-10-10 10:50 UTC (permalink / raw)
  To: Rob Herring; +Cc: 3chas3, linux-atm-general, netdev, linux-kernel

Hello:

This patch was applied to netdev/net-next.git (main)
by Paolo Abeni <pabeni@redhat.com>:

On Fri,  6 Oct 2023 16:44:21 -0500 you wrote:
> It is not necessary to call of_match_device() in probe. If we made it to
> probe, then we've already successfully matched.
> 
> Signed-off-by: Rob Herring <robh@kernel.org>
> ---
>  drivers/atm/fore200e.c | 8 +-------
>  1 file changed, 1 insertion(+), 7 deletions(-)

Here is the summary with links:
  - atm: fore200e: Drop unnecessary of_match_device()
    https://git.kernel.org/netdev/net-next/c/f0107b864f00

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



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

end of thread, other threads:[~2023-10-10 10:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-06 21:44 [PATCH] atm: fore200e: Drop unnecessary of_match_device() Rob Herring
2023-10-09 13:13 ` Simon Horman
2023-10-10 10:50 ` patchwork-bot+netdevbpf

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