Re: [PATCH linux-next] net: atm: Convert to use sysfs_emit()/sysfs_emit_at() APIs

From: Joe Perches
Date: Wed Sep 28 2022 - 19:00:30 EST


On Tue, 2022-09-27 at 07:01 -0700, Jakub Kicinski wrote:
> On Tue, 27 Sep 2022 06:46:49 +0000 zhangsongyi.cgel@xxxxxxxxx wrote:
> > From: zhang songyi <zhang.songyi@xxxxxxxxxx>
> >
> > Follow the advice of the Documentation/filesystems/sysfs.rst and show()
> > should only use sysfs_emit() or sysfs_emit_at() when formatting the value
> > to be returned to user space.
>
> Is there an end goal to this?

To make it easier to validate all other kernel uses of
sprintf/snprintf/scnprintf.

> If the code is correct let's leave
> it as is. ATM is hopefully going to be deleted soon.

<shrug> The code is correct as-is.