diff mbox series

[v1,1/1] net: dsa: vsc73xxx: Get rid of duplicate of_node assignment

Message ID 20211202210029.77466-1-andriy.shevchenko@linux.intel.com (mailing list archive)
State Accepted
Commit ab11393fd004ed048cff93076569e41bb31fe22b
Delegated to: Netdev Maintainers
Headers show
Series [v1,1/1] net: dsa: vsc73xxx: Get rid of duplicate of_node assignment | expand

Checks

Context Check Description
netdev/fixes_present success Fixes tag not required for -next series
netdev/subject_prefix warning Target tree name not specified in the subject
netdev/cover_letter success Single patches do not need cover letters
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/cc_maintainers success CCed 7 of 7 maintainers
netdev/build_clang success Errors and warnings before: 0 this patch: 0
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 9 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0
netdev/tree_selection success Guessing tree name failed - patch did not apply

Commit Message

Andy Shevchenko Dec. 2, 2021, 9 p.m. UTC
GPIO library does copy the of_node from the parent device of
the GPIO chip, there is no need to repeat this in the individual
drivers. Remove assignment here.

For the details one may look into the of_gpio_dev_init() implementation.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/net/dsa/vitesse-vsc73xx-core.c | 3 ---
 1 file changed, 3 deletions(-)

Comments

Vladimir Oltean Dec. 2, 2021, 9:12 p.m. UTC | #1
On Thu, Dec 02, 2021 at 11:00:29PM +0200, Andy Shevchenko wrote:
> GPIO library does copy the of_node from the parent device of
> the GPIO chip, there is no need to repeat this in the individual
> drivers. Remove assignment here.
> 
> For the details one may look into the of_gpio_dev_init() implementation.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
>  drivers/net/dsa/vitesse-vsc73xx-core.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/drivers/net/dsa/vitesse-vsc73xx-core.c b/drivers/net/dsa/vitesse-vsc73xx-core.c
> index 4c18f619ec02..ae55167ce0a6 100644
> --- a/drivers/net/dsa/vitesse-vsc73xx-core.c
> +++ b/drivers/net/dsa/vitesse-vsc73xx-core.c
> @@ -1122,9 +1122,6 @@ static int vsc73xx_gpio_probe(struct vsc73xx *vsc)
>  	vsc->gc.ngpio = 4;
>  	vsc->gc.owner = THIS_MODULE;
>  	vsc->gc.parent = vsc->dev;
> -#if IS_ENABLED(CONFIG_OF_GPIO)
> -	vsc->gc.of_node = vsc->dev->of_node;
> -#endif
>  	vsc->gc.base = -1;
>  	vsc->gc.get = vsc73xx_gpio_get;
>  	vsc->gc.set = vsc73xx_gpio_set;
> -- 
> 2.33.0
> 

I'm in To: and everyone else is in Cc? I don't even have the hardware.
Adding Linus just in case, although the change seems correct.

Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
Andy Shevchenko Dec. 2, 2021, 9:29 p.m. UTC | #2
On Thu, Dec 02, 2021 at 11:12:59PM +0200, Vladimir Oltean wrote:
> On Thu, Dec 02, 2021 at 11:00:29PM +0200, Andy Shevchenko wrote:

...

> I'm in To: and everyone else is in Cc? I don't even have the hardware.

get_maintainer + Git heuristics. I see that you have 2 changes out of 9,
maybe this what makes it triggered.

> Adding Linus just in case, although the change seems correct.
> 
> Reviewed-by: Vladimir Oltean <olteanv@gmail.com>

Thanks!
patchwork-bot+netdevbpf@kernel.org Dec. 3, 2021, 2:30 p.m. UTC | #3
Hello:

This patch was applied to netdev/net-next.git (master)
by David S. Miller <davem@davemloft.net>:

On Thu,  2 Dec 2021 23:00:29 +0200 you wrote:
> GPIO library does copy the of_node from the parent device of
> the GPIO chip, there is no need to repeat this in the individual
> drivers. Remove assignment here.
> 
> For the details one may look into the of_gpio_dev_init() implementation.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> 
> [...]

Here is the summary with links:
  - [v1,1/1] net: dsa: vsc73xxx: Get rid of duplicate of_node assignment
    https://git.kernel.org/netdev/net-next/c/ab11393fd004

You are awesome, thank you!
diff mbox series

Patch

diff --git a/drivers/net/dsa/vitesse-vsc73xx-core.c b/drivers/net/dsa/vitesse-vsc73xx-core.c
index 4c18f619ec02..ae55167ce0a6 100644
--- a/drivers/net/dsa/vitesse-vsc73xx-core.c
+++ b/drivers/net/dsa/vitesse-vsc73xx-core.c
@@ -1122,9 +1122,6 @@  static int vsc73xx_gpio_probe(struct vsc73xx *vsc)
 	vsc->gc.ngpio = 4;
 	vsc->gc.owner = THIS_MODULE;
 	vsc->gc.parent = vsc->dev;
-#if IS_ENABLED(CONFIG_OF_GPIO)
-	vsc->gc.of_node = vsc->dev->of_node;
-#endif
 	vsc->gc.base = -1;
 	vsc->gc.get = vsc73xx_gpio_get;
 	vsc->gc.set = vsc73xx_gpio_set;