summaryrefslogtreecommitdiff
path: root/net/core
diff options
context:
space:
mode:
authorXiongfeng Wang <wangxiongfeng2@huawei.com>2020-07-21 15:02:57 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-07-31 16:44:06 +0200
commitc0e3a9a4c4c96b4b2ebaaa198404a601f201ee5b (patch)
tree1b5121b337d1c3f6253bd02817fc4311bc72d658 /net/core
parentb7441315b8d2b25a2bdcc71957148b8ad843955a (diff)
net-sysfs: add a newline when printing 'tx_timeout' by sysfs
[ Upstream commit 9bb5fbea59f36a589ef886292549ca4052fe676c ] When I cat 'tx_timeout' by sysfs, it displays as follows. It's better to add a newline for easy reading. root@syzkaller:~# cat /sys/devices/virtual/net/lo/queues/tx-0/tx_timeout 0root@syzkaller:~# Signed-off-by: Xiongfeng Wang <wangxiongfeng2@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/core')
-rw-r--r--net/core/net-sysfs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c
index 3333693d8052..3fb5d8ecc849 100644
--- a/net/core/net-sysfs.c
+++ b/net/core/net-sysfs.c
@@ -1018,7 +1018,7 @@ static ssize_t show_trans_timeout(struct netdev_queue *queue,
trans_timeout = queue->trans_timeout;
spin_unlock_irq(&queue->_xmit_lock);
- return sprintf(buf, "%lu", trans_timeout);
+ return sprintf(buf, fmt_ulong, trans_timeout);
}
#ifdef CONFIG_XPS