[PATCH 01/11] PCI: Use sysfs_emit() and sysfs_emit_at() in "show" functions
Logan Gunthorpe
logang at deltatee.com
Tue May 11 01:57:49 AEST 2021
On 2021-05-09 10:14 p.m., Krzysztof Wilczyński wrote:
> The sysfs_emit() and sysfs_emit_at() functions were introduced to make
> it less ambiguous which function is preferred when writing to the output
> buffer in a device attribute's "show" callback [1].
>
> Convert the PCI sysfs object "show" functions from sprintf(), snprintf()
> and scnprintf() to sysfs_emit() and sysfs_emit_at() accordingly, as the
> latter is aware of the PAGE_SIZE buffer and correctly returns the number
> of bytes written into the buffer.
>
> No functional change intended.
>
> [1] Documentation/filesystems/sysfs.rst
>
> Related to:
> commit ad025f8e46f3 ("PCI/sysfs: Use sysfs_emit() and sysfs_emit_at() in "show" functions")
>
> Signed-off-by: Krzysztof Wilczyński <kw at linux.com>
Thanks, this is a great cleanup. I've reviewed the entire series.
Reviewed-by: Logan Gunthorpe <logang at deltatee.com>
I agree that the new lines that are missing should be added.
Logan
More information about the Linuxppc-dev
mailing list