* [PATCH 0/2] Fix inconsistent of format with argument type
@ 2020-09-30 1:08 Ye Bin
2020-09-30 1:08 ` [PATCH 1/2] pktgen: Fix inconsistent of format with argument type in pktgen.c Ye Bin
2020-09-30 1:08 ` [PATCH 2/2] net-sysfs: Fix inconsistent of format with argument type in net-sysfs.c Ye Bin
0 siblings, 2 replies; 5+ messages in thread
From: Ye Bin @ 2020-09-30 1:08 UTC (permalink / raw)
To: davem, kuba, netdev; +Cc: Ye Bin
Ye Bin (2):
pktgen: Fix inconsistent of format with argument type in pktgen.c
net-sysfs: Fix inconsistent of format with argument type in
net-sysfs.c
net/core/net-sysfs.c | 4 ++--
net/core/pktgen.c | 10 +++++-----
2 files changed, 7 insertions(+), 7 deletions(-)
--
2.25.4
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/2] pktgen: Fix inconsistent of format with argument type in pktgen.c
2020-09-30 1:08 [PATCH 0/2] Fix inconsistent of format with argument type Ye Bin
@ 2020-09-30 1:08 ` Ye Bin
2020-10-02 1:45 ` David Miller
2020-09-30 1:08 ` [PATCH 2/2] net-sysfs: Fix inconsistent of format with argument type in net-sysfs.c Ye Bin
1 sibling, 1 reply; 5+ messages in thread
From: Ye Bin @ 2020-09-30 1:08 UTC (permalink / raw)
To: davem, kuba, netdev; +Cc: Ye Bin, Hulk Robot
Fix follow warnings:
[net/core/pktgen.c:925]: (warning) %u in format string (no. 1)
requires 'unsigned int' but the argument type is 'signed int'.
[net/core/pktgen.c:942]: (warning) %u in format string (no. 1)
requires 'unsigned int' but the argument type is 'signed int'.
[net/core/pktgen.c:962]: (warning) %u in format string (no. 1)
requires 'unsigned int' but the argument type is 'signed int'.
[net/core/pktgen.c:984]: (warning) %u in format string (no. 1)
requires 'unsigned int' but the argument type is 'signed int'.
[net/core/pktgen.c:1149]: (warning) %d in format string (no. 1)
requires 'int' but the argument type is 'unsigned int'.
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Ye Bin <yebin10@huawei.com>
---
net/core/pktgen.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/net/core/pktgen.c b/net/core/pktgen.c
index 44fdbb9c6e53..105978604ffd 100644
--- a/net/core/pktgen.c
+++ b/net/core/pktgen.c
@@ -922,7 +922,7 @@ static ssize_t pktgen_if_write(struct file *file,
pkt_dev->min_pkt_size = value;
pkt_dev->cur_pkt_size = value;
}
- sprintf(pg_result, "OK: min_pkt_size=%u",
+ sprintf(pg_result, "OK: min_pkt_size=%d",
pkt_dev->min_pkt_size);
return count;
}
@@ -939,7 +939,7 @@ static ssize_t pktgen_if_write(struct file *file,
pkt_dev->max_pkt_size = value;
pkt_dev->cur_pkt_size = value;
}
- sprintf(pg_result, "OK: max_pkt_size=%u",
+ sprintf(pg_result, "OK: max_pkt_size=%d",
pkt_dev->max_pkt_size);
return count;
}
@@ -959,7 +959,7 @@ static ssize_t pktgen_if_write(struct file *file,
pkt_dev->max_pkt_size = value;
pkt_dev->cur_pkt_size = value;
}
- sprintf(pg_result, "OK: pkt_size=%u", pkt_dev->min_pkt_size);
+ sprintf(pg_result, "OK: pkt_size=%d", pkt_dev->min_pkt_size);
return count;
}
@@ -981,7 +981,7 @@ static ssize_t pktgen_if_write(struct file *file,
i += len;
pkt_dev->nfrags = value;
- sprintf(pg_result, "OK: frags=%u", pkt_dev->nfrags);
+ sprintf(pg_result, "OK: frags=%d", pkt_dev->nfrags);
return count;
}
if (!strcmp(name, "delay")) {
@@ -1146,7 +1146,7 @@ static ssize_t pktgen_if_write(struct file *file,
(!(pkt_dev->odev->priv_flags & IFF_TX_SKB_SHARING)))))
return -ENOTSUPP;
pkt_dev->burst = value < 1 ? 1 : value;
- sprintf(pg_result, "OK: burst=%d", pkt_dev->burst);
+ sprintf(pg_result, "OK: burst=%u", pkt_dev->burst);
return count;
}
if (!strcmp(name, "node")) {
--
2.25.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/2] net-sysfs: Fix inconsistent of format with argument type in net-sysfs.c
2020-09-30 1:08 [PATCH 0/2] Fix inconsistent of format with argument type Ye Bin
2020-09-30 1:08 ` [PATCH 1/2] pktgen: Fix inconsistent of format with argument type in pktgen.c Ye Bin
@ 2020-09-30 1:08 ` Ye Bin
2020-10-02 1:45 ` David Miller
1 sibling, 1 reply; 5+ messages in thread
From: Ye Bin @ 2020-09-30 1:08 UTC (permalink / raw)
To: davem, kuba, netdev; +Cc: Ye Bin, Hulk Robot
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>
---
net/core/net-sysfs.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c
index 8d4128d59655..999b70c59761 100644
--- a/net/core/net-sysfs.c
+++ b/net/core/net-sysfs.c
@@ -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
--
2.25.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] net-sysfs: Fix inconsistent of format with argument type in net-sysfs.c
2020-09-30 1:08 ` [PATCH 2/2] net-sysfs: Fix inconsistent of format with argument type in net-sysfs.c Ye Bin
@ 2020-10-02 1:45 ` David Miller
0 siblings, 0 replies; 5+ messages in thread
From: David Miller @ 2020-10-02 1:45 UTC (permalink / raw)
To: yebin10; +Cc: kuba, netdev, hulkci
From: Ye Bin <yebin10@huawei.com>
Date: Wed, 30 Sep 2020 09:08:38 +0800
> 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>
Applied.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] pktgen: Fix inconsistent of format with argument type in pktgen.c
2020-09-30 1:08 ` [PATCH 1/2] pktgen: Fix inconsistent of format with argument type in pktgen.c Ye Bin
@ 2020-10-02 1:45 ` David Miller
0 siblings, 0 replies; 5+ messages in thread
From: David Miller @ 2020-10-02 1:45 UTC (permalink / raw)
To: yebin10; +Cc: kuba, netdev, hulkci
From: Ye Bin <yebin10@huawei.com>
Date: Wed, 30 Sep 2020 09:08:37 +0800
> Fix follow warnings:
> [net/core/pktgen.c:925]: (warning) %u in format string (no. 1)
> requires 'unsigned int' but the argument type is 'signed int'.
> [net/core/pktgen.c:942]: (warning) %u in format string (no. 1)
> requires 'unsigned int' but the argument type is 'signed int'.
> [net/core/pktgen.c:962]: (warning) %u in format string (no. 1)
> requires 'unsigned int' but the argument type is 'signed int'.
> [net/core/pktgen.c:984]: (warning) %u in format string (no. 1)
> requires 'unsigned int' but the argument type is 'signed int'.
> [net/core/pktgen.c:1149]: (warning) %d in format string (no. 1)
> requires 'int' but the argument type is 'unsigned int'.
>
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Ye Bin <yebin10@huawei.com>
Applied.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-10-02 1:45 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-30 1:08 [PATCH 0/2] Fix inconsistent of format with argument type Ye Bin
2020-09-30 1:08 ` [PATCH 1/2] pktgen: Fix inconsistent of format with argument type in pktgen.c Ye Bin
2020-10-02 1:45 ` David Miller
2020-09-30 1:08 ` [PATCH 2/2] net-sysfs: Fix inconsistent of format with argument type in net-sysfs.c Ye Bin
2020-10-02 1:45 ` David Miller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.