From patchwork Mon Jun 3 20:46:45 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Honnappa Nagarahalli X-Patchwork-Id: 165682 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp4954344ili; Mon, 3 Jun 2019 13:46:59 -0700 (PDT) X-Google-Smtp-Source: APXvYqzN/fnZKGLdyh6YctjtiUttbSxnrbIB0O5JvSTsa9mn33tGHkgceQxAaLuyHNXBMHNsjwR3 X-Received: by 2002:a50:a3b5:: with SMTP id s50mr31782475edb.149.1559594819824; Mon, 03 Jun 2019 13:46:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559594819; cv=none; d=google.com; s=arc-20160816; b=XDps9uSTOeWuNPoVXBme6YtgxRrdO2SFeQbunrF2z+aVqYjg5CuajBBlXFUjTCzcGZ OUzstX40xNu3ZDcyuD9iNcqWpCcsOZmeunfK3KLQambSKu854wgTj5yLru2qk19NAutR PqUidEyfEw/Zve7w1b3Mo9RQRNyWvoGWddPWR2iB9yr7XYRXg8WCbX28ITLBa6ydBX67 2c421qs2QtVXoslE7Hl42NAjCbxKURnXa97lE+Q9lPp3KHgnQpwagBu91rDGhICk5nMq xeivVl9mEanFn9JNSE0/sUIc2Gr0E+iyR0NJXy2qFwBfANss98pWTIHbkKeA2WEUnKDe zQqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:message-id:date:cc:to :from; bh=axpFS/YV12m9WLXPnnB8cujXXYNdBePpWKSwJLVEXyc=; b=uXe26C/DAxHUE65MH1NFsjV1IflOgd7T3AZmsqzy2mbVW3Fvs7LVlScgCaxsa6ypNd ww74up/k8UypU+srlA/v2RvFEIyJ/du5gOdWpyTSu16/a4s+DODESBeXD2nMbmOXVde+ mqu7udRJAyMpoap346v+mOFh1S9UTTIUIlemw96VpzRxkoAdYZkkz4gRepXEuyY28JSS ///WLxS96u7S2wAsXLP7+WKBi3eD/w7OrNtSLLJam75GiAGk6cqfIgaMVs4xNqFj1jnv 10YyEvX7AW93IaC8ZxQ0hvz6zgqfk02JCi2ijdk38RDHqcJuht5tHuUXMp8uloG4FnKC Ah+A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org Return-Path: Received: from dpdk.org (dpdk.org. [92.243.14.124]) by mx.google.com with ESMTP id b38si1958834edb.341.2019.06.03.13.46.59; Mon, 03 Jun 2019 13:46:59 -0700 (PDT) Received-SPF: pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) client-ip=92.243.14.124; Authentication-Results: mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 3A8761B9B9; Mon, 3 Jun 2019 22:46:58 +0200 (CEST) Received: from foss.arm.com (usa-sjc-mx-foss1.foss.arm.com [217.140.101.70]) by dpdk.org (Postfix) with ESMTP id 1092B1B9A7 for ; Mon, 3 Jun 2019 22:46:56 +0200 (CEST) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 461D6A78; Mon, 3 Jun 2019 13:46:55 -0700 (PDT) Received: from qc2400f-1.austin.arm.com (qc2400f-1.austin.arm.com [10.118.12.65]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 08D9B3F246; Mon, 3 Jun 2019 13:46:54 -0700 (PDT) From: Honnappa Nagarahalli To: honnappa.nagarahalli@arm.com, dev@dpdk.org Cc: nd@arm.com Date: Mon, 3 Jun 2019 15:46:45 -0500 Message-Id: <20190603204645.24401-1-honnappa.nagarahalli@arm.com> X-Mailer: git-send-email 2.17.1 Subject: [dpdk-dev] [PATCH] rcu: change format specifier in fprintf X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 Reviewed-by: Ruifeng Wang --- 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(-) -- 2.17.1 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,