From mboxrd@z Thu Jan 1 00:00:00 1970 From: Laurent Pinchart Subject: Re: linux-next: build warning after merge of the fbdev tree Date: Tue, 20 Dec 2011 16:19:42 +0100 Message-ID: <201112201619.43001.laurent.pinchart@ideasonboard.com> References: <20111220163214.351b13b464c46f506f329b30@canb.auug.org.au> <201112201137.12003.laurent.pinchart@ideasonboard.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Return-path: Received: from perceval.ideasonboard.com ([95.142.166.194]:36049 "EHLO perceval.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751318Ab1LTPTn (ORCPT ); Tue, 20 Dec 2011 10:19:43 -0500 In-Reply-To: Sender: linux-next-owner@vger.kernel.org List-ID: To: Geert Uytterhoeven Cc: Stephen Rothwell , Florian Tobias Schandinat , linux-fbdev@vger.kernel.org, linux-next@vger.kernel.org, linux-kernel@vger.kernel.org Hi Geert, On Tuesday 20 December 2011 14:48:33 Geert Uytterhoeven wrote: > On Tue, Dec 20, 2011 at 11:37, Laurent Pinchart wrote: > > On Tuesday 20 December 2011 06:32:14 Stephen Rothwell wrote: > >> After merging the fbdev tree, today's linux-next build (powerpc > >> ppc64_defconfig) produced this warning: > >> > >> drivers/video/matrox/matroxfb_base.c:150:2: warning: braces around > >> scalar initializer [enabled by default] > >> drivers/video/matrox/matroxfb_base.c:150:2: warning: (near > >> initialization for 'vesafb_defined.colorspace') [enabled by default] > >> drivers/video/matrox/matroxfb_base.c:150:2: warning: excess elements in > >> scalar initializer [enabled by default] > >> drivers/video/matrox/matroxfb_base.c:150:2: warning: (near > >> initialization for 'vesafb_defined.colorspace') [enabled by default] > >> drivers/video/matrox/matroxfb_crtc2.c:596:3: warning: braces around > >> scalar initializer [enabled by default] > >> drivers/video/matrox/matroxfb_crtc2.c:596:3: warning: (near > >> initialization for 'matroxfb_dh_defined.colorspace') [enabled by > >> default] > >> drivers/video/matrox/matroxfb_crtc2.c:596:3: warning: excess elements in > >> scalar initializer [enabled by default] > >> drivers/video/matrox/matroxfb_crtc2.c:596:3: warning: (near > >> initialization for 'matroxfb_dh_defined.colorspace') [enabled by > >> default] > >> > >> Introduced by commit fb21c2f42879 ("fbdev: Add FOURCC-based format > >> configuration API"). > > > > The following patch should fix the issue. Florian, are you fine with it, > > or would you rather modify the initializers to be name-based ? > > > > From 078987fc14dba806fc1bc628e3e5c371db3cf1b8 Mon Sep 17 00:00:00 2001 > > From: Laurent Pinchart > > Date: Tue, 20 Dec 2011 11:30:53 +0100 > > Subject: [PATCH] fbdev: matroxfb: Fix compilation after fb_var_screeninfo > > change > > > > Commit fb21c2f42879 ("fbdev: Add FOURCC-based format configuration API") > > modified the layout of the fb_var_screeninfo structure. Update the > > static initializers in the matroxfb driver accordingly. > > > > Signed-off-by: Laurent Pinchart > > --- > > drivers/video/matrox/matroxfb_base.c | 2 +- > > drivers/video/matrox/matroxfb_crtc2.c | 2 +- > > 2 files changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/drivers/video/matrox/matroxfb_base.c > > b/drivers/video/matrox/matroxfb_base.c index 44bf8d4..f98aad5 100644 > > --- a/drivers/video/matrox/matroxfb_base.c > > +++ b/drivers/video/matrox/matroxfb_base.c > > @@ -147,7 +147,7 @@ static struct fb_var_screeninfo vesafb_defined = { > > 39721L,48L,16L,33L,10L, > > 96L,2L,~0, /* No sync info */ > > FB_VMODE_NONINTERLACED, > > - 0, {0,0,0,0,0} > > + 0, 0, {0,0,0,0} > > All these zeroes should not be specified, the compiler will do the > right thing for > static variables anyway. > > Else they have to be updated manually everytime one of the reserved fields > is consumed for a new feature. I agree. Should I just remove them, or switch the structures to named initializers while I'm at it ? > > }; > > > > > > diff --git a/drivers/video/matrox/matroxfb_crtc2.c > > b/drivers/video/matrox/matroxfb_crtc2.c index d7112c3..d0c1abc 100644 > > --- a/drivers/video/matrox/matroxfb_crtc2.c > > +++ b/drivers/video/matrox/matroxfb_crtc2.c > > @@ -593,7 +593,7 @@ static struct fb_var_screeninfo matroxfb_dh_defined = > > { 39721L,48L,16L,33L,10L, > > 96L,2,0, /* no sync info */ > > FB_VMODE_NONINTERLACED, > > - 0, {0,0,0,0,0} > > + 0, 0, {0,0,0,0} > > Same here. > > > }; > > > > static int matroxfb_dh_regit(const struct matrox_fb_info *minfo, -- Regards, Laurent Pinchart