From: Krzysztof Kozlowski <k.kozlowski@samsung.com>
To: Guenter Roeck <linux@roeck-us.net>, Kukjin Kim <kgene@kernel.org>
Cc: Russell King <linux@arm.linux.org.uk>,
linux-arm-kernel@lists.infradead.org,
linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org,
Linus Walleij <linus.walleij@linaro.org>
Subject: Re: [PATCH -next] arm: Select GPIO_GENERIC_PLATFORM for CRAGG_6410
Date: Tue, 12 Jan 2016 09:52:25 +0900 [thread overview]
Message-ID: <56944E49.3040707@samsung.com> (raw)
In-Reply-To: <1452531649-14940-1-git-send-email-linux@roeck-us.net>
On 12.01.2016 02:00, Guenter Roeck wrote:
> Since commit 0f4630f3720e ("gpio: generic: factor into gpio_chip struct"),
> all users of struct bgpio_pdata depend on GPIO_GENERIC.
>
> This results in the following build error.
>
> arch/arm/mach-s3c64xx/mach-crag6410.c:270:3: warning:
> excess elements in struct initializer
> arch/arm/mach-s3c64xx/mach-crag6410.c:270:3: warning:
> (near initialization for '(anonymous)')
> arch/arm/mach-s3c64xx/mach-crag6410.c:271:2: error:
> invalid use of undefined type 'struct bgpio_pdata'
>
> Fixes: 0f4630f3720e ("gpio: generic: factor into gpio_chip struct")
> Cc: Linus Walleij <linus.walleij@linaro.org>
> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
> ---
> I don't know if this is the correct way to fix this problem.
> If not, please consider this to be a bug report.
>
> arch/arm/mach-s3c64xx/Kconfig | 1 +
> 1 file changed, 1 insertion(+)
>
Thanks for the report! I think that:
1. Other boards using the bgpio_pdata might be also affected:
mach-clps711x/board-autcpu12.c
mach-clps711x/board-p720t.c
mach-imx/mach-mx21ads.c
2. The boards does not directly depend on the GPIO_GENERIC.
If GPIO_GENERIC is not selected then it still might create
a basic-mmio-gpio device. The device of course won't be in
such case supported by any driver.
Instead to solve the error the structure should be
always visible so:
-- >8 --
From: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Date: Tue, 12 Jan 2016 09:46:06 +0900
Subject: [PATCH] gpio: generic: Fix build error of missing bgpio_pdata
declaration
Commit 0f4630f3720e ("gpio: generic: factor into gpio_chip struct")
introduced struct bgpio_pdata along with users but made the declaration
hidden by CONFIG_GPIO_GENERIC.
This results in the following build error:
arch/arm/mach-s3c64xx/mach-crag6410.c:270:3: warning: excess elements in struct initializer
arch/arm/mach-s3c64xx/mach-crag6410.c:270:3: warning: (near initialization for '(anonymous)')
arch/arm/mach-s3c64xx/mach-crag6410.c:271:2: error: invalid use of undefined type 'struct bgpio_pdata'
Fixes: 0f4630f3720e ("gpio: generic: factor into gpio_chip struct")
Reported-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
---
include/linux/gpio/driver.h | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/include/linux/gpio/driver.h b/include/linux/gpio/driver.h
index e2d05fd0e6e3..7b9054366e7a 100644
--- a/include/linux/gpio/driver.h
+++ b/include/linux/gpio/driver.h
@@ -220,14 +220,13 @@ static inline void *gpiochip_get_data(struct gpio_chip *chip)
struct gpio_chip *gpiod_to_chip(const struct gpio_desc *desc);
-#if IS_ENABLED(CONFIG_GPIO_GENERIC)
-
struct bgpio_pdata {
const char *label;
int base;
int ngpio;
};
+#if IS_ENABLED(CONFIG_GPIO_GENERIC)
int bgpio_init(struct gpio_chip *gc, struct device *dev,
unsigned long sz, void __iomem *dat, void __iomem *set,
void __iomem *clr, void __iomem *dirout, void __iomem *dirin,
--
1.9.1
next prev parent reply other threads:[~2016-01-12 0:52 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-11 17:00 [PATCH -next] arm: Select GPIO_GENERIC_PLATFORM for CRAGG_6410 Guenter Roeck
2016-01-12 0:52 ` Krzysztof Kozlowski [this message]
2016-01-12 1:24 ` Guenter Roeck
2016-01-14 9:02 ` Linus Walleij
2016-01-14 9:54 ` Guenter Roeck
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=56944E49.3040707@samsung.com \
--to=k.kozlowski@samsung.com \
--cc=kgene@kernel.org \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=linux@roeck-us.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox