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: <20250421135540.1a667221@jic23-huawei>
Date: Mon, 21 Apr 2025 13:55:40 +0100
From: Jonathan Cameron <jic23@...nel.org>
To: David Lechner <dlechner@...libre.com>
Cc: Andy Shevchenko <andy@...nel.org>, Nuno Sá
 <nuno.sa@...log.com>, Lars-Peter Clausen <lars@...afoo.de>, Michael
 Hennerich <Michael.Hennerich@...log.com>, linux-iio@...r.kernel.org,
 linux-kernel@...r.kernel.org
Subject: Re: [PATCH 4/4] iio: pressure: bmp280: use
 IIO_DECLARE_BUFFER_WITH_TS

On Sat, 19 Apr 2025 13:04:08 -0500
David Lechner <dlechner@...libre.com> wrote:

> On 4/19/25 11:39 AM, Andy Shevchenko wrote:
> > On Fri, Apr 18, 2025 at 05:58:35PM -0500, David Lechner wrote:  
> >> Use IIO_DECLARE_BUFFER_WITH_TS to declare the buffer that gets used with
> >> iio_push_to_buffers_with_ts(). This makes the code a bit easier to read
> >> and understand.
> >>
> >> The data type is changed so that we can drop the casts when the buffer
> >> is used.  
> > 
> > This one is good, with the comment to have it DMA aligned.
> > 
> > Reviewed-by: Andy Shevchenko <andy@...nel.org>
> >   
> 
> Strictly speaking, this one doesn't need to be DMA-safe. This buffer isn't
> passed to SPI or any other bus. It is just used for iio_push_to_buffers_with_ts()
> and has data copied to it from elsewhere just before that.


Silly question.  Why is it not just locally on the stack?  It's only 16 or 24 bytes...
I think that other than the bme280 we can use structures. (That one has 3 32bit channels)

So we can have the more readable form in all but one place in the driver.

Jonathan


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ