All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] powerpc: ppc4xx: drop unused variable
@ 2016-03-31  7:14 Linus Walleij
  2016-03-31 10:09 ` Michael Ellerman
  0 siblings, 1 reply; 6+ messages in thread
From: Linus Walleij @ 2016-03-31  7:14 UTC (permalink / raw)
  To: linux-gpio, Alexandre Courbot
  Cc: Linus Walleij, Anatolij Gustschin, Benjamin Herrenschmidt,
	Paul Mackerras, Michael Ellerman, linuxppc-dev

commit 0d36fe65f58391712e11a6621075f373216e5f00
"powerpc: ppc4xx: use gpiochip data pointer"
made the mm_gc local variable in ppc4xx_gpio_set()
redundant, and when GCC treats warnings as errors this
happens:

arch/powerpc/sysdev/ppc4xx_gpio.c: In function 'ppc4xx_gpio_set':
arch/powerpc/sysdev/ppc4xx_gpio.c:93:26: error:
  unused variable 'mm_gc' [-Werror=unused-variable]
     struct of_mm_gpio_chip *mm_gc = to_of_mm_gpio_chip(gc);
                             ^
   cc1: all warnings being treated as errors

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Cc: Anatolij Gustschin <agust@denx.de>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: linuxppc-dev@lists.ozlabs.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
I've applied this to the GPIO tree where the offending
commit is now merged.
---
 arch/powerpc/sysdev/ppc4xx_gpio.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/powerpc/sysdev/ppc4xx_gpio.c b/arch/powerpc/sysdev/ppc4xx_gpio.c
index 4ab83cd04785..5382d04dd872 100644
--- a/arch/powerpc/sysdev/ppc4xx_gpio.c
+++ b/arch/powerpc/sysdev/ppc4xx_gpio.c
@@ -90,7 +90,6 @@ __ppc4xx_gpio_set(struct gpio_chip *gc, unsigned int gpio, int val)
 static void
 ppc4xx_gpio_set(struct gpio_chip *gc, unsigned int gpio, int val)
 {
-	struct of_mm_gpio_chip *mm_gc = to_of_mm_gpio_chip(gc);
 	struct ppc4xx_gpio_chip *chip = gpiochip_get_data(gc);
 	unsigned long flags;
 
-- 
2.4.3


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

* Re: [PATCH] powerpc: ppc4xx: drop unused variable
  2016-03-31  7:14 [PATCH] powerpc: ppc4xx: drop unused variable Linus Walleij
@ 2016-03-31 10:09 ` Michael Ellerman
  2016-03-31 12:57   ` Linus Walleij
  0 siblings, 1 reply; 6+ messages in thread
From: Michael Ellerman @ 2016-03-31 10:09 UTC (permalink / raw)
  To: Linus Walleij, linux-gpio, Alexandre Courbot
  Cc: Anatolij Gustschin, Benjamin Herrenschmidt, Paul Mackerras, linuxppc-dev

On Thu, 2016-03-31 at 09:14 +0200, Linus Walleij wrote:

> commit 0d36fe65f58391712e11a6621075f373216e5f00
> "powerpc: ppc4xx: use gpiochip data pointer"
> made the mm_gc local variable in ppc4xx_gpio_set()
> redundant, and when GCC treats warnings as errors this
> happens:
> 
> arch/powerpc/sysdev/ppc4xx_gpio.c: In function 'ppc4xx_gpio_set':
> arch/powerpc/sysdev/ppc4xx_gpio.c:93:26: error:
>   unused variable 'mm_gc' [-Werror=unused-variable]
>      struct of_mm_gpio_chip *mm_gc = to_of_mm_gpio_chip(gc);
>                              ^
>    cc1: all warnings being treated as errors
> 
> Reported-by: kbuild test robot <fengguang.wu@intel.com>
> Cc: Anatolij Gustschin <agust@denx.de>
> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> Cc: Paul Mackerras <paulus@samba.org>
> Cc: Michael Ellerman <mpe@ellerman.id.au>
> Cc: linuxppc-dev@lists.ozlabs.org
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> ---
> I've applied this to the GPIO tree where the offending
> commit is now merged.

Thanks.

If you feel like cross building powerpc in future it should be as simple as:

 $ dnf install gcc-powerpc64-linux-gnu || apt-get install gcc-powerpc-linux-gnu
 $ make ARCH=powerpc CROSS_COMPILE=powerpc-linux-gnu- ...

:)

cheers


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

* Re: [PATCH] powerpc: ppc4xx: drop unused variable
  2016-03-31 10:09 ` Michael Ellerman
@ 2016-03-31 12:57   ` Linus Walleij
  2016-04-01  2:31       ` Michael Ellerman
  0 siblings, 1 reply; 6+ messages in thread
From: Linus Walleij @ 2016-03-31 12:57 UTC (permalink / raw)
  To: Michael Ellerman
  Cc: linux-gpio, Alexandre Courbot, Anatolij Gustschin,
	Benjamin Herrenschmidt, Paul Mackerras,
	linuxppc-dev@lists.ozlabs.org list

On Thu, Mar 31, 2016 at 12:09 PM, Michael Ellerman <mpe@ellerman.id.au> wrote:

> If you feel like cross building powerpc in future it should be as simple as:
>
>  $ dnf install gcc-powerpc64-linux-gnu || apt-get install gcc-powerpc-linux-gnu
>  $ make ARCH=powerpc CROSS_COMPILE=powerpc-linux-gnu- ...

Ah hm yeah I guess everyone "should", it's just that these days I
mainly rely on Fenguang's kautobuild to do this job for me and
get back with the result from a plethora of arches.

Sometimes a buggy bit slips through the cracks though, sorry
about that.

Yours,
Linus Walleij

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

* Re: [PATCH] powerpc: ppc4xx: drop unused variable
  2016-03-31 12:57   ` Linus Walleij
@ 2016-04-01  2:31       ` Michael Ellerman
  0 siblings, 0 replies; 6+ messages in thread
From: Michael Ellerman @ 2016-04-01  2:31 UTC (permalink / raw)
  To: Linus Walleij
  Cc: linux-gpio, Alexandre Courbot, Anatolij Gustschin,
	Benjamin Herrenschmidt, Paul Mackerras,
	linuxppc-dev@lists.ozlabs.org list

On Thu, 2016-03-31 at 14:57 +0200, Linus Walleij wrote:
> On Thu, Mar 31, 2016 at 12:09 PM, Michael Ellerman <mpe@ellerman.id.au> wrote:
> 
> > If you feel like cross building powerpc in future it should be as simple as:
> > 
> >  $ dnf install gcc-powerpc64-linux-gnu || apt-get install gcc-powerpc-linux-gnu
> >  $ make ARCH=powerpc CROSS_COMPILE=powerpc-linux-gnu- ...
> 
> Ah hm yeah I guess everyone "should", it's just that these days I
> mainly rely on Fenguang's kautobuild to do this job for me and
> get back with the result from a plethora of arches.

Sure. That makes sense for all the silly little architectures.

But for powerpc you should really cross compile.

..

:P

> Sometimes a buggy bit slips through the cracks though, sorry
> about that.

No stress.

cheers


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

* Re: [PATCH] powerpc: ppc4xx: drop unused variable
@ 2016-04-01  2:31       ` Michael Ellerman
  0 siblings, 0 replies; 6+ messages in thread
From: Michael Ellerman @ 2016-04-01  2:31 UTC (permalink / raw)
  To: Linus Walleij
  Cc: linux-gpio, Alexandre Courbot, Anatolij Gustschin,
	Benjamin Herrenschmidt, Paul Mackerras,
	linuxppc-dev@lists.ozlabs.org list

On Thu, 2016-03-31 at 14:57 +0200, Linus Walleij wrote:
> On Thu, Mar 31, 2016 at 12:09 PM, Michael Ellerman <mpe@ellerman.id.au> wrote:
> 
> > If you feel like cross building powerpc in future it should be as simple as:
> > 
> >  $ dnf install gcc-powerpc64-linux-gnu || apt-get install gcc-powerpc-linux-gnu
> >  $ make ARCH=powerpc CROSS_COMPILE=powerpc-linux-gnu- ...
> 
> Ah hm yeah I guess everyone "should", it's just that these days I
> mainly rely on Fenguang's kautobuild to do this job for me and
> get back with the result from a plethora of arches.

Sure. That makes sense for all the silly little architectures.

But for powerpc you should really cross compile.

..

:P

> Sometimes a buggy bit slips through the cracks though, sorry
> about that.

No stress.

cheers

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

* Re: [PATCH] powerpc: ppc4xx: drop unused variable
  2016-04-01  2:31       ` Michael Ellerman
  (?)
@ 2016-04-01  8:07       ` Linus Walleij
  -1 siblings, 0 replies; 6+ messages in thread
From: Linus Walleij @ 2016-04-01  8:07 UTC (permalink / raw)
  To: Michael Ellerman
  Cc: linux-gpio, Alexandre Courbot, Anatolij Gustschin,
	Benjamin Herrenschmidt, Paul Mackerras,
	linuxppc-dev@lists.ozlabs.org list

On Fri, Apr 1, 2016 at 4:31 AM, Michael Ellerman <mpe@ellerman.id.au> wrote:
> On Thu, 2016-03-31 at 14:57 +0200, Linus Walleij wrote:
>> On Thu, Mar 31, 2016 at 12:09 PM, Michael Ellerman <mpe@ellerman.id.au> wrote:
>>
>> > If you feel like cross building powerpc in future it should be as simple as:
>> >
>> >  $ dnf install gcc-powerpc64-linux-gnu || apt-get install gcc-powerpc-linux-gnu
>> >  $ make ARCH=powerpc CROSS_COMPILE=powerpc-linux-gnu- ...
>>
>> Ah hm yeah I guess everyone "should", it's just that these days I
>> mainly rely on Fenguang's kautobuild to do this job for me and
>> get back with the result from a plethora of arches.
>
> Sure. That makes sense for all the silly little architectures.
>
> But for powerpc you should really cross compile.

I think kautobuild cross compiles?

The only thing that happens IIUC is I let somebody else do the
job at the Intel server farm.

Yours,
Linus Walleij

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

end of thread, other threads:[~2016-04-01  8:07 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-31  7:14 [PATCH] powerpc: ppc4xx: drop unused variable Linus Walleij
2016-03-31 10:09 ` Michael Ellerman
2016-03-31 12:57   ` Linus Walleij
2016-04-01  2:31     ` Michael Ellerman
2016-04-01  2:31       ` Michael Ellerman
2016-04-01  8:07       ` Linus Walleij

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.