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, 15 Mar 2021 14:20:58 +0000
From:   Lee Jones <lee.jones@...aro.org>
To:     Andreas Kemnade <andreas@...nade.info>
Cc:     j.neuschaefer@....net, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3] mfd: ntxec: Support for EC in Tolino Shine 2 HD

On Mon, 15 Mar 2021, Andreas Kemnade wrote:

> On Mon, 15 Mar 2021 08:12:31 +0000
> Lee Jones <lee.jones@...aro.org> wrote:
> 
> [...]
> > >  static int ntxec_probe(struct i2c_client *client)
> > >  {
> > >  	struct ntxec *ec;
> > >  	unsigned int version;
> > >  	int res;
> > > +	const struct mfd_cell *subdevs = ntxec_subdev;
> > > +	size_t n_subdevs = ARRAY_SIZE(ntxec_subdev);  
> > 
> > This is a little confusing.  I had to re-read to figure it out.
> > 
> > In my mind, it would be clearer to explicitly set these in the
> > switch, rather than have a default which can be over-written.
> > 
> yes, it is clearer. I was just afraid that your compiler cannot
> figure it out that things get initialized and getting comments like
> "This code has never seen a compiler."
> But I will throw it against several ones.

Don't think so.  Just ensure you error out in the default case.

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ