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]
Message-ID: <CAHp75VcTZjM0Sxd43EPmLsqQV2nR_-7NJx-PK_fWtOde0BOHqQ@mail.gmail.com>
Date: Sat, 12 Apr 2025 22:15:55 +0300
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: Jonathan Cameron <jic23@...nel.org>
Cc: Remi Buisson via B4 Relay <devnull+remi.buisson.tdk.com@...nel.org>, remi.buisson@....com, 
	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>, linux-kernel@...r.kernel.org, 
	linux-iio@...r.kernel.org, devicetree@...r.kernel.org
Subject: Re: [PATCH 5/8] iio: imu: inv_icm45600: add buffer support in iio devices

On Sat, Apr 12, 2025 at 10:14 PM Jonathan Cameron <jic23@...nel.org> wrote:
> On Fri, 11 Apr 2025 13:28:37 +0000
> Remi Buisson via B4 Relay <devnull+remi.buisson.tdk.com@...nel.org> wrote:

...

> > +     raw_wm = INV_ICM45600_FIFO_WATERMARK_VAL(watermark);
> > +     memcpy(st->buffer, &raw_wm, sizeof(raw_wm));
> > +     ret = regmap_bulk_write(st->map, INV_ICM45600_REG_FIFO_WATERMARK,
> > +                             st->buffer, sizeof(raw_wm));
> > +     if (ret)
> > +             return ret;
> > +
> > +     return 0;
> trivial but return regmap_bulk_write()

Actually looking at this I think it should have proper __be16/__le16
(or what is there?) types and use respective putter-getter instead of
memcpy().

-- 
With Best Regards,
Andy Shevchenko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ