Skip to content

Commit

Permalink
net-sysfs: Fix inconsistent of format with argument type in net-sysfs.c
Browse files Browse the repository at this point in the history
Fix follow warnings:
[net/core/net-sysfs.c:1161]: (warning) %u in format string (no. 1)
	requires 'unsigned int' but the argument type is 'int'.
[net/core/net-sysfs.c:1162]: (warning) %u in format string (no. 1)
	requires 'unsigned int' but the argument type is 'int'.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Ye Bin <yebin10@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Ye Bin authored and David S. Miller committed Oct 2, 2020
1 parent 32be425 commit 000fe26
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions net/core/net-sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -1158,8 +1158,8 @@ static ssize_t traffic_class_show(struct netdev_queue *queue,
* belongs to the root device it will be reported with just the
* traffic class, so just "0" for TC 0 for example.
*/
return dev->num_tc < 0 ? sprintf(buf, "%u%d\n", tc, dev->num_tc) :
sprintf(buf, "%u\n", tc);
return dev->num_tc < 0 ? sprintf(buf, "%d%d\n", tc, dev->num_tc) :
sprintf(buf, "%d\n", tc);
}

#ifdef CONFIG_XPS
Expand Down

0 comments on commit 000fe26

Please sign in to comment.