From patchwork Tue Jan 12 00:52:25 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 8013061 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 95DDB9F1CC for ; Tue, 12 Jan 2016 00:54:18 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A646E2013D for ; Tue, 12 Jan 2016 00:54:17 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A742120138 for ; Tue, 12 Jan 2016 00:54:16 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1aInCi-0003bb-A9; Tue, 12 Jan 2016 00:52:56 +0000 Received: from mailout1.w1.samsung.com ([210.118.77.11]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1aInCe-0003Tr-C0 for linux-arm-kernel@lists.infradead.org; Tue, 12 Jan 2016 00:52:53 +0000 Received: from eucpsbgm1.samsung.com (unknown [203.254.199.244]) by mailout1.w1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0O0T00241EFFSL00@mailout1.w1.samsung.com> for linux-arm-kernel@lists.infradead.org; Tue, 12 Jan 2016 00:52:28 +0000 (GMT) X-AuditID: cbfec7f4-f79026d00000418a-81-56944e4b2b53 Received: from eusync1.samsung.com ( [203.254.199.211]) by eucpsbgm1.samsung.com (EUCPMTA) with SMTP id A3.00.16778.B4E44965; Tue, 12 Jan 2016 00:52:27 +0000 (GMT) Received: from [10.113.63.52] by eusync1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0O0T00GWHEFC7N20@eusync1.samsung.com>; Tue, 12 Jan 2016 00:52:27 +0000 (GMT) Subject: Re: [PATCH -next] arm: Select GPIO_GENERIC_PLATFORM for CRAGG_6410 To: Guenter Roeck , Kukjin Kim References: <1452531649-14940-1-git-send-email-linux@roeck-us.net> From: Krzysztof Kozlowski X-Enigmail-Draft-Status: N1110 Message-id: <56944E49.3040707@samsung.com> Date: Tue, 12 Jan 2016 09:52:25 +0900 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-version: 1.0 In-reply-to: <1452531649-14940-1-git-send-email-linux@roeck-us.net> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrILMWRmVeSWpSXmKPExsVy+t/xy7reflPCDDbdULV4/cLQov/xa2aL KX+WM1lsenyN1eLyrjlsFjPO72OyuH2Z1+LJwjNMDhweLc09bB6bVnWyedy5tofNY/OSeo+d 3xvYPfq2rGL0+LxJLoA9issmJTUnsyy1SN8ugStj1amD7AXLJCqOLKxsYFwo0sXIySEhYCLR 1jeTGcIWk7hwbz1bFyMXh5DAUkaJxntXmSCcp4wSr9/fZgGpEhbwlpi5fRkTiC0i4Cpxce4S NhBbSMBJYnvjbBaQBmaBfYwSB/ceBStiEzCW2LwcokhCQE6it3sS2CBeAS2J87PmMYLYLAKq EttefAM6g4NDVCBCYtGOTIgSQYkfk++BlXMKOEv8btgAVsIsoCdx/6IWSJhZQF5i85q3zBMY BWch6ZiFUDULSdUCRuZVjKKppckFxUnpuYZ6xYm5xaV56XrJ+bmbGCER8WUH4+JjVocYBTgY lXh4M9inhAmxJpYVV+YeYpTgYFYS4c1gBArxpiRWVqUW5ccXleakFh9ilOZgURLnnbvrfYiQ QHpiSWp2ampBahFMlomDU6qB0X57lMqWju8qszMidm/NXZrZeeEa25NSrQ52qYe++wU/HHRi /DfV9PvkGcd2LP/G06jP0WWVdrH9f7XjGu43/Be5VlTuF0kt2/jP84lC4/2CIytFri9tOWoo N2nhzefLgvdE64Rf2HIy7cNRC1etN8azTnhsiyqTm3NfpSyY93hBvPz95TvklJRYijMSDbWY i4oTAYw6b1yEAgAA X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160111_165252_598937_D1C584DC X-CRM114-Status: GOOD ( 25.23 ) X-Spam-Score: -4.4 (----) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Linus Walleij , linux-samsung-soc@vger.kernel.org, Russell King , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, SUSPICIOUS_RECIPS, UNPARSEABLE_RELAY autolearn=no version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 > Signed-off-by: Guenter Roeck > --- > 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 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 Signed-off-by: Krzysztof Kozlowski Tested-by: Guenter Roeck --- 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,