Re: [PATCH v2] staging: greybus: loopback: use sysfs_emit in sysfs show functions
From: Dan Carpenter
Date: Tue Mar 10 2026 - 03:27:51 EST
On Mon, Mar 09, 2026 at 05:05:07PM -0600, Luis Soza Rodriguez wrote:
> As per the kernel's documentation, sysfs_emit() is the preferred way
> to format strings for sysfs attributes. It handles buffer overruns
> safely. Replace sprintf calls with sysfs_emit across all loopback
> sysfs show macros.
>
> Signed-off-by: Luis Soza Rodriguez <contact@xxxxxxxxxx>
> ---
> v2: align backslashes in macros as requested by Dan Carpenter.
>
Thanks.
Reviewed-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
regards,
dan carpenter