diff options
author | Krzysztof Wilczyński <kw@linux.com> | 2021-04-16 20:58:45 +0000 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2021-04-29 10:07:31 -0500 |
commit | ad025f8e46f3dbf09b1bf8d7a5b4ce858df74544 (patch) | |
tree | 6b5d6eb50ec384be36c16e08f30f6d2f790124aa /.cocciconfig | |
parent | df1af7cbe7bc11720b3e915771d47acc3604eb44 (diff) | |
download | linux-ad025f8e46f3dbf09b1bf8d7a5b4ce858df74544.tar.bz2 |
PCI/sysfs: Use sysfs_emit() and sysfs_emit_at() in "show" functions
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
[bhelgaas: drop dsm_label_utf16s_to_utf8s(), link speed/width changes]
Link: https://lore.kernel.org/r/20210416205856.3234481-10-kw@linux.com
Signed-off-by: Krzysztof Wilczyński <kw@linux.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to '.cocciconfig')
0 files changed, 0 insertions, 0 deletions