Re: [PATCH v2 3/3] staging: iio: ad9834: use sysfs_emit() and simplify show functions

From: Jonathan Cameron

Date: Sat Mar 21 2026 - 09:24:14 EST


On Fri, 20 Mar 2026 22:24:24 +0000
Gabriel Rondon <grondon@xxxxxxxxx> wrote:

> Replace sprintf() with sysfs_emit() in sysfs attribute show functions.
> sysfs_emit() is the preferred API for sysfs callbacks as it is aware
> of the PAGE_SIZE buffer limit.
>
> Also simplify the wavetype_available show functions by removing
> the intermediate string variable and returning directly from each
> branch.
>
> Signed-off-by: Gabriel Rondon <grondon@xxxxxxxxx>
Similar to patch 2, I suspect this code will go through a lot of changes
if anyone does the work to move this driver out of staging.

So I'm applying this mostly to avoid anyone else sending patches
to do the same!

Applied.

Thanks,

Jonathan