]> git.baikalelectronics.ru Git - kernel.git/commit
sparc: use scnprintf() in show_pciobppath_attr() in pci.c
authorChen Zhou <chenzhou10@huawei.com>
Sat, 9 May 2020 09:18:48 +0000 (17:18 +0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 13 May 2020 22:35:58 +0000 (15:35 -0700)
commit8c3ee664f573ddcdd47f3975a3986b09bf09dba4
tree1eb6264d1cdcabb6738cadb35c46f67985505390
parent05e828fd0a1cf039e55dcd4448f2f7c17b4f30d6
sparc: use scnprintf() in show_pciobppath_attr() in pci.c

snprintf() returns the number of bytes that would be written,
which may be greater than the the actual length to be written.

show_pciobppath_attr() should return the number of bytes printed
into the buffer. This is the return value of scnprintf().

Signed-off-by: Chen Zhou <chenzhou10@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
arch/sparc/kernel/pci.c