All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] powerpc: store the intended structure
@ 2017-08-13 13:24 ` Julia Lawall
  0 siblings, 0 replies; 10+ messages in thread
From: Julia Lawall @ 2017-08-13 13:24 UTC (permalink / raw)
  To: Benjamin Herrenschmidt
  Cc: kernel-janitors, Paul Mackerras, Michael Ellerman, linuxppc-dev,
	linux-kernel

Normally the values in the resource field and the argument to ARRAY_SIZE
in the num_resources are the same.  In this case, the value in the reousrce
field is the same as the one in the previous platform_device structure, and
appears to be a copy-paste error.  Replace the value in the resource field
with the argument to the local call to ARRAY_SIZE.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---
 arch/powerpc/platforms/chrp/pegasos_eth.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/powerpc/platforms/chrp/pegasos_eth.c b/arch/powerpc/platforms/chrp/pegasos_eth.c
index 2b4dc6a..1976071 100644
--- a/arch/powerpc/platforms/chrp/pegasos_eth.c
+++ b/arch/powerpc/platforms/chrp/pegasos_eth.c
@@ -63,7 +63,7 @@
 	.name		= "orion-mdio",
 	.id		= -1,
 	.num_resources	= ARRAY_SIZE(mv643xx_eth_mvmdio_resources),
-	.resource	= mv643xx_eth_shared_resources,
+	.resource	= mv643xx_eth_mvmdio_resources,
 };
 
 static struct resource mv643xx_eth_port1_resources[] = {

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

* [PATCH] powerpc: store the intended structure
@ 2017-08-13 13:24 ` Julia Lawall
  0 siblings, 0 replies; 10+ messages in thread
From: Julia Lawall @ 2017-08-13 13:24 UTC (permalink / raw)
  To: Benjamin Herrenschmidt
  Cc: kernel-janitors, Paul Mackerras, Michael Ellerman, linuxppc-dev,
	linux-kernel

Normally the values in the resource field and the argument to ARRAY_SIZE
in the num_resources are the same.  In this case, the value in the reousrce
field is the same as the one in the previous platform_device structure, and
appears to be a copy-paste error.  Replace the value in the resource field
with the argument to the local call to ARRAY_SIZE.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---
 arch/powerpc/platforms/chrp/pegasos_eth.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/powerpc/platforms/chrp/pegasos_eth.c b/arch/powerpc/platforms/chrp/pegasos_eth.c
index 2b4dc6a..1976071 100644
--- a/arch/powerpc/platforms/chrp/pegasos_eth.c
+++ b/arch/powerpc/platforms/chrp/pegasos_eth.c
@@ -63,7 +63,7 @@
 	.name		= "orion-mdio",
 	.id		= -1,
 	.num_resources	= ARRAY_SIZE(mv643xx_eth_mvmdio_resources),
-	.resource	= mv643xx_eth_shared_resources,
+	.resource	= mv643xx_eth_mvmdio_resources,
 };
 
 static struct resource mv643xx_eth_port1_resources[] = {


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

* Re: [PATCH] powerpc: store the intended structure
  2017-08-13 13:24 ` Julia Lawall
@ 2017-08-13 14:37   ` Joe Perches
  -1 siblings, 0 replies; 10+ messages in thread
From: Joe Perches @ 2017-08-13 14:37 UTC (permalink / raw)
  To: Julia Lawall, Benjamin Herrenschmidt
  Cc: kernel-janitors, Paul Mackerras, Michael Ellerman, linuxppc-dev,
	linux-kernel

On Sun, 2017-08-13 at 15:24 +0200, Julia Lawall wrote:
> Normally the values in the resource field and the argument to ARRAY_SIZE
> in the num_resources are the same.  In this case, the value in the reousrce
> field is the same as the one in the previous platform_device structure, and
> appears to be a copy-paste error.  Replace the value in the resource field
> with the argument to the local call to ARRAY_SIZE.

found by a script or eyeballs?

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

* Re: [PATCH] powerpc: store the intended structure
@ 2017-08-13 14:37   ` Joe Perches
  0 siblings, 0 replies; 10+ messages in thread
From: Joe Perches @ 2017-08-13 14:37 UTC (permalink / raw)
  To: Julia Lawall, Benjamin Herrenschmidt
  Cc: kernel-janitors, Paul Mackerras, Michael Ellerman, linuxppc-dev,
	linux-kernel

On Sun, 2017-08-13 at 15:24 +0200, Julia Lawall wrote:
> Normally the values in the resource field and the argument to ARRAY_SIZE
> in the num_resources are the same.  In this case, the value in the reousrce
> field is the same as the one in the previous platform_device structure, and
> appears to be a copy-paste error.  Replace the value in the resource field
> with the argument to the local call to ARRAY_SIZE.

found by a script or eyeballs?


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

* Re: [PATCH] powerpc: store the intended structure
  2017-08-13 14:37   ` Joe Perches
@ 2017-08-13 14:41     ` Julia Lawall
  -1 siblings, 0 replies; 10+ messages in thread
From: Julia Lawall @ 2017-08-13 14:41 UTC (permalink / raw)
  To: Joe Perches
  Cc: Benjamin Herrenschmidt, kernel-janitors, Paul Mackerras,
	Michael Ellerman, linuxppc-dev, linux-kernel



On Sun, 13 Aug 2017, Joe Perches wrote:

> On Sun, 2017-08-13 at 15:24 +0200, Julia Lawall wrote:
> > Normally the values in the resource field and the argument to ARRAY_SIZE
> > in the num_resources are the same.  In this case, the value in the reousrce
> > field is the same as the one in the previous platform_device structure, and
> > appears to be a copy-paste error.  Replace the value in the resource field
> > with the argument to the local call to ARRAY_SIZE.
>
> found by a script or eyeballs?

A script that was looking for something else.  But I wrote a script for
this specific issue and this was the only match.  I am currently checking
in a more general way.

julia

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

* Re: [PATCH] powerpc: store the intended structure
@ 2017-08-13 14:41     ` Julia Lawall
  0 siblings, 0 replies; 10+ messages in thread
From: Julia Lawall @ 2017-08-13 14:41 UTC (permalink / raw)
  To: Joe Perches
  Cc: Benjamin Herrenschmidt, kernel-janitors, Paul Mackerras,
	Michael Ellerman, linuxppc-dev, linux-kernel



On Sun, 13 Aug 2017, Joe Perches wrote:

> On Sun, 2017-08-13 at 15:24 +0200, Julia Lawall wrote:
> > Normally the values in the resource field and the argument to ARRAY_SIZE
> > in the num_resources are the same.  In this case, the value in the reousrce
> > field is the same as the one in the previous platform_device structure, and
> > appears to be a copy-paste error.  Replace the value in the resource field
> > with the argument to the local call to ARRAY_SIZE.
>
> found by a script or eyeballs?

A script that was looking for something else.  But I wrote a script for
this specific issue and this was the only match.  I am currently checking
in a more general way.

julia

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

* Re: [PATCH] powerpc: store the intended structure
  2017-08-13 13:24 ` Julia Lawall
@ 2017-08-15 11:14   ` Michael Ellerman
  -1 siblings, 0 replies; 10+ messages in thread
From: Michael Ellerman @ 2017-08-15 11:14 UTC (permalink / raw)
  To: Julia Lawall, Benjamin Herrenschmidt
  Cc: kernel-janitors, Paul Mackerras, linuxppc-dev, linux-kernel

Julia Lawall <Julia.Lawall@lip6.fr> writes:

> Normally the values in the resource field and the argument to ARRAY_SIZE
> in the num_resources are the same.  In this case, the value in the reousrce
> field is the same as the one in the previous platform_device structure, and
> appears to be a copy-paste error.  Replace the value in the resource field
> with the argument to the local call to ARRAY_SIZE.
>
> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
>
> ---
>  arch/powerpc/platforms/chrp/pegasos_eth.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Thanks. This is close to EOL code I think, but I'll merge it anyway as
it seems obviously correct.

cheers

> diff --git a/arch/powerpc/platforms/chrp/pegasos_eth.c b/arch/powerpc/platforms/chrp/pegasos_eth.c
> index 2b4dc6a..1976071 100644
> --- a/arch/powerpc/platforms/chrp/pegasos_eth.c
> +++ b/arch/powerpc/platforms/chrp/pegasos_eth.c
> @@ -63,7 +63,7 @@
>  	.name		= "orion-mdio",
>  	.id		= -1,
>  	.num_resources	= ARRAY_SIZE(mv643xx_eth_mvmdio_resources),
> -	.resource	= mv643xx_eth_shared_resources,
> +	.resource	= mv643xx_eth_mvmdio_resources,
>  };
>  
>  static struct resource mv643xx_eth_port1_resources[] = {

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

* Re: [PATCH] powerpc: store the intended structure
@ 2017-08-15 11:14   ` Michael Ellerman
  0 siblings, 0 replies; 10+ messages in thread
From: Michael Ellerman @ 2017-08-15 11:14 UTC (permalink / raw)
  To: Julia Lawall, Benjamin Herrenschmidt
  Cc: kernel-janitors, Paul Mackerras, linuxppc-dev, linux-kernel

Julia Lawall <Julia.Lawall@lip6.fr> writes:

> Normally the values in the resource field and the argument to ARRAY_SIZE
> in the num_resources are the same.  In this case, the value in the reousrce
> field is the same as the one in the previous platform_device structure, and
> appears to be a copy-paste error.  Replace the value in the resource field
> with the argument to the local call to ARRAY_SIZE.
>
> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
>
> ---
>  arch/powerpc/platforms/chrp/pegasos_eth.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Thanks. This is close to EOL code I think, but I'll merge it anyway as
it seems obviously correct.

cheers

> diff --git a/arch/powerpc/platforms/chrp/pegasos_eth.c b/arch/powerpc/platforms/chrp/pegasos_eth.c
> index 2b4dc6a..1976071 100644
> --- a/arch/powerpc/platforms/chrp/pegasos_eth.c
> +++ b/arch/powerpc/platforms/chrp/pegasos_eth.c
> @@ -63,7 +63,7 @@
>  	.name		= "orion-mdio",
>  	.id		= -1,
>  	.num_resources	= ARRAY_SIZE(mv643xx_eth_mvmdio_resources),
> -	.resource	= mv643xx_eth_shared_resources,
> +	.resource	= mv643xx_eth_mvmdio_resources,
>  };
>  
>  static struct resource mv643xx_eth_port1_resources[] = {

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

* Re: powerpc: store the intended structure
  2017-08-13 13:24 ` Julia Lawall
@ 2017-08-16 12:29   ` Michael Ellerman
  -1 siblings, 0 replies; 10+ messages in thread
From: Michael Ellerman @ 2017-08-16 12:29 UTC (permalink / raw)
  To: Julia Lawall, Benjamin Herrenschmidt
  Cc: Paul Mackerras, kernel-janitors, linuxppc-dev, linux-kernel

On Sun, 2017-08-13 at 13:24:23 UTC, Julia Lawall wrote:
> Normally the values in the resource field and the argument to ARRAY_SIZE
> in the num_resources are the same.  In this case, the value in the reousrce
> field is the same as the one in the previous platform_device structure, and
> appears to be a copy-paste error.  Replace the value in the resource field
> with the argument to the local call to ARRAY_SIZE.
> 
> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

Applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/36992606eee8016c36ad2576687e97

cheers

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

* Re: powerpc: store the intended structure
@ 2017-08-16 12:29   ` Michael Ellerman
  0 siblings, 0 replies; 10+ messages in thread
From: Michael Ellerman @ 2017-08-16 12:29 UTC (permalink / raw)
  To: Julia Lawall, Benjamin Herrenschmidt
  Cc: Paul Mackerras, kernel-janitors, linuxppc-dev, linux-kernel

On Sun, 2017-08-13 at 13:24:23 UTC, Julia Lawall wrote:
> Normally the values in the resource field and the argument to ARRAY_SIZE
> in the num_resources are the same.  In this case, the value in the reousrce
> field is the same as the one in the previous platform_device structure, and
> appears to be a copy-paste error.  Replace the value in the resource field
> with the argument to the local call to ARRAY_SIZE.
> 
> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

Applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/36992606eee8016c36ad2576687e97

cheers

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

end of thread, other threads:[~2017-08-16 12:30 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-13 13:24 [PATCH] powerpc: store the intended structure Julia Lawall
2017-08-13 13:24 ` Julia Lawall
2017-08-13 14:37 ` Joe Perches
2017-08-13 14:37   ` Joe Perches
2017-08-13 14:41   ` Julia Lawall
2017-08-13 14:41     ` Julia Lawall
2017-08-15 11:14 ` Michael Ellerman
2017-08-15 11:14   ` Michael Ellerman
2017-08-16 12:29 ` Michael Ellerman
2017-08-16 12:29   ` Michael Ellerman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.