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] [thread-next>] [day] [month] [year] [list]
Date:   Sat, 6 Aug 2022 15:55:23 +0100
From:   Jonathan Cameron <jic23@...nel.org>
To:     Dmitry Rokosov <DDRokosov@...rdevices.ru>
Cc:     Andy Shevchenko <andy.shevchenko@...il.com>,
        "robh+dt@...nel.org" <robh+dt@...nel.org>,
        "stano.jakubek@...il.com" <stano.jakubek@...il.com>,
        "shawnguo@...nel.org" <shawnguo@...nel.org>,
        "lars@...afoo.de" <lars@...afoo.de>,
        "stephan@...hold.net" <stephan@...hold.net>,
        "linux-iio@...r.kernel.org" <linux-iio@...r.kernel.org>,
        "devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
        kernel <kernel@...rdevices.ru>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v4 2/3] iio: add MEMSensing MSA311 3-axis accelerometer
 driver


> 
> [...]
> 
> > > +               return dev_err_probe(dev, err, "cannot enable push-pull int\n");  
> > 
> > interrupt  
> 
> It will be more ugly due 80 symbols restriction.

These days we let that stretch a little for cases like these.

> 
> > > +       indio_dev->modes = 0; /* setup buffered mode later */  
> > 
> > Why explicit assignment to 0? Doesn't kzalloc() do it for you?  
> 
> kzalloc() will do it for me, of course. Previously, I initialized modes to
> INDIO_DIRECT_MODE to just provide default value for that. Jonathan
> suggested to replace it with 0. 

I did?  I wonder what I was smoking that day. 
Should be set to INDIO_DIRECT_MODE as you had it previously.

(From what I recall it will work either way but we have in the past had
core code that checked this and may do again in the future so drivers should
still be setting it to specify they provide sysfs interfaces to directly read
the channels).

> I can remove this line at all, no problem.
> I just thought, it's more readable.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ