diff options
author | Bjorn Helgaas <bhelgaas@google.com> | 2021-07-06 10:56:25 -0500 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2021-07-06 10:56:25 -0500 |
commit | 7132700067f234d37c234e5d711bb49ea06d2352 (patch) | |
tree | 58e1cdcb9bb16bb9c8fbd2bb38c599fa4d460def /drivers/pci/p2pdma.c | |
parent | 131e4f76c9ae9636046bf04d19d43af0e4ae9807 (diff) | |
parent | 14c19b2a40b61b609f68d1d6a5518ebb1c30706f (diff) | |
download | linux-7132700067f234d37c234e5d711bb49ea06d2352.tar.bz2 |
Merge branch 'pci/sysfs'
- Fix dsm_label_utf16s_to_utf8s() buffer overrun (Krzysztof Wilczyński)
- Use sysfs_emit() and sysfs_emit_at() in "show" functions (Krzysztof
Wilczyński)
- Fix 'resource_alignment' newline issues (Krzysztof Wilczyński)
- Add newline to 'devspec' sysfs file (Krzysztof Wilczyński)
* pci/sysfs:
PCI/sysfs: Add 'devspec' newline
PCI/sysfs: Fix 'resource_alignment' newline issues
PCI/sysfs: Use sysfs_emit() and sysfs_emit_at() in "show" functions
PCI/sysfs: Rely on lengths from scnprintf(), dsm_label_utf16s_to_utf8s()
PCI/sysfs: Fix dsm_label_utf16s_to_utf8s() buffer overrun
# Conflicts:
# drivers/pci/p2pdma.c
Diffstat (limited to 'drivers/pci/p2pdma.c')
-rw-r--r-- | drivers/pci/p2pdma.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/pci/p2pdma.c b/drivers/pci/p2pdma.c index 69c25e71590a..50cdde3e9a8b 100644 --- a/drivers/pci/p2pdma.c +++ b/drivers/pci/p2pdma.c @@ -57,7 +57,7 @@ static ssize_t size_show(struct device *dev, struct device_attribute *attr, size = gen_pool_size(p2pdma->pool); rcu_read_unlock(); - return scnprintf(buf, PAGE_SIZE, "%zd\n", size); + return sysfs_emit(buf, "%zd\n", size); } static DEVICE_ATTR_RO(size); @@ -74,7 +74,7 @@ static ssize_t available_show(struct device *dev, struct device_attribute *attr, avail = gen_pool_avail(p2pdma->pool); rcu_read_unlock(); - return scnprintf(buf, PAGE_SIZE, "%zd\n", avail); + return sysfs_emit(buf, "%zd\n", avail); } static DEVICE_ATTR_RO(available); @@ -91,7 +91,7 @@ static ssize_t published_show(struct device *dev, struct device_attribute *attr, published = p2pdma->p2pmem_published; rcu_read_unlock(); - return scnprintf(buf, PAGE_SIZE, "%d\n", published); + return sysfs_emit(buf, "%d\n", published); } static DEVICE_ATTR_RO(published); |