[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHp75VejNVhRhVEPimbj3S4zMPTsiBgk3qmMAX+jfYN2_i2G0A@mail.gmail.com>
Date: Wed, 29 Jul 2020 09:52:30 +0300
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: Daniel Campello <campello@...gle.com>
Cc: LKML <devicetree@...r.kernel.org>,
LKML <linux-kernel@...r.kernel.org>,
Jonathan Cameron <jic23@...nel.org>,
Douglas Anderson <dianders@...omium.org>,
Enrico Granata <egranata@...omium.org>,
Gwendal Grignou <gwendal@...omium.org>,
Hartmut Knaack <knaack.h@....de>,
Lars-Peter Clausen <lars@...afoo.de>,
Peter Meerwald-Stadler <pmeerw@...erw.net>,
Stephen Boyd <swboyd@...omium.org>,
linux-iio <linux-iio@...r.kernel.org>
Subject: Re: [PATCH 06/15] iio: sx9310: Align memory
On Wed, Jul 29, 2020 at 12:26 AM Daniel Campello <campello@...gle.com> wrote:
> On Tue, Jul 28, 2020 at 12:11 PM Andy Shevchenko
> <andy.shevchenko@...il.com> wrote:
> > On Tue, Jul 28, 2020 at 6:15 PM Daniel Campello <campello@...omium.org> wrote:
...
> > > - __be16 buffer[SX9310_NUM_CHANNELS +
> > > - 4]; /* 64-bit data + 64-bit timestamp */
> > > + /* 64-bit data + 64-bit timestamp buffer */
> > > + __be16 buffer[SX9310_NUM_CHANNELS + 4] __aligned(8);
> >
> > If the data amount (channels) is always the same, please, use struct approach.
> > Otherwise put a comment explaining dynamic data.
> I'm not sure what you mean here. I have a comment above for the size
> of the array.
Here [1] was a discussion about commenting on the dynamic amount of
data [see the cover letter and replies to it] in the buffer and the
struct approach [e.g. very first patch in the series].
[1]: https://lore.kernel.org/linux-iio/MN2PR12MB43905A2256F98BB5EFCE7DD3C4770@MN2PR12MB4390.namprd12.prod.outlook.com/T/
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists