Commit 32be425b authored by Ye Bin's avatar Ye Bin Committed by David S. Miller

pktgen: Fix inconsistent of format with argument type in pktgen.c

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: default avatarHulk Robot <hulkci@huawei.com>
Signed-off-by: default avatarYe Bin <yebin10@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 8306266c
...@@ -922,7 +922,7 @@ static ssize_t pktgen_if_write(struct file *file, ...@@ -922,7 +922,7 @@ static ssize_t pktgen_if_write(struct file *file,
pkt_dev->min_pkt_size = value; pkt_dev->min_pkt_size = value;
pkt_dev->cur_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); pkt_dev->min_pkt_size);
return count; return count;
} }
...@@ -939,7 +939,7 @@ static ssize_t pktgen_if_write(struct file *file, ...@@ -939,7 +939,7 @@ static ssize_t pktgen_if_write(struct file *file,
pkt_dev->max_pkt_size = value; pkt_dev->max_pkt_size = value;
pkt_dev->cur_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); pkt_dev->max_pkt_size);
return count; return count;
} }
...@@ -959,7 +959,7 @@ static ssize_t pktgen_if_write(struct file *file, ...@@ -959,7 +959,7 @@ static ssize_t pktgen_if_write(struct file *file,
pkt_dev->max_pkt_size = value; pkt_dev->max_pkt_size = value;
pkt_dev->cur_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; return count;
} }
...@@ -981,7 +981,7 @@ static ssize_t pktgen_if_write(struct file *file, ...@@ -981,7 +981,7 @@ static ssize_t pktgen_if_write(struct file *file,
i += len; i += len;
pkt_dev->nfrags = value; pkt_dev->nfrags = value;
sprintf(pg_result, "OK: frags=%u", pkt_dev->nfrags); sprintf(pg_result, "OK: frags=%d", pkt_dev->nfrags);
return count; return count;
} }
if (!strcmp(name, "delay")) { if (!strcmp(name, "delay")) {
...@@ -1146,7 +1146,7 @@ static ssize_t pktgen_if_write(struct file *file, ...@@ -1146,7 +1146,7 @@ static ssize_t pktgen_if_write(struct file *file,
(!(pkt_dev->odev->priv_flags & IFF_TX_SKB_SHARING))))) (!(pkt_dev->odev->priv_flags & IFF_TX_SKB_SHARING)))))
return -ENOTSUPP; return -ENOTSUPP;
pkt_dev->burst = value < 1 ? 1 : value; 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; return count;
} }
if (!strcmp(name, "node")) { if (!strcmp(name, "node")) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment