sparc: use scnprintf() in show_pciobppath_attr() in vio.c
authorChen Zhou <chenzhou10@huawei.com>
Sat, 9 May 2020 09:18:49 +0000 (17:18 +0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 13 May 2020 22:35:58 +0000 (15:35 -0700)
commit117e2cb3eeee2940ba581d104951f6207cb46ce5
tree73d8849b942454df345de2b5243ad644e6694093
parent03a1b56f501ef4f8c54cb89a5f5ed7cc9ccac38f
sparc: use scnprintf() in show_pciobppath_attr() in vio.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/vio.c