Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756331AbcLST4s (ORCPT ); Mon, 19 Dec 2016 14:56:48 -0500 Received: from mail-wm0-f46.google.com ([74.125.82.46]:35152 "EHLO mail-wm0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755666AbcLST4q (ORCPT ); Mon, 19 Dec 2016 14:56:46 -0500 Date: Mon, 19 Dec 2016 19:56:37 +0000 From: Andrey Utkin To: Kees Cook Cc: linux-kernel@vger.kernel.org, Bluecherry Maintainers , Ismael Luceno , Mauro Carvalho Chehab , linux-media@vger.kernel.org, andrey_utkin@fastmail.com Subject: Re: [PATCH] solo6x10: use designated initializers Message-ID: <20161219195637.GA15652@dell-m4800> References: <20161217010536.GA140725@beast> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20161217010536.GA140725@beast> User-Agent: Mutt/1.7.2 (2016-11-26) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1651 Lines: 42 On Fri, Dec 16, 2016 at 05:05:36PM -0800, Kees Cook wrote: > Prepare to mark sensitive kernel structures for randomization by making > sure they're using designated initializers. These were identified during > allyesconfig builds of x86, arm, and arm64, with most initializer fixes > extracted from grsecurity. Ok I've reviewed all the patchset, googled a bit and now I see what's going on. > > Signed-off-by: Kees Cook > --- > drivers/media/pci/solo6x10/solo6x10-g723.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/media/pci/solo6x10/solo6x10-g723.c b/drivers/media/pci/solo6x10/solo6x10-g723.c > index 6a35107aca25..36e93540bb49 100644 > --- a/drivers/media/pci/solo6x10/solo6x10-g723.c > +++ b/drivers/media/pci/solo6x10/solo6x10-g723.c > @@ -350,7 +350,7 @@ static int solo_snd_pcm_init(struct solo_dev *solo_dev) > > int solo_g723_init(struct solo_dev *solo_dev) > { > - static struct snd_device_ops ops = { NULL }; > + static struct snd_device_ops ops = { }; I'm not that keen on syntax subtleties, but... * Empty initializer is not quite "designated" as I can judge. * From brief googling I see that empty initializer is not valid in some C standards. Since `ops` is static, what about this? For the variant given below, you have my signoff. > --- a/drivers/media/pci/solo6x10/solo6x10-g723.c > +++ b/drivers/media/pci/solo6x10/solo6x10-g723.c > @@ -350,7 +350,7 @@ static int solo_snd_pcm_init(struct solo_dev *solo_dev) > > int solo_g723_init(struct solo_dev *solo_dev) > { > - static struct snd_device_ops ops = { NULL }; > + static struct snd_device_ops ops;