lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Mon, 19 Mar 2012 15:49:38 -0700 (PDT)
From:	David Rientjes <rientjes@...gle.com>
To:	Corentin Chary <corentin.chary@...il.com>
cc:	Matthew Garrett <mjg@...hat.com>,
	Stephen Rothwell <sfr@...b.auug.org.au>,
	platform-driver-x86@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [patch -next 1/2] drivers, samsung-laptop: fix initialization
 of sabi_data in sabi_set_commandb

On Wed, 14 Mar 2012, Corentin Chary wrote:

> On Wed, Mar 14, 2012 at 6:59 AM, David Rientjes <rientjes@...gle.com> wrote:
> > Fields d0, d1, d2, and d3 are members of an anonymous struct inside an
> > anonymous union inside struct sabi_data.  Initialization must be done by
> > wrapping the anonymous union and structs with brackets to avoid a build
> > error:
> >
> > drivers/platform/x86/samsung-laptop.c: In function ‘sabi_set_commandb’:
> > drivers/platform/x86/samsung-laptop.c:433: error: unknown field ‘d0’ specified in initializer
> > drivers/platform/x86/samsung-laptop.c:433: warning: missing braces around initializer
> > drivers/platform/x86/samsung-laptop.c:433: warning: (near initialization for ‘in.<anonymous>’)
> > ...
> >
> > Signed-off-by: David Rientjes <rientjes@...gle.com>
> > ---
> >  drivers/platform/x86/samsung-laptop.c |    2 +-
> >  1 files changed, 1 insertions(+), 1 deletions(-)
> >
> > diff --git a/drivers/platform/x86/samsung-laptop.c b/drivers/platform/x86/samsung-laptop.c
> > --- a/drivers/platform/x86/samsung-laptop.c
> > +++ b/drivers/platform/x86/samsung-laptop.c
> > @@ -430,7 +430,7 @@ exit:
> >  static int sabi_set_commandb(struct samsung_laptop *samsung,
> >                             u16 command, u8 data)
> >  {
> > -       struct sabi_data in = { .d0 = 0, .d1 = 0, .d2 = 0, .d3 = 0 };
> > +       struct sabi_data in = { { { .d0 = 0, .d1 = 0, .d2 = 0, .d3 = 0 } } };
> >
> >        in.data[0] = data;
> >        return sabi_command(samsung, command, &in, NULL);
> 
> 
> Acked-by: Corentin Chary <corentincj@...aif.net>
> 
> David, just in case, I found this mail in my spam folder, probably
> because your smtp server is not allowed to send @google.com mails.
> 
> Also, with which version of gcc is this necessary ? Old version worked
> with 4.5 and 4.6.
> 
> Matthew, could you merge that one and the other directly in your tree ? Thanks

Matthew, this is still missing from linux-next as of today's tree.  Ping 
on this?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ