Skip to content

Commit

Permalink
net-sysfs: add a newline when printing 'tx_timeout' by sysfs
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
fenghusthu authored and davem330 committed Jul 21, 2020
1 parent 015c5d5 commit 9bb5fbe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/core/net-sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -1108,7 +1108,7 @@ static ssize_t tx_timeout_show(struct netdev_queue *queue, char *buf)
trans_timeout = queue->trans_timeout;
spin_unlock_irq(&queue->_xmit_lock);

return sprintf(buf, "%lu", trans_timeout);
return sprintf(buf, fmt_ulong, trans_timeout);
}

static unsigned int get_netdev_queue_index(struct netdev_queue *queue)
Expand Down

0 comments on commit 9bb5fbe

Please sign in to comment.