Re: linux-next: build failure after merge of the final tree (pinctrl tree related)

2012-11-08 Thread Linus Walleij
On Wed, Nov 7, 2012 at 5:48 AM, Stephen Rothwell  wrote:

> Caused by commit e8321df59155 ("gpiolib: iron out include ladder
> mistakes") (and some earlier ones) from the pinctrl tree.
>
> I added this patch for today (there may be a better return value from
> gpiochip_add_pin_range):
(..)
> +struct gpio_chip;
> +
>  static inline int
>  gpiochip_add_pin_range(struct gpio_chip *chip, const char *pinctl_name,
>unsigned int pin_base, unsigned int npins)
>  {
> +   return 0;
>  }

Bah, I happened to put these prototypes just above the actual definition
of struct gpio_chip :-P

Fixing up and respinning the patch, I've added the compulsory return
value as well.

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


linux-next: build failure after merge of the final tree (pinctrl tree related)

2012-11-06 Thread Stephen Rothwell
Hi all,

After merging the final tree, today's linux-next build (powerpc
ppc44x_defconfig) failed like this:

In file included from include/linux/gpio.h:48:0,
 from include/linux/of_gpio.h:20,
 from arch/powerpc/sysdev/ppc4xx_gpio.c:29:
include/asm-generic/gpio.h:74:10: error: 'struct gpio_chip' declared inside 
parameter list [-Werror]
include/asm-generic/gpio.h:74:10: error: its scope is only this definition or 
declaration, which is probably not what you want [-Werror]
include/asm-generic/gpio.h: In function 'gpiochip_add_pin_range':
include/asm-generic/gpio.h:76:1: error: no return statement in function 
returning non-void [-Werror=return-type]
include/asm-generic/gpio.h: At top level:
include/asm-generic/gpio.h:79:35: error: 'struct gpio_chip' declared inside 
parameter list [-Werror]

Caused by commit e8321df59155 ("gpiolib: iron out include ladder
mistakes") (and some earlier ones) from the pinctrl tree.

I added this patch for today (there may be a better return value from
gpiochip_add_pin_range):

From: Stephen Rothwell 
Date: Wed, 7 Nov 2012 15:42:44 +1100
Subject: [PATCH] gpiolib: fix non CONFIG_GPIOLIB functions

Signed-off-by: Stephen Rothwell 
---
 include/asm-generic/gpio.h |3 +++
 1 file changed, 3 insertions(+)

diff --git a/include/asm-generic/gpio.h b/include/asm-generic/gpio.h
index 54e02e6..f9acd78 100644
--- a/include/asm-generic/gpio.h
+++ b/include/asm-generic/gpio.h
@@ -69,10 +69,13 @@ void gpiochip_remove_pin_ranges(struct gpio_chip *chip);
 
 #else
 
+struct gpio_chip;
+
 static inline int
 gpiochip_add_pin_range(struct gpio_chip *chip, const char *pinctl_name,
   unsigned int pin_base, unsigned int npins)
 {
+   return 0;
 }
 
 static inline void
-- 
1.7.10.280.gaa39

-- 
Cheers,
Stephen Rothwells...@canb.auug.org.au


pgplVn2YQyWfP.pgp
Description: PGP signature