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]
Message-ID: <CAFXKEHbebNgDi4cieHO4DU0xO8phGcMre-FHbRGmYtMYOSmAkw@mail.gmail.com>
Date: Sun, 15 Dec 2024 10:32:56 +0100
From: Lothar Rubusch <l.rubusch@...il.com>
To: Christophe JAILLET <christophe.jaillet@...adoo.fr>
Cc: devicetree@...r.kernel.org, linux-iio@...r.kernel.org, 
	linux-kernel@...r.kernel.org, eraretuya@...il.com, lars@...afoo.de, 
	Michael.Hennerich@...log.com, jic23@...nel.org, robh@...nel.org, 
	krzk+dt@...nel.org, conor+dt@...nel.org
Subject: Re: [PATCH v7 1/7] iio: accel: adxl345: add function to switch
 measuring mode

On Sat, Dec 14, 2024 at 12:33 PM Christophe JAILLET
<christophe.jaillet@...adoo.fr> wrote:
>
> Le 13/12/2024 à 22:19, Lothar Rubusch a écrit :
> > Replace the powerup / powerdown functions by a generic function to put
> > the sensor in STANDBY, or MEASURE mode. When configuring the FIFO for
> > several features of the accelerometer, it is recommended to put
> > measuring in STANDBY mode.
>
> ...
>
> > +static int adxl345_set_measure_en(struct adxl345_state *st, bool en)
> > +{
> > +     unsigned int val = 0;
>
> Nitpick: useless init
>
> > +
> > +     val = (en) ? ADXL345_POWER_CTL_MEASURE : ADXL345_POWER_CTL_STANDBY;
>
> Nitpick: useless () around en.

Thank you for pointing out. I agree. This is better just in one line,
initialization directly and no parens. Anyway, since I already can see
the patch on the iio branch, I'll probably better leave it as is for
now (?).

Question: Since I'm currently about to build up tooling for linters
and static checkers. I'm doing checkpatch. I'm running Dan's smatch,
now. I'm correcting indention/spaces/tabs by some emacs settings.
DT/bindings I was doing wrong, and just figured out why after
submitting the last patch (...).

What is the best approach to find such kind of nitpick issues automatically?

Best,
L

>
> > +     return regmap_write(st->regmap, ADXL345_REG_POWER_CTL, val);
> > +}
>
> ...

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ