On Tue, Jul 28, 2020 at 12:11 PM Andy Shevchenko <andy.shevche...@gmail.com> wrote: > > On Tue, Jul 28, 2020 at 6:15 PM Daniel Campello <campe...@chromium.org> wrote: > > > > Use __aligned(8) to ensure that the timestamp is correctly aligned > > when we call push_to_buffers > > > > Signed-off-by: Daniel Campello <campe...@chromium.org> > > --- > > > > drivers/iio/proximity/sx9310.c | 6 +++--- > > 1 file changed, 3 insertions(+), 3 deletions(-) > > > > diff --git a/drivers/iio/proximity/sx9310.c b/drivers/iio/proximity/sx9310.c > > index de52afd7c13333..fb5c16f2aa6b1a 100644 > > --- a/drivers/iio/proximity/sx9310.c > > +++ b/drivers/iio/proximity/sx9310.c > > @@ -131,8 +131,8 @@ struct sx9310_data { > > */ > > bool prox_stat[SX9310_NUM_CHANNELS]; > > bool trigger_enabled; > > - __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. > > -- > With Best Regards, > Andy Shevchenko
- Re: [PATCH 13/15] iio: sx9310: Add newlines to pr... Joe Perches
- Re: [PATCH 13/15] iio: sx9310: Add newlines t... Andy Shevchenko
- [PATCH 02/15] iio: sx9310: Update macros declarations Daniel Campello
- [PATCH 15/15] iio: sx9310: Enable vdd and svdd regulators ... Daniel Campello
- Re: [PATCH 15/15] iio: sx9310: Enable vdd and svdd re... Andy Shevchenko
- [PATCH 01/15] dt-bindings: iio: Add bindings for sx9310 se... Daniel Campello
- [PATCH 06/15] iio: sx9310: Align memory Daniel Campello
- Re: [PATCH 06/15] iio: sx9310: Align memory Andy Shevchenko
- Re: [PATCH 06/15] iio: sx9310: Align memory Daniel Campello
- Re: [PATCH 06/15] iio: sx9310: Align memory Andy Shevchenko
- [PATCH 04/15] iio: sx9310: Remove acpi and of table macros Daniel Campello
- Re: [PATCH 04/15] iio: sx9310: Remove acpi and of tab... Andy Shevchenko
- Re: [PATCH 04/15] iio: sx9310: Remove acpi and of... Daniel Campello
- Re: [PATCH 04/15] iio: sx9310: Remove acpi an... Stephen Boyd
- [PATCH 03/15] iio: sx9310: Fix irq handling Daniel Campello
- Re: [PATCH 03/15] iio: sx9310: Fix irq handling Andy Shevchenko
- Re: [PATCH 03/15] iio: sx9310: Fix irq handling Daniel Campello
- Re: [PATCH 03/15] iio: sx9310: Fix irq handli... Stephen Boyd
- [PATCH 05/15] iio: sx9310: Change from .probe to .probe_ne... Daniel Campello