From: Jiapeng Zhong <abaci-bugfix@linux.alibaba.com>
To: davem@davemloft.net
Cc: kuznet@ms2.inr.ac.ru, yoshfuji@linux-ipv6.org, kuba@kernel.org,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
Jiapeng Zhong <abaci-bugfix@linux.alibaba.com>
Subject: [PATCH] net/ipv6: warning: %u in format string (no. 2) requires 'unsigned int' but the argument type is 'signed int'.
Date: Thu, 7 Jan 2021 10:47:34 +0800 [thread overview]
Message-ID: <1609987654-11647-1-git-send-email-abaci-bugfix@linux.alibaba.com> (raw)
The print format of this parameter does not match, because it is defined
as int type, so modify the matching format of this parameter to %d format.
Signed-off-by: Jiapeng Zhong <abaci-bugfix@linux.alibaba.com>
Reported-by: Abaci <abaci@linux.alibaba.com>
---
net/ipv6/proc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/ipv6/proc.c b/net/ipv6/proc.c
index d6306aa..26c702b 100644
--- a/net/ipv6/proc.c
+++ b/net/ipv6/proc.c
@@ -169,7 +169,7 @@ static void snmp6_seq_show_icmpv6msg(struct seq_file *seq, atomic_long_t *smib)
val = atomic_long_read(smib + i);
if (!val)
continue;
- snprintf(name, sizeof(name), "Icmp6%sType%u",
+ snprintf(name, sizeof(name), "Icmp6%sType%d",
i & 0x100 ? "Out" : "In", i & 0xff);
seq_printf(seq, "%-32s\t%lu\n", name, val);
}
--
1.8.3.1
next reply other threads:[~2021-01-07 2:48 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-07 2:47 Jiapeng Zhong [this message]
2021-01-09 21:00 ` [PATCH] net/ipv6: warning: %u in format string (no. 2) requires 'unsigned int' but the argument type is 'signed int' Jakub Kicinski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1609987654-11647-1-git-send-email-abaci-bugfix@linux.alibaba.com \
--to=abaci-bugfix@linux.alibaba.com \
--cc=davem@davemloft.net \
--cc=kuba@kernel.org \
--cc=kuznet@ms2.inr.ac.ru \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=yoshfuji@linux-ipv6.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).