From patchwork Tue Oct 14 08:54:32 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mika Westerberg X-Patchwork-Id: 5079101 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.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 073759F30B for ; Tue, 14 Oct 2014 08:57:25 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 126172012E for ; Tue, 14 Oct 2014 08:57:24 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0F47F2012D for ; Tue, 14 Oct 2014 08:57:23 +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 1Xdxsl-0005GE-8z; Tue, 14 Oct 2014 08:55:03 +0000 Received: from mga11.intel.com ([192.55.52.93]) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Xdxsg-000562-Ul for linux-arm-kernel@lists.infradead.org; Tue, 14 Oct 2014 08:54:59 +0000 Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP; 14 Oct 2014 01:54:37 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.04,715,1406617200"; d="scan'208";a="604986493" Received: from lahna.fi.intel.com (HELO lahna) ([10.237.72.95]) by fmsmga001.fm.intel.com with SMTP; 14 Oct 2014 01:54:33 -0700 Received: by lahna (sSMTP sendmail emulation); Tue, 14 Oct 2014 11:54:32 +0300 Date: Tue, 14 Oct 2014 11:54:32 +0300 From: Mika Westerberg To: Arnd Bergmann Subject: Re: next build: 304 warnings 0 failures (next/next-20141013) Message-ID: <20141014085432.GC2255@lahna.fi.intel.com> References: <543b63d2.a479420a.486e.ffffb6e2@mx.google.com> <20141013084618.GC27405@n2100.arm.linux.org.uk> <8786463.d9VIC5J1Iz@wuerfel> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <8786463.d9VIC5J1Iz@wuerfel> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo User-Agent: Mutt/1.5.23 (2014-03-12) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20141014_015459_001998_458E4AD7 X-CRM114-Status: GOOD ( 24.72 ) X-Spam-Score: -5.3 (-----) Cc: Stephen Rothwell , Russell King - ARM Linux , linus.walleij@linaro.org, "Rafael J. Wysocki" , olof@lixom.net, Marek Szyprowski , linux-arm-kernel@lists.infradead.org, Olof's autobuilder X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 Mon, Oct 13, 2014 at 11:12:46AM +0200, Arnd Bergmann wrote: > On Monday 13 October 2014 09:46:18 Russell King - ARM Linux wrote: > > On Sun, Oct 12, 2014 at 10:32:02PM -0700, Olof's autobuilder wrote: > > > 1 arch/arm/mach-cns3xxx/pcie.c:313:1: warning: the frame size of 1072 bytes is larger than 1024 bytes [-Wframe-larger-than=] > > > > This should be fixed. > > This is an ancient bug, both Mark Brown and I have suggested fixes, > we just need to apply one of them. > > > > 1 arch/arm/mach-omap1/board-htcherald.c:296:2: warning: initialization makes pointer from integer without a cast [enabled by default] > > > 1 arch/arm/mach-omap1/board-htcherald.c:296:2: warning: (near initialization for 'gpio_leds[0].gpiod') [enabled by default] > > > 1 arch/arm/mach-omap1/board-htcherald.c:297:2: warning: initialization makes pointer from integer without a cast [enabled by default] > > > 1 arch/arm/mach-omap1/board-htcherald.c:297:2: warning: (near initialization for 'gpio_leds[1].gpiod') [enabled by default] > > ... > > > > All of these need fixing. > > Hadn't seen this one before, I guess it's because of > https://lkml.org/lkml/2014/9/16/222. > > adding Mika and Linus to Cc, should be easy to fix using > named initializers like all other 120+ platforms do, > but to be on the safe side, we could also move the new > 'gpiod' member to the end of 'struct gpio_led'. (+Rafael) Fenghua's build bot noticed this some time ago and it got fixed but looks like we forgot to merge the fix to the _DSD patch series. Here it is again. Rafael, do you want to take this on top of the 'device-properties' -branch? From: Mika Westerberg Subject: [PATCH] leds: Move gpiod to be last member of struct gpio_led Commit 8b0d4dc3d44 (leds: leds-gpio: Add support for GPIO descriptors) added a new member 'gpiod' to struct gpio_led to support GPIO descriptors. This is fine as long as board files use designated initializers but some fail to do so causing following build errors: arch/arm/mach-omap1/board-htcherald.c:296:2: warning: initialization makes pointer from integer without a cast [enabled by default] arch/arm/mach-omap1/board-htcherald.c:296:2: warning: (near initialization for 'gpio_leds[0].gpiod') [enabled by default] arch/arm/mach-omap1/board-htcherald.c:297:2: warning: initialization makes pointer from integer without a cast [enabled by default] arch/arm/mach-omap1/board-htcherald.c:297:2: warning: (near initialization for 'gpio_leds[1].gpiod') [enabled by default] To be on the safe side move the 'gpiod' member to be the last member of struct gpiod_led. Signed-off-by: Mika Westerberg --- include/linux/leds.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/leds.h b/include/linux/leds.h index 7852b9365113..f3af5c4d9084 100644 --- a/include/linux/leds.h +++ b/include/linux/leds.h @@ -256,12 +256,12 @@ struct led_platform_data { struct gpio_led { const char *name; const char *default_trigger; - struct gpio_desc *gpiod; unsigned gpio; unsigned active_low : 1; unsigned retain_state_suspended : 1; unsigned default_state : 2; /* default_state should be one of LEDS_GPIO_DEFSTATE_(ON|OFF|KEEP) */ + struct gpio_desc *gpiod; }; #define LEDS_GPIO_DEFSTATE_OFF 0 #define LEDS_GPIO_DEFSTATE_ON 1