linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH for-2.6.36] ib: fix some sparse warnings
@ 2010-07-20 12:00 Or Gerlitz
       [not found] ` <Pine.LNX.4.64.1007201458210.3835-aDiYczhfhVLdX2U7gxhm1tBPR1lH4CV8@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Or Gerlitz @ 2010-07-20 12:00 UTC (permalink / raw)
  To: Roland Dreier; +Cc: Steve Wise, Chien Tung, linux-rdma

fixed the following drivers/infiniband sparse pointed issues

  CHECK   drivers/infiniband/hw/cxgb3/iwch_cm.c
iwch_cm.c:140:5: warning: symbol 'iwch_l2t_send' was not declared. Should it be static?
  CHECK   drivers/infiniband/hw/nes/nes_verbs.c
nes_verbs.c:1944:45: warning: Using plain integer as NULL pointer
nes_verbs.c:1944:48: warning: Using plain integer as NULL pointer
  CHECK   drivers/infiniband/hw/nes/nes_cm.c
nes_cm.c:2645:43: warning: mixing different enum types
nes_cm.c:2645:43:     int enum iw_cm_event_type  versus
nes_cm.c:2645:43:     int enum iw_cm_event_status
  CHECK   drivers/infiniband/ulp/iser/iser_initiator.c
iser_initiator.c:173:5: warning: symbol 'iser_alloc_rx_descriptors' was not declared. Should it be static?

Signed-off-by: Or Gerlitz <ogerlitz-smomgflXvOZWk0Htik3J/w@public.gmane.org>
--------

I didn't address these two

  CHECK   drivers/infiniband/hw/cxgb3/iwch_cq.c
drivers/infiniband/hw/cxgb3/iwch_cq.c:192:9: warning: context imbalance in 'iwch_poll_cq_one' - different lock contexts for basic block
  CHECK   drivers/infiniband/hw/cxgb3/iwch_qp.c
drivers/infiniband/hw/cxgb3/iwch_qp.c:805:13: warning: context imbalance in '__flush_qp' - unexpected unlock

diff --git a/drivers/infiniband/hw/cxgb3/iwch_cm.c b/drivers/infiniband/hw/cxgb3/iwch_cm.c
index ebfb117..3cdb535 100644
--- a/drivers/infiniband/hw/cxgb3/iwch_cm.c
+++ b/drivers/infiniband/hw/cxgb3/iwch_cm.c
@@ -137,7 +137,7 @@ static void stop_ep_timer(struct iwch_ep *ep)
 	put_ep(&ep->com);
 }

-int iwch_l2t_send(struct t3cdev *tdev, struct sk_buff *skb, struct l2t_entry *l2e)
+static int iwch_l2t_send(struct t3cdev *tdev, struct sk_buff *skb, struct l2t_entry *l2e)
 {
 	int	error = 0;
 	struct cxio_rdev *rdev;
diff --git a/drivers/infiniband/hw/nes/nes_cm.c b/drivers/infiniband/hw/nes/nes_cm.c
index 986d6f3..98887af 100644
--- a/drivers/infiniband/hw/nes/nes_cm.c
+++ b/drivers/infiniband/hw/nes/nes_cm.c
@@ -2565,7 +2565,7 @@ static int nes_cm_disconn_true(struct nes_qp *nesqp)
 	u16 last_ae;
 	u8 original_hw_tcp_state;
 	u8 original_ibqp_state;
-	enum iw_cm_event_type disconn_status = IW_CM_EVENT_STATUS_OK;
+	enum iw_cm_event_status  disconn_status = IW_CM_EVENT_STATUS_OK;
 	int issue_disconn = 0;
 	int issue_close = 0;
 	int issue_flush = 0;
diff --git a/drivers/infiniband/hw/nes/nes_verbs.c b/drivers/infiniband/hw/nes/nes_verbs.c
index 9bc2d74..0df51a4 100644
--- a/drivers/infiniband/hw/nes/nes_verbs.c
+++ b/drivers/infiniband/hw/nes/nes_verbs.c
@@ -1941,7 +1941,7 @@ static int nes_reg_mr(struct nes_device *nesdev, struct nes_pd *nespd,
 	u8  use_256_pbls = 0;
 	u8  use_4k_pbls = 0;
 	u16 use_two_level = (pbl_count_4k > 1) ? 1 : 0;
-	struct nes_root_vpbl new_root = {0, 0, 0};
+	struct nes_root_vpbl new_root = {0, NULL, NULL};
 	u32 opcode = 0;
 	u16 major_code;

diff --git a/drivers/infiniband/ulp/iser/iser_initiator.c b/drivers/infiniband/ulp/iser/iser_initiator.c
index 0b9ef07..95a08a8 100644
--- a/drivers/infiniband/ulp/iser/iser_initiator.c
+++ b/drivers/infiniband/ulp/iser/iser_initiator.c
@@ -170,7 +170,7 @@ static void iser_create_send_desc(struct iser_conn	*ib_conn,
 }


-int iser_alloc_rx_descriptors(struct iser_conn *ib_conn)
+static int iser_alloc_rx_descriptors(struct iser_conn *ib_conn)
 {
 	int i, j;
 	u64 dma_addr;
--
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] 5+ messages in thread

* RE: [PATCH for-2.6.36] ib: fix some sparse warnings
       [not found] ` <Pine.LNX.4.64.1007201458210.3835-aDiYczhfhVLdX2U7gxhm1tBPR1lH4CV8@public.gmane.org>
@ 2010-07-20 13:53   ` Tung, Chien Tin
  2010-07-20 18:15   ` Steve Wise
                     ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Tung, Chien Tin @ 2010-07-20 13:53 UTC (permalink / raw)
  To: Or Gerlitz, Roland Dreier; +Cc: Steve Wise, linux-rdma

> Subject: [PATCH for-2.6.36] ib: fix some sparse warnings
> 
> fixed the following drivers/infiniband sparse pointed issues
> 

> nes_verbs.c:1944:45: warning: Using plain integer as NULL pointer
> nes_verbs.c:1944:48: warning: Using plain integer as NULL pointer
>   CHECK   drivers/infiniband/hw/nes/nes_cm.c
> nes_cm.c:2645:43: warning: mixing different enum types
> nes_cm.c:2645:43:     int enum iw_cm_event_type  versus
> nes_cm.c:2645:43:     int enum iw_cm_event_status


> 
> Signed-off-by: Or Gerlitz <ogerlitz-smomgflXvOZWk0Htik3J/w@public.gmane.org>


Thanks Or!

Acked-by: Chien Tung <chien.tin.tung-ral2JQCrhuEAvxtiuMwx3w@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] 5+ messages in thread

* Re: [PATCH for-2.6.36] ib: fix some sparse warnings
       [not found] ` <Pine.LNX.4.64.1007201458210.3835-aDiYczhfhVLdX2U7gxhm1tBPR1lH4CV8@public.gmane.org>
  2010-07-20 13:53   ` Tung, Chien Tin
@ 2010-07-20 18:15   ` Steve Wise
  2010-08-03  9:54   ` Or Gerlitz
  2010-08-04 17:01   ` Roland Dreier
  3 siblings, 0 replies; 5+ messages in thread
From: Steve Wise @ 2010-07-20 18:15 UTC (permalink / raw)
  To: Or Gerlitz; +Cc: Roland Dreier, Chien Tung, linux-rdma

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

Or Gerlitz wrote:
> fixed the following drivers/infiniband sparse pointed issues
>
>   CHECK   drivers/infiniband/hw/cxgb3/iwch_cm.c
> iwch_cm.c:140:5: warning: symbol 'iwch_l2t_send' was not declared. Should it be static?
>   CHECK   drivers/infiniband/hw/nes/nes_verbs.c
> nes_verbs.c:1944:45: warning: Using plain integer as NULL pointer
> nes_verbs.c:1944:48: warning: Using plain integer as NULL pointer
>   CHECK   drivers/infiniband/hw/nes/nes_cm.c
> nes_cm.c:2645:43: warning: mixing different enum types
> nes_cm.c:2645:43:     int enum iw_cm_event_type  versus
> nes_cm.c:2645:43:     int enum iw_cm_event_status
>   CHECK   drivers/infiniband/ulp/iser/iser_initiator.c
> iser_initiator.c:173:5: warning: symbol 'iser_alloc_rx_descriptors' was not declared. Should it be static?
>
> Signed-off-by: Or Gerlitz <ogerlitz-smomgflXvOZWk0Htik3J/w@public.gmane.org>
> --------
>
> I didn't address these two
>
>   CHECK   drivers/infiniband/hw/cxgb3/iwch_cq.c
> drivers/infiniband/hw/cxgb3/iwch_cq.c:192:9: warning: context imbalance in 'iwch_poll_cq_one' - different lock contexts for basic block
>   CHECK   drivers/infiniband/hw/cxgb3/iwch_qp.c
> drivers/infiniband/hw/cxgb3/iwch_qp.c:805:13: warning: context imbalance in '__flush_qp' - unexpected unlock
>
> diff --git a/drivers/infiniband/hw/cxgb3/iwch_cm.c b/drivers/infiniband/hw/cxgb3/iwch_cm.c
> index ebfb117..3cdb535 100644
> --- a/drivers/infiniband/hw/cxgb3/iwch_cm.c
> +++ b/drivers/infiniband/hw/cxgb3/iwch_cm.c
> @@ -137,7 +137,7 @@ static void stop_ep_timer(struct iwch_ep *ep)
>  	put_ep(&ep->com);
>  }
>
> -int iwch_l2t_send(struct t3cdev *tdev, struct sk_buff *skb, struct l2t_entry *l2e)
> +static int iwch_l2t_send(struct t3cdev *tdev, struct sk_buff *skb, struct l2t_entry *l2e)
>  {
>  	int	error = 0;
>  	struct cxio_rdev *rdev;
> diff --git a/drivers/infiniband/hw/nes/nes_cm.c b/drivers/infiniband/hw/nes/nes_cm.c
> index 986d6f3..98887af 100644
> --- a/drivers/infiniband/hw/nes/nes_cm.c
> +++ b/drivers/infiniband/hw/nes/nes_cm.c
> @@ -2565,7 +2565,7 @@ static int nes_cm_disconn_true(struct nes_qp *nesqp)
>  	u16 last_ae;
>  	u8 original_hw_tcp_state;
>  	u8 original_ibqp_state;
> -	enum iw_cm_event_type disconn_status = IW_CM_EVENT_STATUS_OK;
> +	enum iw_cm_event_status  disconn_status = IW_CM_EVENT_STATUS_OK;
>  	int issue_disconn = 0;
>  	int issue_close = 0;
>  	int issue_flush = 0;
> diff --git a/drivers/infiniband/hw/nes/nes_verbs.c b/drivers/infiniband/hw/nes/nes_verbs.c
> index 9bc2d74..0df51a4 100644
> --- a/drivers/infiniband/hw/nes/nes_verbs.c
> +++ b/drivers/infiniband/hw/nes/nes_verbs.c
> @@ -1941,7 +1941,7 @@ static int nes_reg_mr(struct nes_device *nesdev, struct nes_pd *nespd,
>  	u8  use_256_pbls = 0;
>  	u8  use_4k_pbls = 0;
>  	u16 use_two_level = (pbl_count_4k > 1) ? 1 : 0;
> -	struct nes_root_vpbl new_root = {0, 0, 0};
> +	struct nes_root_vpbl new_root = {0, NULL, NULL};
>  	u32 opcode = 0;
>  	u16 major_code;
>
> diff --git a/drivers/infiniband/ulp/iser/iser_initiator.c b/drivers/infiniband/ulp/iser/iser_initiator.c
> index 0b9ef07..95a08a8 100644
> --- a/drivers/infiniband/ulp/iser/iser_initiator.c
> +++ b/drivers/infiniband/ulp/iser/iser_initiator.c
> @@ -170,7 +170,7 @@ static void iser_create_send_desc(struct iser_conn	*ib_conn,
>  }
>
>
> -int iser_alloc_rx_descriptors(struct iser_conn *ib_conn)
> +static int iser_alloc_rx_descriptors(struct iser_conn *ib_conn)
>  {
>  	int i, j;
>  	u64 dma_addr;
>   

--
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] 5+ messages in thread

* Re: [PATCH for-2.6.36] ib: fix some sparse warnings
       [not found] ` <Pine.LNX.4.64.1007201458210.3835-aDiYczhfhVLdX2U7gxhm1tBPR1lH4CV8@public.gmane.org>
  2010-07-20 13:53   ` Tung, Chien Tin
  2010-07-20 18:15   ` Steve Wise
@ 2010-08-03  9:54   ` Or Gerlitz
  2010-08-04 17:01   ` Roland Dreier
  3 siblings, 0 replies; 5+ messages in thread
From: Or Gerlitz @ 2010-08-03  9:54 UTC (permalink / raw)
  To: Roland Dreier; +Cc: Steve Wise, Chien Tung, linux-rdma

Or Gerlitz wrote:
> fixed the following drivers/infiniband sparse pointed issues
Hi Roland,

Did you notice this patch? I saw that you've merged some patches which 
were posted later, so I assumed you might missed it. Steve and Chien 
acked on the thread.

Or.
--
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] 5+ messages in thread

* Re: [PATCH for-2.6.36] ib: fix some sparse warnings
       [not found] ` <Pine.LNX.4.64.1007201458210.3835-aDiYczhfhVLdX2U7gxhm1tBPR1lH4CV8@public.gmane.org>
                     ` (2 preceding siblings ...)
  2010-08-03  9:54   ` Or Gerlitz
@ 2010-08-04 17:01   ` Roland Dreier
  3 siblings, 0 replies; 5+ messages in thread
From: Roland Dreier @ 2010-08-04 17:01 UTC (permalink / raw)
  To: Or Gerlitz; +Cc: Steve Wise, Chien Tung, linux-rdma

thanks, applied split into 3 patches (cxgb3, iser and nes)
-- 
Roland Dreier <rolandd-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org> || For corporate legal information go to:
http://www.cisco.com/web/about/doing_business/legal/cri/index.html
--
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] 5+ messages in thread

end of thread, other threads:[~2010-08-04 17:01 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-20 12:00 [PATCH for-2.6.36] ib: fix some sparse warnings Or Gerlitz
     [not found] ` <Pine.LNX.4.64.1007201458210.3835-aDiYczhfhVLdX2U7gxhm1tBPR1lH4CV8@public.gmane.org>
2010-07-20 13:53   ` Tung, Chien Tin
2010-07-20 18:15   ` Steve Wise
2010-08-03  9:54   ` Or Gerlitz
2010-08-04 17:01   ` Roland Dreier

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