public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Bart Van Assche <bart.vanassche-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
To: Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Cc: "linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"Marciniszyn,
	Mike" <mike.marciniszyn-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
	Dennis Dalessandro
	<dennis.dalessandro-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Subject: [PATCH 5/6] IB/hfi1: Use bit 0 instead of bit 1
Date: Fri, 3 Jun 2016 12:10:37 -0700	[thread overview]
Message-ID: <ff26909c-8aff-392e-e5eb-927d69fa2573@sandisk.com> (raw)
In-Reply-To: <86c06ca1-753c-6b45-3f65-f9a19f7693cf-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>

The first argument of test_bit() and clear_bit() is a bit number and
not a bitmask. Hence change that first argument from (1 << 0) into 0.
This patch avoids that smatch reports the following warnings:

user_sdma.c:1059: sdma_cache_evict() warn: test_bit() takes a bit number
user_sdma.c:1590: sdma_rb_remove() warn: test_bit() takes a bit number

Signed-off-by: Bart Van Assche <bart.vanassche-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
Cc: Mike Marciniszyn <mike.marciniszyn-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Cc: Dennis Dalessandro <dennis.dalessandro-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
---
 drivers/infiniband/hw/hfi1/user_sdma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/infiniband/hw/hfi1/user_sdma.c b/drivers/infiniband/hw/hfi1/user_sdma.c
index 29f4795..2eca5b7 100644
--- a/drivers/infiniband/hw/hfi1/user_sdma.c
+++ b/drivers/infiniband/hw/hfi1/user_sdma.c
@@ -183,7 +183,7 @@ struct user_sdma_iovec {
 	struct sdma_mmu_node *node;
 };
 
-#define SDMA_CACHE_NODE_EVICT BIT(0)
+#define SDMA_CACHE_NODE_EVICT 0
 
 struct sdma_mmu_node {
 	struct mmu_rb_node rb;
-- 
2.8.3

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2016-06-03 19:10 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-03 19:07 [PATCH 0/6] Various fixes for warnings reported by static source code analysis tools Bart Van Assche
     [not found] ` <86c06ca1-753c-6b45-3f65-f9a19f7693cf-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
2016-06-03 19:08   ` [PATCH 1/6] RDMA/core: Fix indentation Bart Van Assche
     [not found]     ` <90c52b83-52cc-c953-babb-3f95759ca797-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
2016-06-03 19:11       ` Steve Wise
2016-06-06 11:20       ` Sagi Grimberg
2016-06-03 19:08   ` [PATCH 2/6] IB/mad: " Bart Van Assche
     [not found]     ` <8eccc2e6-d33b-6130-2460-86a1d67159ae-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
2016-06-03 19:10       ` Weiny, Ira
2016-06-03 19:13       ` Hal Rosenstock
2016-06-06 11:20       ` Sagi Grimberg
2016-06-03 19:09   ` [PATCH 3/6] IB/rdmavt: Annotate rvt_reset_qp() Bart Van Assche
2016-06-03 19:09   ` [PATCH 4/6] IB/hfi1: Fix indentation Bart Van Assche
     [not found]     ` <54ad6b3b-4185-9345-26d0-ab3fd9ce36e4-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
2016-06-03 19:26       ` Dennis Dalessandro
     [not found]         ` <20160603192638.GA946-W4f6Xiosr+yv7QzWx2u06xL4W9x8LtSr@public.gmane.org>
2016-06-03 19:53           ` Bart Van Assche
2016-06-03 19:10   ` Bart Van Assche [this message]
2016-06-03 19:11   ` [PATCH 6/6] IB/hfi1: Suppress sparse warnings Bart Van Assche
2016-06-06 23:38   ` [PATCH 0/6] Various fixes for warnings reported by static source code analysis tools Doug Ledford

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=ff26909c-8aff-392e-e5eb-927d69fa2573@sandisk.com \
    --to=bart.vanassche-xdaiopvojttbdgjk7y7tuq@public.gmane.org \
    --cc=dennis.dalessandro-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mike.marciniszyn-ral2JQCrhuEAvxtiuMwx3w@public.gmane.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