From: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
To: honnappa.nagarahalli@arm.com, dev@dpdk.org
Cc: nd@arm.com
Subject: [dpdk-dev] [PATCH] rcu: change format specifier in fprintf
Date: Mon, 3 Jun 2019 15:46:45 -0500 [thread overview]
Message-ID: <20190603204645.24401-1-honnappa.nagarahalli@arm.com> (raw)
Use %u to fix argument type mismatch in fprintf.
Coverity issue: 340074
Fixes: 64994b56cfd7 ("rcu: add RCU library supporting QSBR mechanism")
Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
---
This patch is dependent on: http://patchwork.dpdk.org/patch/53455
lib/librte_rcu/rte_rcu_qsbr.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/librte_rcu/rte_rcu_qsbr.c b/lib/librte_rcu/rte_rcu_qsbr.c
index b4ed01045..de2546464 100644
--- a/lib/librte_rcu/rte_rcu_qsbr.c
+++ b/lib/librte_rcu/rte_rcu_qsbr.c
@@ -234,7 +234,7 @@ rte_rcu_qsbr_dump(FILE *f, struct rte_rcu_qsbr *v)
id = i << __RTE_QSBR_THRID_INDEX_SHIFT;
while (bmap) {
t = __builtin_ctzl(bmap);
- fprintf(f, "%d ", id + t);
+ fprintf(f, "%u ", id + t);
bmap &= ~(1UL << t);
}
@@ -252,7 +252,7 @@ rte_rcu_qsbr_dump(FILE *f, struct rte_rcu_qsbr *v)
id = i << __RTE_QSBR_THRID_INDEX_SHIFT;
while (bmap) {
t = __builtin_ctzl(bmap);
- fprintf(f, "thread ID = %d, count = %"PRIu64", lock count = %u\n",
+ fprintf(f, "thread ID = %u, count = %"PRIu64", lock count = %u\n",
id + t,
__atomic_load_n(
&v->qsbr_cnt[id + t].cnt,
--
2.17.1
next reply other threads:[~2019-06-03 20:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-03 20:46 Honnappa Nagarahalli [this message]
2019-06-05 12:18 ` Thomas Monjalon
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=20190603204645.24401-1-honnappa.nagarahalli@arm.com \
--to=honnappa.nagarahalli@arm.com \
--cc=dev@dpdk.org \
--cc=nd@arm.com \
/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).