public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/6] Various fixes for warnings reported by static source code analysis tools
@ 2016-06-03 19:07 Bart Van Assche
       [not found] ` <86c06ca1-753c-6b45-3f65-f9a19f7693cf-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
  0 siblings, 1 reply; 15+ messages in thread
From: Bart Van Assche @ 2016-06-03 19:07 UTC (permalink / raw)
  To: Doug Ledford; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org

Hello Doug,

The following patches are what I came up with after having analyzed the 
output of sparse and smatch for Linux RDMA kernel code:

0001-RDMA-core-Fix-indentation.patch
0002-IB-mad-Fix-indentation.patch
0003-IB-rdmavt-Annotate-rvt_reset_qp.patch
0004-IB-hfi1-Fix-indentation.patch
0005-IB-hfi1-Use-bit-0-instead-of-bit-1.patch
0006-IB-hfi1-Suppress-sparse-warnings.patch

Bart.
--
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

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [PATCH 1/6] RDMA/core: Fix indentation
       [not found] ` <86c06ca1-753c-6b45-3f65-f9a19f7693cf-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
@ 2016-06-03 19:08   ` Bart Van Assche
       [not found]     ` <90c52b83-52cc-c953-babb-3f95759ca797-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
  2016-06-03 19:08   ` [PATCH 2/6] IB/mad: " Bart Van Assche
                     ` (5 subsequent siblings)
  6 siblings, 1 reply; 15+ messages in thread
From: Bart Van Assche @ 2016-06-03 19:08 UTC (permalink / raw)
  To: Doug Ledford
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Tatyana Nikolova, Steve Wise

Make indentation consistent. Detected by smatch.

Signed-off-by: Bart Van Assche <bart.vanassche-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
Cc: Tatyana Nikolova <Tatyana.E.Nikolova-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Cc: Steve Wise <swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>
---
 drivers/infiniband/core/iwpm_msg.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/infiniband/core/iwpm_msg.c b/drivers/infiniband/core/iwpm_msg.c
index 43e3fa2..1c41b95 100644
--- a/drivers/infiniband/core/iwpm_msg.c
+++ b/drivers/infiniband/core/iwpm_msg.c
@@ -506,7 +506,7 @@ int iwpm_add_and_query_mapping_cb(struct sk_buff *skb,
 	if (!nlmsg_request) {
 		pr_info("%s: Could not find a matching request (seq = %u)\n",
 				 __func__, msg_seq);
-			return -EINVAL;
+		return -EINVAL;
 	}
 	pm_msg = nlmsg_request->req_buffer;
 	local_sockaddr = (struct sockaddr_storage *)
-- 
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

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH 2/6] IB/mad: Fix indentation
       [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
@ 2016-06-03 19:08   ` Bart Van Assche
       [not found]     ` <8eccc2e6-d33b-6130-2460-86a1d67159ae-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
  2016-06-03 19:09   ` [PATCH 3/6] IB/rdmavt: Annotate rvt_reset_qp() Bart Van Assche
                     ` (4 subsequent siblings)
  6 siblings, 1 reply; 15+ messages in thread
From: Bart Van Assche @ 2016-06-03 19:08 UTC (permalink / raw)
  To: Doug Ledford
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Hal Rosenstock, Ira Weiny

Make indentation consistent. Detected by smatch.

Signed-off-by: Bart Van Assche <bart.vanassche-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
Cc: Hal Rosenstock <hal-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Cc: Ira Weiny <ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
---
 drivers/infiniband/core/mad.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/infiniband/core/mad.c b/drivers/infiniband/core/mad.c
index 82fb511..2d49228 100644
--- a/drivers/infiniband/core/mad.c
+++ b/drivers/infiniband/core/mad.c
@@ -1638,9 +1638,9 @@ static void remove_mad_reg_req(struct ib_mad_agent_private *agent_priv)
 		/* Now, check to see if there are any methods still in use */
 		if (!check_method_table(method)) {
 			/* If not, release management method table */
-			 kfree(method);
-			 class->method_table[mgmt_class] = NULL;
-			 /* Any management classes left ? */
+			kfree(method);
+			class->method_table[mgmt_class] = NULL;
+			/* Any management classes left ? */
 			if (!check_class_table(class)) {
 				/* If not, release management class table */
 				kfree(class);
-- 
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

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH 3/6] IB/rdmavt: Annotate rvt_reset_qp()
       [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
  2016-06-03 19:08   ` [PATCH 2/6] IB/mad: " Bart Van Assche
@ 2016-06-03 19:09   ` Bart Van Assche
  2016-06-03 19:09   ` [PATCH 4/6] IB/hfi1: Fix indentation Bart Van Assche
                     ` (3 subsequent siblings)
  6 siblings, 0 replies; 15+ messages in thread
From: Bart Van Assche @ 2016-06-03 19:09 UTC (permalink / raw)
  To: Doug Ledford
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Marciniszyn, Mike, Dennis Dalessandro

This patch avoids that sparse reports the following warning:

rdmavt/qp.c:507:17: warning: context imbalance in 'rvt_reset_qp' - unexpected unlock

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/sw/rdmavt/qp.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/infiniband/sw/rdmavt/qp.c b/drivers/infiniband/sw/rdmavt/qp.c
index 5fa4d4d..7de5134 100644
--- a/drivers/infiniband/sw/rdmavt/qp.c
+++ b/drivers/infiniband/sw/rdmavt/qp.c
@@ -502,6 +502,12 @@ static void rvt_remove_qp(struct rvt_dev_info *rdi, struct rvt_qp *qp)
  */
 static void rvt_reset_qp(struct rvt_dev_info *rdi, struct rvt_qp *qp,
 		  enum ib_qp_type type)
+	__releases(&qp->s_lock)
+	__releases(&qp->s_hlock)
+	__releases(&qp->r_lock)
+	__acquires(&qp->r_lock)
+	__acquires(&qp->s_hlock)
+	__acquires(&qp->s_lock)
 {
 	if (qp->state != IB_QPS_RESET) {
 		qp->state = IB_QPS_RESET;
-- 
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

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH 4/6] IB/hfi1: Fix indentation
       [not found] ` <86c06ca1-753c-6b45-3f65-f9a19f7693cf-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
                     ` (2 preceding siblings ...)
  2016-06-03 19:09   ` [PATCH 3/6] IB/rdmavt: Annotate rvt_reset_qp() Bart Van Assche
@ 2016-06-03 19:09   ` Bart Van Assche
       [not found]     ` <54ad6b3b-4185-9345-26d0-ab3fd9ce36e4-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
  2016-06-03 19:10   ` [PATCH 5/6] IB/hfi1: Use bit 0 instead of bit 1 Bart Van Assche
                     ` (2 subsequent siblings)
  6 siblings, 1 reply; 15+ messages in thread
From: Bart Van Assche @ 2016-06-03 19:09 UTC (permalink / raw)
  To: Doug Ledford
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Marciniszyn, Mike, Dennis Dalessandro

Make the indentation of the source code consistent. Detected by
smatch.

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/chip.c | 6 +++---
 drivers/infiniband/hw/hfi1/init.c | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/infiniband/hw/hfi1/chip.c b/drivers/infiniband/hw/hfi1/chip.c
index 3b876da..81619fb 100644
--- a/drivers/infiniband/hw/hfi1/chip.c
+++ b/drivers/infiniband/hw/hfi1/chip.c
@@ -7832,8 +7832,8 @@ static void handle_dcc_err(struct hfi1_devdata *dd, u32 unused, u64 reg)
 			 * save first 2 flits in the packet that caused
 			 * the error
 			 */
-			 dd->err_info_rcvport.packet_flit1 = hdr0;
-			 dd->err_info_rcvport.packet_flit2 = hdr1;
+			dd->err_info_rcvport.packet_flit1 = hdr0;
+			dd->err_info_rcvport.packet_flit2 = hdr1;
 		}
 		switch (info) {
 		case 1:
@@ -11906,7 +11906,7 @@ static void update_synth_timer(unsigned long opaque)
 		hfi1_cdbg(CNTR, "[%d] No update necessary", dd->unit);
 	}
 
-mod_timer(&dd->synth_stats_timer, jiffies + HZ * SYNTH_CNT_TIME);
+	mod_timer(&dd->synth_stats_timer, jiffies + HZ * SYNTH_CNT_TIME);
 }
 
 #define C_MAX_NAME 13 /* 12 chars + one for /0 */
diff --git a/drivers/infiniband/hw/hfi1/init.c b/drivers/infiniband/hw/hfi1/init.c
index 5cc492e..0d28a5a 100644
--- a/drivers/infiniband/hw/hfi1/init.c
+++ b/drivers/infiniband/hw/hfi1/init.c
@@ -1337,7 +1337,7 @@ static void cleanup_device_data(struct hfi1_devdata *dd)
 		dma_free_coherent(&dd->pcidev->dev, sizeof(u64),
 				  (void *)dd->rcvhdrtail_dummy_kvaddr,
 				  dd->rcvhdrtail_dummy_physaddr);
-				  dd->rcvhdrtail_dummy_kvaddr = NULL;
+		dd->rcvhdrtail_dummy_kvaddr = NULL;
 	}
 
 	for (ctxt = 0; tmp && ctxt < dd->num_rcv_contexts; ctxt++) {
-- 
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

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH 5/6] IB/hfi1: Use bit 0 instead of bit 1
       [not found] ` <86c06ca1-753c-6b45-3f65-f9a19f7693cf-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
                     ` (3 preceding siblings ...)
  2016-06-03 19:09   ` [PATCH 4/6] IB/hfi1: Fix indentation Bart Van Assche
@ 2016-06-03 19:10   ` Bart Van Assche
  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
  6 siblings, 0 replies; 15+ messages in thread
From: Bart Van Assche @ 2016-06-03 19:10 UTC (permalink / raw)
  To: Doug Ledford
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Marciniszyn, Mike, Dennis Dalessandro

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

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* RE: [PATCH 2/6] IB/mad: Fix indentation
       [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
  2 siblings, 0 replies; 15+ messages in thread
From: Weiny, Ira @ 2016-06-03 19:10 UTC (permalink / raw)
  To: Bart Van Assche, Doug Ledford
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Hal Rosenstock

> 
> Make indentation consistent. Detected by smatch.
> 
> Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
> Cc: Hal Rosenstock <hal@mellanox.com>
> Cc: Ira Weiny <ira.weiny@intel.com>

Reviewed-By: Ira Weiny <ira.weiny@intel.com>

> ---
>  drivers/infiniband/core/mad.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/infiniband/core/mad.c b/drivers/infiniband/core/mad.c
> index 82fb511..2d49228 100644
> --- a/drivers/infiniband/core/mad.c
> +++ b/drivers/infiniband/core/mad.c
> @@ -1638,9 +1638,9 @@ static void remove_mad_reg_req(struct
> ib_mad_agent_private *agent_priv)
>  		/* Now, check to see if there are any methods still in use */
>  		if (!check_method_table(method)) {
>  			/* If not, release management method table */
> -			 kfree(method);
> -			 class->method_table[mgmt_class] = NULL;
> -			 /* Any management classes left ? */
> +			kfree(method);
> +			class->method_table[mgmt_class] = NULL;
> +			/* Any management classes left ? */
>  			if (!check_class_table(class)) {
>  				/* If not, release management class table */
>  				kfree(class);
> --
> 2.8.3


^ permalink raw reply	[flat|nested] 15+ messages in thread

* [PATCH 6/6] IB/hfi1: Suppress sparse warnings
       [not found] ` <86c06ca1-753c-6b45-3f65-f9a19f7693cf-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
                     ` (4 preceding siblings ...)
  2016-06-03 19:10   ` [PATCH 5/6] IB/hfi1: Use bit 0 instead of bit 1 Bart Van Assche
@ 2016-06-03 19:11   ` Bart Van Assche
  2016-06-06 23:38   ` [PATCH 0/6] Various fixes for warnings reported by static source code analysis tools Doug Ledford
  6 siblings, 0 replies; 15+ messages in thread
From: Bart Van Assche @ 2016-06-03 19:11 UTC (permalink / raw)
  To: Doug Ledford
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Marciniszyn, Mike, Dennis Dalessandro

Avoid that sparse reports the following warnings for the hfi1 driver:

trace.c:217:13: warning: no previous prototype for ‘print_u64_array’ [-Wmissing-prototypes]
user_sdma.c:1361:17: warning: dubious: !x & y

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/trace.c     | 13 -------------
 drivers/infiniband/hw/hfi1/user_sdma.c |  4 ++--
 2 files changed, 2 insertions(+), 15 deletions(-)

diff --git a/drivers/infiniband/hw/hfi1/trace.c b/drivers/infiniband/hw/hfi1/trace.c
index 79b2952..4cfb137 100644
--- a/drivers/infiniband/hw/hfi1/trace.c
+++ b/drivers/infiniband/hw/hfi1/trace.c
@@ -214,19 +214,6 @@ const char *print_u32_array(
 	return ret;
 }
 
-const char *print_u64_array(
-	struct trace_seq *p,
-	u64 *arr, int len)
-{
-	int i;
-	const char *ret = trace_seq_buffer_ptr(p);
-
-	for (i = 0; i < len; i++)
-		trace_seq_printf(p, "%s0x%016llx", i == 0 ? "" : " ", arr[i]);
-	trace_seq_putc(p, 0);
-	return ret;
-}
-
 __hfi1_trace_fn(PKT);
 __hfi1_trace_fn(PROC);
 __hfi1_trace_fn(SDMA);
diff --git a/drivers/infiniband/hw/hfi1/user_sdma.c b/drivers/infiniband/hw/hfi1/user_sdma.c
index 2eca5b7..47ffd27 100644
--- a/drivers/infiniband/hw/hfi1/user_sdma.c
+++ b/drivers/infiniband/hw/hfi1/user_sdma.c
@@ -1355,11 +1355,11 @@ static int set_txreq_header(struct user_sdma_request *req,
 		 */
 		SDMA_DBG(req, "TID offset %ubytes %uunits om%u",
 			 req->tidoffset, req->tidoffset / req->omfactor,
-			 !!(req->omfactor - KDETH_OM_SMALL));
+			 req->omfactor != KDETH_OM_SMALL);
 		KDETH_SET(hdr->kdeth.ver_tid_offset, OFFSET,
 			  req->tidoffset / req->omfactor);
 		KDETH_SET(hdr->kdeth.ver_tid_offset, OM,
-			  !!(req->omfactor - KDETH_OM_SMALL));
+			  req->omfactor != KDETH_OM_SMALL);
 	}
 done:
 	trace_hfi1_sdma_user_header(pq->dd, pq->ctxt, pq->subctxt,
-- 
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

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* RE: [PATCH 1/6] RDMA/core: Fix indentation
       [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
  1 sibling, 0 replies; 15+ messages in thread
From: Steve Wise @ 2016-06-03 19:11 UTC (permalink / raw)
  To: 'Bart Van Assche', 'Doug Ledford'
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, 'Tatyana Nikolova'

> Make indentation consistent. Detected by smatch.
> 
> Signed-off-by: Bart Van Assche <bart.vanassche-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
> Cc: Tatyana Nikolova <Tatyana.E.Nikolova-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
> Cc: Steve Wise <swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>

yup...

Reviewed-by: Steve Wise <swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>

--
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

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH 2/6] IB/mad: Fix indentation
       [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
  2 siblings, 0 replies; 15+ messages in thread
From: Hal Rosenstock @ 2016-06-03 19:13 UTC (permalink / raw)
  To: Bart Van Assche, Doug Ledford
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Hal Rosenstock, Ira Weiny

On 6/3/2016 3:08 PM, Bart Van Assche wrote:
> Make indentation consistent. Detected by smatch.
> 
> Signed-off-by: Bart Van Assche <bart.vanassche-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
> Cc: Hal Rosenstock <hal-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> Cc: Ira Weiny <ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>

Reviewed-by: Hal Rosenstock <hal-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
--
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

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH 4/6] IB/hfi1: Fix indentation
       [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>
  0 siblings, 1 reply; 15+ messages in thread
From: Dennis Dalessandro @ 2016-06-03 19:26 UTC (permalink / raw)
  To: Bart Van Assche
  Cc: Doug Ledford, linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Marciniszyn, Mike

On Fri, Jun 03, 2016 at 12:09:56PM -0700, Bart Van Assche wrote:
> #define C_MAX_NAME 13 /* 12 chars + one for /0 */
>diff --git a/drivers/infiniband/hw/hfi1/init.c b/drivers/infiniband/hw/hfi1/init.c
>index 5cc492e..0d28a5a 100644
>--- a/drivers/infiniband/hw/hfi1/init.c
>+++ b/drivers/infiniband/hw/hfi1/init.c
>@@ -1337,7 +1337,7 @@ static void cleanup_device_data(struct hfi1_devdata *dd)
> 		dma_free_coherent(&dd->pcidev->dev, sizeof(u64),
> 				  (void *)dd->rcvhdrtail_dummy_kvaddr,
> 				  dd->rcvhdrtail_dummy_physaddr);
>-				  dd->rcvhdrtail_dummy_kvaddr = NULL;
>+		dd->rcvhdrtail_dummy_kvaddr = NULL;
> 	}
> 
> 	for (ctxt = 0; tmp && ctxt < dd->num_rcv_contexts; ctxt++) {

This is the same thing as a patch from Dan Carpenter I think?
https://patchwork.kernel.org/patch/9139133/

-Denny
--
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

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH 4/6] IB/hfi1: Fix indentation
       [not found]         ` <20160603192638.GA946-W4f6Xiosr+yv7QzWx2u06xL4W9x8LtSr@public.gmane.org>
@ 2016-06-03 19:53           ` Bart Van Assche
  0 siblings, 0 replies; 15+ messages in thread
From: Bart Van Assche @ 2016-06-03 19:53 UTC (permalink / raw)
  To: Dennis Dalessandro
  Cc: Doug Ledford, linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Marciniszyn, Mike

On 06/03/2016 12:26 PM, Dennis Dalessandro wrote:
> On Fri, Jun 03, 2016 at 12:09:56PM -0700, Bart Van Assche wrote:
>> #define C_MAX_NAME 13 /* 12 chars + one for /0 */
>> diff --git a/drivers/infiniband/hw/hfi1/init.c b/drivers/infiniband/hw/hfi1/init.c
>> index 5cc492e..0d28a5a 100644
>> --- a/drivers/infiniband/hw/hfi1/init.c
>> +++ b/drivers/infiniband/hw/hfi1/init.c
>> @@ -1337,7 +1337,7 @@ static void cleanup_device_data(struct hfi1_devdata *dd)
>> 		dma_free_coherent(&dd->pcidev->dev, sizeof(u64),
>> 				  (void *)dd->rcvhdrtail_dummy_kvaddr,
>> 				  dd->rcvhdrtail_dummy_physaddr);
>> -				  dd->rcvhdrtail_dummy_kvaddr = NULL;
>> +		dd->rcvhdrtail_dummy_kvaddr = NULL;
>> 	}
>>
>> 	for (ctxt = 0; tmp && ctxt < dd->num_rcv_contexts; ctxt++) {
>
> This is the same thing as a patch from Dan Carpenter I think?
> https://patchwork.kernel.org/patch/9139133/

Indeed, and apparently I forgot that I had already reviewed that patch :-)

Bart.

--
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

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH 1/6] RDMA/core: Fix indentation
       [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
  1 sibling, 0 replies; 15+ messages in thread
From: Sagi Grimberg @ 2016-06-06 11:20 UTC (permalink / raw)
  To: Bart Van Assche, Doug Ledford
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Tatyana Nikolova, Steve Wise

Reviewed-by: Sagi Grimberg <sagi-83A9D8WTQD1BDLzU/O5InQ@public.gmane.org>
--
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

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH 2/6] IB/mad: Fix indentation
       [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
  2 siblings, 0 replies; 15+ messages in thread
From: Sagi Grimberg @ 2016-06-06 11:20 UTC (permalink / raw)
  To: Bart Van Assche, Doug Ledford
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Hal Rosenstock, Ira Weiny

Reviewed-by: Sagi Grimberg <sagi-NQWnxTmZq1alnMjI0IkVqw@public.gmane.org>
--
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

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH 0/6] Various fixes for warnings reported by static source code analysis tools
       [not found] ` <86c06ca1-753c-6b45-3f65-f9a19f7693cf-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
                     ` (5 preceding siblings ...)
  2016-06-03 19:11   ` [PATCH 6/6] IB/hfi1: Suppress sparse warnings Bart Van Assche
@ 2016-06-06 23:38   ` Doug Ledford
  6 siblings, 0 replies; 15+ messages in thread
From: Doug Ledford @ 2016-06-06 23:38 UTC (permalink / raw)
  To: Bart Van Assche; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org


[-- Attachment #1.1: Type: text/plain, Size: 570 bytes --]

On 6/3/2016 3:07 PM, Bart Van Assche wrote:
> Hello Doug,
> 
> The following patches are what I came up with after having analyzed the
> output of sparse and smatch for Linux RDMA kernel code:
> 
> 0001-RDMA-core-Fix-indentation.patch
> 0002-IB-mad-Fix-indentation.patch
> 0003-IB-rdmavt-Annotate-rvt_reset_qp.patch
> 0004-IB-hfi1-Fix-indentation.patch
> 0005-IB-hfi1-Use-bit-0-instead-of-bit-1.patch
> 0006-IB-hfi1-Suppress-sparse-warnings.patch
> 
> Bart.


Thanks Bart.  Modulo the hfi1 indent fix that was already partially
done, series applied.


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 884 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2016-06-06 23:38 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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   ` [PATCH 5/6] IB/hfi1: Use bit 0 instead of bit 1 Bart Van Assche
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox