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: <20250927150439.34906075@jic23-huawei>
Date: Sat, 27 Sep 2025 15:04:39 +0100
From: Jonathan Cameron <jic23@...nel.org>
To: Andy Shevchenko <andy.shevchenko@...il.com>
Cc: Petre Rodan <petre.rodan@...dimension.ro>, David Lechner
 <dlechner@...libre.com>, Nuno Sá <nuno.sa@...log.com>, Andy
 Shevchenko <andy@...nel.org>, Rob Herring <robh@...nel.org>, Krzysztof
 Kozlowski <krzk+dt@...nel.org>, Conor Dooley <conor+dt@...nel.org>,
 Jonathan Cameron <Jonathan.Cameron@...wei.com>, linux-iio@...r.kernel.org,
 devicetree@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 07/18] iio: accel: bma220: move bma220_power() fct

On Sun, 14 Sep 2025 15:05:47 +0300
Andy Shevchenko <andy.shevchenko@...il.com> wrote:

> On Sat, Sep 13, 2025 at 6:40 PM Petre Rodan <petre.rodan@...dimension.ro> wrote:
> >
> > Move bma220_power() fct before bma220_init() since it will make the
> > next patch cleaner.  
> 
> ...
> 
> > +static int bma220_power(struct spi_device *spi, bool up)
> > +{
> > +       int i, ret;
> > +
> > +       /**  
> 
> It's not a kernel doc, do not inherit the mistakes from the past.
Agreed.  To keep the series clean I'd do a cleanup of all incorrect instances
of this as a precursor patch.  Then these moves become cleaner.
Otherwise we have a whole load of patch descriptions with little
notes saying 'and fix incorrect kernel-doc markings' and that just
muddies the water!

Jonathan

> 
> > +        * The chip can be suspended/woken up by a simple register read.
> > +        * So, we need up to 2 register reads of the suspend register
> > +        * to make sure that the device is in the desired state.
> > +        */
> > +       for (i = 0; i < 2; i++) {
> > +               ret = bma220_read_reg(spi, BMA220_REG_SUSPEND);
> > +               if (ret < 0)
> > +                       return ret;
> > +
> > +               if (up && ret == BMA220_SUSPEND_SLEEP)
> > +                       return 0;
> > +
> > +               if (!up && ret == BMA220_SUSPEND_WAKE)
> > +                       return 0;
> > +       }
> > +
> > +       return -EBUSY;
> > +}  
> 
> 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ