Re: [PATCH v5 2/3] iio: accel: sca3000: replace usages of internal read data helpers by spi helpers

From: Andrew Ijano
Date: Sat Jun 14 2025 - 23:22:10 EST


On Sat, Jun 14, 2025 at 6:50 PM Andy Shevchenko
<andy.shevchenko@xxxxxxxxx> wrote:
>
> On Sun, Jun 15, 2025 at 12:06 AM Andrew Ijano <andrew.ijano@xxxxxxxxx> wrote:
> > On Thu, Jun 12, 2025 at 10:22 AM Andy Shevchenko
> > <andriy.shevchenko@xxxxxxxxx> wrote:
>
> ...
>
> > > Moreover, the function should be switched to sysfs_emit_at() if this is part
> > > of ABI.
> >
> > Great! I didn't know that.
> >
> > In this case, sca3000_read_av_freq() is described as a "sysfs function
> > to get available frequencies", so I guess it's the case, right?
> > Is your suggestion to replace cases of sprintf() by sysfs_emit_at()
> > then? If so, I could do that in a following patch, it seems that
> > sca3000_show_available_3db_freqs() is also using sprintf().
>
> Yes. This is written in the Documentation.

Nice! I'll try to make a new patch later to address that then.

...

> > > > }, {
> > > > .len = len,
> > > > - .rx_buf = rx,
> > > > + .rx_buf = st->rx,
> > > > }
> > > > };
> > >
> > > > -
> > >
> > > Stray change. Doesn't checkpatch complain on this?
> >
> > I don't recall getting any warning from checkpatch but I can check
> > again for this next version.
>
> The problem here is the absence of a blank line between the definition
> block (where variables are declared/defined) and the first line of the
> actual code.

Thanks for the explanation. I double checked and checkpatch doesn't
seem to warn about that, but I fixed it anyway.

Thanks,
Andrew