summaryrefslogtreecommitdiffstats
path: root/drivers/pci
diff options
context:
space:
mode:
authorKrzysztof Wilczyński <kw@linux.com>2021-06-03 02:01:10 +0200
committerBjorn Helgaas <bhelgaas@google.com>2021-06-04 16:21:07 +0200
commit14c19b2a40b61b609f68d1d6a5518ebb1c30706f (patch)
tree32c177f0bf0f43df3c04821c094be218207e93de /drivers/pci
parentPCI/sysfs: Fix 'resource_alignment' newline issues (diff)
downloadlinux-14c19b2a40b61b609f68d1d6a5518ebb1c30706f.tar.xz
linux-14c19b2a40b61b609f68d1d6a5518ebb1c30706f.zip
PCI/sysfs: Add 'devspec' newline
Previously, when the value of the "devspec" sysfs attribute was read from the user space there was no newline present, and utilities such as "cat" wouldn't display the result of the read correctly. Append a newline character in the show() function to match other "devspec" attributes. Link: https://lore.kernel.org/r/20210603000112.703037-5-kw@linux.com Signed-off-by: Krzysztof Wilczyński <kw@linux.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Reviewed-by: Logan Gunthorpe <logang@deltatee.com>
Diffstat (limited to 'drivers/pci')
-rw-r--r--drivers/pci/pci-sysfs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c
index beb8d1f4fafe..5d63df7c1820 100644
--- a/drivers/pci/pci-sysfs.c
+++ b/drivers/pci/pci-sysfs.c
@@ -537,7 +537,7 @@ static ssize_t devspec_show(struct device *dev,
if (np == NULL)
return 0;
- return sysfs_emit(buf, "%pOF", np);
+ return sysfs_emit(buf, "%pOF\n", np);
}
static DEVICE_ATTR_RO(devspec);
#endif