summaryrefslogtreecommitdiff
path: root/drivers/pci/vpd.c
diff options
context:
space:
mode:
authorKrzysztof Wilczyński <kw@linux.com>2021-04-16 23:58:45 +0300
committerBjorn Helgaas <bhelgaas@google.com>2021-04-29 18:07:31 +0300
commitad025f8e46f3dbf09b1bf8d7a5b4ce858df74544 (patch)
tree6b5d6eb50ec384be36c16e08f30f6d2f790124aa /drivers/pci/vpd.c
parentdf1af7cbe7bc11720b3e915771d47acc3604eb44 (diff)
downloadlinux-ad025f8e46f3dbf09b1bf8d7a5b4ce858df74544.tar.xz
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 'drivers/pci/vpd.c')
0 files changed, 0 insertions, 0 deletions