All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 00/45] Address issues detected by static analysis tools
@ 2017-10-11 17:48 Bart Van Assche
       [not found] ` <20171011174927.25113-1-bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
  0 siblings, 1 reply; 55+ messages in thread
From: Bart Van Assche @ 2017-10-11 17:48 UTC (permalink / raw)
  To: Doug Ledford; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Bart Van Assche

Hello Doug,

As we all know there are several static analysis tools available for the Linux
kernel and these tools are valuable. I'm referring to increasing the gcc
warning level (W=1), sparse and smatch. It is helpful to analyze new code with
these tools before submitting a patch. These tools are most useful if existing
code is clean. Hence this patch series that significantly reduces the number
of complaints reported by static analysis tools. Please consider this patch
series for kernel v4.15.

Thanks,

Bart.

Changes compared to v1:
- Replaced the patch that modified a qib macro by a patch that removes that
  macro and the code that uses it.
- Removed the c4iw_debug kernel module parameter instead of declaring the
  c4iw_debug variable static.
- Left out the uverbs patch since it is still under discussion.
- Left out a patch for include/rdma/opa_addr.h because an alternative patch
  went into Doug's tree very recently.
- Added Reviewed-by tags for the patches that got a positive review.

Bart Van Assche (45):
  IB/core: Fix endianness annotation in rdma_is_multicast_addr()
  IB/cm: Suppress gcc 7 fall-through complaints
  RDMA/cma: Avoid triggering undefined behavior
  RDMA/iwcm: Remove a set-but-not-used variable
  RDMA/isert: Suppress gcc 7 fall-through complaints
  RDMA/bnxt_re: Suppress gcc 7 fall-through complaints
  RDMA/bnxt_re: Remove set-but-not-used variables
  RDMA/cxgb3: Annotate locking assumptions
  RDMA/cxgb3: Annotate an RCU pointer
  RDMA/cxgb3: Remove a set-but-not-used variable
  RDMA/cxgb4: Fix indentation
  RDMA/cxgb4: Remove the obsolete kernel module option 'c4iw_debug'
  RDMA/cxgb4: Suppress gcc 7 fall-through complaints
  RDMA/cxgb4: Remove a set-but-not-used variable
  IB/hfi1: Suppress gcc 7 fall-through complaints
  IB/hfi1: Remove set-but-not-used variables
  IB/hfi1: Define hfi1_handle_cnp_tbl[] once
  IB/hns: Annotate iomem pointers correctly
  IB/hns: Declare local functions 'static'
  RDMA/i40iw: Fix a race condition
  RDMA/i40iw: Suppress gcc 7 fall-through complaints
  RDMA/i40iw: Remove a set-but-not-used variable
  IB/mthca: Fix indentation
  IB/mlx4: Suppress gcc 7 fall-through complaints
  IB/mlx5: Suppress gcc 7 fall-through complaints
  IB/mlx5: Remove a set-but-not-used variable
  IB/nes: Fix indentation
  IB/nes: Suppress gcc 7 fall-through complaints
  IB/nes: Remove set-but-not-used variables
  IB/nes: Fix a race condition in nes_inetaddr_event()
  RDMA/ocrdma: Use NULL instead of 0 to represent a pointer
  RDMA/ocrdma: Suppress gcc 7 fall-through complaints
  RDMA/ocrdma: Remove set-but-not-used variables
  RDMA/qedr: Use NULL instead of 0 to represent a pointer
  RDMA/qedr: Declare local functions static
  RDMA/qedr: Annotate iomem pointers correctly
  RDMA/qedr: Remove set-but-not-used variables
  IB/qib: Remove remaining code related to writing the EEPROM
  IB/qib: Suppress gcc 7 fall-through complaints
  IB/qib: Remove set-but-not-used variables
  RDMA/rdmavt: Suppress gcc 7 fall-through complaints
  RDMA/rxe: Suppress gcc 7 fall-through complaints
  RDMA/usnic: Make the compiler check declaration consistency during
    compilation
  RDMA/usnic: Remove a set-but-not-used variable
  RDMA/usnic: Instantiate data structures once

 drivers/infiniband/core/cm.c                  |  1 +
 drivers/infiniband/core/cma.c                 | 11 ++--
 drivers/infiniband/core/iwcm.c                |  3 --
 drivers/infiniband/hw/bnxt_re/ib_verbs.c      | 12 ++---
 drivers/infiniband/hw/bnxt_re/qplib_fp.c      |  7 +--
 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c    |  4 --
 drivers/infiniband/hw/bnxt_re/qplib_sp.c      |  5 +-
 drivers/infiniband/hw/cxgb3/iwch_cm.c         |  6 +--
 drivers/infiniband/hw/cxgb3/iwch_qp.c         |  3 ++
 drivers/infiniband/hw/cxgb4/cm.c              | 16 ++----
 drivers/infiniband/hw/cxgb4/device.c          |  4 +-
 drivers/infiniband/hw/hfi1/driver.c           |  6 +++
 drivers/infiniband/hw/hfi1/file_ops.c         |  4 +-
 drivers/infiniband/hw/hfi1/hfi.h              |  5 --
 drivers/infiniband/hw/hfi1/mad.c              |  3 +-
 drivers/infiniband/hw/hfi1/rc.c               |  2 +-
 drivers/infiniband/hw/hfi1/ruc.c              |  9 ----
 drivers/infiniband/hw/hfi1/sdma.c             |  5 +-
 drivers/infiniband/hw/hfi1/ud.c               |  2 -
 drivers/infiniband/hw/hfi1/verbs.c            | 10 ----
 drivers/infiniband/hw/hns/hns_roce_eq.c       |  6 +--
 drivers/infiniband/hw/hns/hns_roce_hw_v1.c    | 73 +++++++++++++++------------
 drivers/infiniband/hw/hns/hns_roce_hw_v2.c    |  3 +-
 drivers/infiniband/hw/i40iw/i40iw_cm.c        |  3 +-
 drivers/infiniband/hw/i40iw/i40iw_hw.c        |  1 +
 drivers/infiniband/hw/i40iw/i40iw_puda.c      |  1 +
 drivers/infiniband/hw/i40iw/i40iw_utils.c     | 13 +++--
 drivers/infiniband/hw/mlx4/cq.c               |  2 +
 drivers/infiniband/hw/mlx4/mcg.c              |  1 +
 drivers/infiniband/hw/mlx5/cq.c               |  2 +
 drivers/infiniband/hw/mlx5/qp.c               |  3 +-
 drivers/infiniband/hw/mthca/mthca_main.c      | 10 ++--
 drivers/infiniband/hw/nes/nes.c               | 33 +++++++-----
 drivers/infiniband/hw/nes/nes_cm.c            |  9 +---
 drivers/infiniband/hw/nes/nes_hw.c            |  7 +--
 drivers/infiniband/hw/nes/nes_nic.c           |  9 ++--
 drivers/infiniband/hw/nes/nes_utils.c         | 13 +++--
 drivers/infiniband/hw/nes/nes_verbs.c         | 12 ++---
 drivers/infiniband/hw/ocrdma/ocrdma_hw.c      |  6 +--
 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c   |  4 +-
 drivers/infiniband/hw/qedr/main.c             | 24 ++++-----
 drivers/infiniband/hw/qedr/qedr_iw_cm.c       | 14 ++---
 drivers/infiniband/hw/qedr/qedr_roce_cm.c     | 29 +++++------
 drivers/infiniband/hw/qedr/verbs.c            |  9 +---
 drivers/infiniband/hw/qib/qib.h               | 18 -------
 drivers/infiniband/hw/qib/qib_diag.c          |  6 ---
 drivers/infiniband/hw/qib/qib_file_ops.c      |  9 ----
 drivers/infiniband/hw/qib/qib_iba6120.c       | 27 ----------
 drivers/infiniband/hw/qib/qib_iba7220.c       | 23 ---------
 drivers/infiniband/hw/qib/qib_iba7322.c       | 21 ++------
 drivers/infiniband/hw/qib/qib_mad.c           |  4 +-
 drivers/infiniband/hw/qib/qib_pcie.c          |  3 +-
 drivers/infiniband/hw/qib/qib_rc.c            |  2 +-
 drivers/infiniband/hw/qib/qib_sd7220.c        |  2 -
 drivers/infiniband/hw/qib/qib_sdma.c          |  2 +-
 drivers/infiniband/hw/qib/qib_tx.c            |  4 --
 drivers/infiniband/hw/qib/qib_verbs.c         |  3 +-
 drivers/infiniband/hw/usnic/usnic_ib_qp_grp.c |  2 -
 drivers/infiniband/hw/usnic/usnic_ib_qp_grp.h | 25 +--------
 drivers/infiniband/hw/usnic/usnic_ib_sysfs.c  |  1 +
 drivers/infiniband/hw/usnic/usnic_ib_verbs.c  | 25 +++++++++
 drivers/infiniband/sw/rdmavt/qp.c             |  1 +
 drivers/infiniband/sw/rxe/rxe_comp.c          |  4 +-
 drivers/infiniband/sw/rxe/rxe_task.c          |  2 +-
 drivers/infiniband/sw/rxe/rxe_verbs.c         |  1 +
 drivers/infiniband/ulp/isert/ib_isert.c       | 14 ++---
 drivers/net/ethernet/chelsio/cxgb3/t3cdev.h   |  2 +-
 include/rdma/ib_addr.h                        |  4 +-
 68 files changed, 241 insertions(+), 369 deletions(-)

-- 
2.14.2

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

* [PATCH v2 01/45] IB/core: Fix endianness annotation in rdma_is_multicast_addr()
       [not found] ` <20171011174927.25113-1-bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
@ 2017-10-11 17:48   ` Bart Van Assche
  2017-10-11 17:48   ` [PATCH v2 02/45] IB/cm: Suppress gcc 7 fall-through complaints Bart Van Assche
                     ` (44 subsequent siblings)
  45 siblings, 0 replies; 55+ messages in thread
From: Bart Van Assche @ 2017-10-11 17:48 UTC (permalink / raw)
  To: Doug Ledford; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Bart Van Assche

Since ipv4_addr is a big endian 32-bit number, annotate it as such.

Fixes: commit be1d325a3358 ("IB/core: Set RoCEv2 MGID according to spec")
Signed-off-by: Bart Van Assche <bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
Reviewed-by: Leon Romanovsky <leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
---
 include/rdma/ib_addr.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/rdma/ib_addr.h b/include/rdma/ib_addr.h
index ec5008cf5d51..cfa82d16573d 100644
--- a/include/rdma/ib_addr.h
+++ b/include/rdma/ib_addr.h
@@ -305,12 +305,12 @@ static inline void rdma_get_ll_mac(struct in6_addr *addr, u8 *mac)
 
 static inline int rdma_is_multicast_addr(struct in6_addr *addr)
 {
-	u32 ipv4_addr;
+	__be32 ipv4_addr;
 
 	if (addr->s6_addr[0] == 0xff)
 		return 1;
 
-	memcpy(&ipv4_addr, addr->s6_addr + 12, 4);
+	ipv4_addr = addr->s6_addr32[3];
 	return (ipv6_addr_v4mapped(addr) && ipv4_is_multicast(ipv4_addr));
 }
 
-- 
2.14.2

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

* [PATCH v2 02/45] IB/cm: Suppress gcc 7 fall-through complaints
       [not found] ` <20171011174927.25113-1-bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
  2017-10-11 17:48   ` [PATCH v2 01/45] IB/core: Fix endianness annotation in rdma_is_multicast_addr() Bart Van Assche
@ 2017-10-11 17:48   ` Bart Van Assche
  2017-10-11 17:48   ` [PATCH v2 03/45] RDMA/cma: Avoid triggering undefined behavior Bart Van Assche
                     ` (43 subsequent siblings)
  45 siblings, 0 replies; 55+ messages in thread
From: Bart Van Assche @ 2017-10-11 17:48 UTC (permalink / raw)
  To: Doug Ledford; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Bart Van Assche

Avoid that gcc 7 reports the following warning when building with W=1:

warning: this statement may fall through [-Wimplicit-fallthrough=]

Signed-off-by: Bart Van Assche <bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
Acked-by: Sean Hefty <sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
---
 drivers/infiniband/core/cm.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/infiniband/core/cm.c b/drivers/infiniband/core/cm.c
index 4c4b46586af2..9b45484afd72 100644
--- a/drivers/infiniband/core/cm.c
+++ b/drivers/infiniband/core/cm.c
@@ -2810,6 +2810,7 @@ int ib_send_cm_mra(struct ib_cm_id *cm_id,
 			msg_response = CM_MSG_RESPONSE_OTHER;
 			break;
 		}
+		/* fall through */
 	default:
 		ret = -EINVAL;
 		goto error1;
-- 
2.14.2

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

* [PATCH v2 03/45] RDMA/cma: Avoid triggering undefined behavior
       [not found] ` <20171011174927.25113-1-bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
  2017-10-11 17:48   ` [PATCH v2 01/45] IB/core: Fix endianness annotation in rdma_is_multicast_addr() Bart Van Assche
  2017-10-11 17:48   ` [PATCH v2 02/45] IB/cm: Suppress gcc 7 fall-through complaints Bart Van Assche
@ 2017-10-11 17:48   ` Bart Van Assche
  2017-10-11 17:48   ` [PATCH v2 04/45] RDMA/iwcm: Remove a set-but-not-used variable Bart Van Assche
                     ` (42 subsequent siblings)
  45 siblings, 0 replies; 55+ messages in thread
From: Bart Van Assche @ 2017-10-11 17:48 UTC (permalink / raw)
  To: Doug Ledford; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Bart Van Assche

According to the C standard the behavior of computations with
integer operands is as follows:
* A computation involving unsigned operands can never overflow,
  because a result that cannot be represented by the resulting
  unsigned integer type is reduced modulo the number that is one
  greater than the largest value that can be represented by the
  resulting type.
* The behavior for signed integer underflow and overflow is
  undefined.

Hence only use unsigned integers when checking for integer
overflow.

This patch is what I came up with after having analyzed the
following smatch warnings:

drivers/infiniband/core/cma.c:3448: cma_resolve_ib_udp() warn: signed overflow undefined. 'offset + conn_param->private_data_len < conn_param->private_data_len'
drivers/infiniband/core/cma.c:3505: cma_connect_ib() warn: signed overflow undefined. 'offset + conn_param->private_data_len < conn_param->private_data_len'

Signed-off-by: Bart Van Assche <bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
Acked-by: Sean Hefty <sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
---
 drivers/infiniband/core/cma.c | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c
index 852c8fec8088..fa79c7076ccd 100644
--- a/drivers/infiniband/core/cma.c
+++ b/drivers/infiniband/core/cma.c
@@ -1540,7 +1540,7 @@ static struct rdma_id_private *cma_id_from_event(struct ib_cm_id *cm_id,
 	return id_priv;
 }
 
-static inline int cma_user_data_offset(struct rdma_id_private *id_priv)
+static inline u8 cma_user_data_offset(struct rdma_id_private *id_priv)
 {
 	return cma_family(id_priv) == AF_IB ? 0 : sizeof(struct cma_hdr);
 }
@@ -1942,7 +1942,8 @@ static int cma_req_handler(struct ib_cm_id *cm_id, struct ib_cm_event *ib_event)
 	struct rdma_id_private *listen_id, *conn_id = NULL;
 	struct rdma_cm_event event;
 	struct net_device *net_dev;
-	int offset, ret;
+	u8 offset;
+	int ret;
 
 	listen_id = cma_id_from_event(cm_id, ib_event, &net_dev);
 	if (IS_ERR(listen_id))
@@ -3440,7 +3441,8 @@ static int cma_resolve_ib_udp(struct rdma_id_private *id_priv,
 	struct ib_cm_sidr_req_param req;
 	struct ib_cm_id	*id;
 	void *private_data;
-	int offset, ret;
+	u8 offset;
+	int ret;
 
 	memset(&req, 0, sizeof req);
 	offset = cma_user_data_offset(id_priv);
@@ -3497,7 +3499,8 @@ static int cma_connect_ib(struct rdma_id_private *id_priv,
 	struct rdma_route *route;
 	void *private_data;
 	struct ib_cm_id	*id;
-	int offset, ret;
+	u8 offset;
+	int ret;
 
 	memset(&req, 0, sizeof req);
 	offset = cma_user_data_offset(id_priv);
-- 
2.14.2

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

* [PATCH v2 04/45] RDMA/iwcm: Remove a set-but-not-used variable
       [not found] ` <20171011174927.25113-1-bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
                     ` (2 preceding siblings ...)
  2017-10-11 17:48   ` [PATCH v2 03/45] RDMA/cma: Avoid triggering undefined behavior Bart Van Assche
@ 2017-10-11 17:48   ` Bart Van Assche
  2017-10-11 17:48   ` [PATCH v2 05/45] RDMA/isert: Suppress gcc 7 fall-through complaints Bart Van Assche
                     ` (41 subsequent siblings)
  45 siblings, 0 replies; 55+ messages in thread
From: Bart Van Assche @ 2017-10-11 17:48 UTC (permalink / raw)
  To: Doug Ledford; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Bart Van Assche

Signed-off-by: Bart Van Assche <bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
Reviewed-by: Steve Wise <swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>
---
 drivers/infiniband/core/iwcm.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/infiniband/core/iwcm.c b/drivers/infiniband/core/iwcm.c
index fcf42f6bb82a..e9e189ec7502 100644
--- a/drivers/infiniband/core/iwcm.c
+++ b/drivers/infiniband/core/iwcm.c
@@ -447,9 +447,6 @@ static void destroy_cm_id(struct iw_cm_id *cm_id)
  */
 void iw_destroy_cm_id(struct iw_cm_id *cm_id)
 {
-	struct iwcm_id_private *cm_id_priv;
-
-	cm_id_priv = container_of(cm_id, struct iwcm_id_private, id);
 	destroy_cm_id(cm_id);
 }
 EXPORT_SYMBOL(iw_destroy_cm_id);
-- 
2.14.2

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

* [PATCH v2 05/45] RDMA/isert: Suppress gcc 7 fall-through complaints
       [not found] ` <20171011174927.25113-1-bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
                     ` (3 preceding siblings ...)
  2017-10-11 17:48   ` [PATCH v2 04/45] RDMA/iwcm: Remove a set-but-not-used variable Bart Van Assche
@ 2017-10-11 17:48   ` Bart Van Assche
  2017-10-11 17:48   ` [PATCH v2 06/45] RDMA/bnxt_re: " Bart Van Assche
                     ` (40 subsequent siblings)
  45 siblings, 0 replies; 55+ messages in thread
From: Bart Van Assche @ 2017-10-11 17:48 UTC (permalink / raw)
  To: Doug Ledford; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Bart Van Assche

Avoid that gcc 7 reports the following warning when building with W=1:

warning: this statement may fall through [-Wimplicit-fallthrough=]

Signed-off-by: Bart Van Assche <bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
Acked-by: Sagi Grimberg <sagi-NQWnxTmZq1alnMjI0IkVqw@public.gmane.org>
---
 drivers/infiniband/ulp/isert/ib_isert.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/infiniband/ulp/isert/ib_isert.c b/drivers/infiniband/ulp/isert/ib_isert.c
index ceabdb85df8b..720dfb3a1ac2 100644
--- a/drivers/infiniband/ulp/isert/ib_isert.c
+++ b/drivers/infiniband/ulp/isert/ib_isert.c
@@ -788,10 +788,11 @@ isert_cma_handler(struct rdma_cm_id *cma_id, struct rdma_cm_event *event)
 		 * the rdma cm id
 		 */
 		return 1;
-	case RDMA_CM_EVENT_REJECTED:       /* FALLTHRU */
+	case RDMA_CM_EVENT_REJECTED:
 		isert_info("Connection rejected: %s\n",
 			   rdma_reject_msg(cma_id, event->status));
-	case RDMA_CM_EVENT_UNREACHABLE:    /* FALLTHRU */
+		/* fall through */
+	case RDMA_CM_EVENT_UNREACHABLE:
 	case RDMA_CM_EVENT_CONNECT_ERROR:
 		ret = isert_connect_error(cma_id);
 		break;
@@ -1569,9 +1570,7 @@ isert_put_cmd(struct isert_cmd *isert_cmd, bool comp_err)
 			transport_generic_free_cmd(&cmd->se_cmd, 0);
 			break;
 		}
-		/*
-		 * Fall-through
-		 */
+		/* fall through */
 	default:
 		iscsit_release_cmd(cmd);
 		break;
@@ -1749,8 +1748,9 @@ isert_do_control_comp(struct work_struct *work)
 	switch (cmd->i_state) {
 	case ISTATE_SEND_TASKMGTRSP:
 		iscsit_tmr_post_handler(cmd, cmd->conn);
-	case ISTATE_SEND_REJECT:   /* FALLTHRU */
-	case ISTATE_SEND_TEXTRSP:  /* FALLTHRU */
+		/* fall through */
+	case ISTATE_SEND_REJECT:
+	case ISTATE_SEND_TEXTRSP:
 		cmd->i_state = ISTATE_SENT_STATUS;
 		isert_completion_put(&isert_cmd->tx_desc, isert_cmd,
 				     ib_dev, false);
-- 
2.14.2

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

* [PATCH v2 06/45] RDMA/bnxt_re: Suppress gcc 7 fall-through complaints
       [not found] ` <20171011174927.25113-1-bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
                     ` (4 preceding siblings ...)
  2017-10-11 17:48   ` [PATCH v2 05/45] RDMA/isert: Suppress gcc 7 fall-through complaints Bart Van Assche
@ 2017-10-11 17:48   ` Bart Van Assche
  2017-10-11 17:48   ` [PATCH v2 07/45] RDMA/bnxt_re: Remove set-but-not-used variables Bart Van Assche
                     ` (39 subsequent siblings)
  45 siblings, 0 replies; 55+ messages in thread
From: Bart Van Assche @ 2017-10-11 17:48 UTC (permalink / raw)
  To: Doug Ledford
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Bart Van Assche, Somnath Kotur

Avoid that gcc 7 reports the following warning when building with W=1:

warning: this statement may fall through [-Wimplicit-fallthrough=]

Signed-off-by: Bart Van Assche <bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
Cc: Somnath Kotur <somnath.kotur-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
---
 drivers/infiniband/hw/bnxt_re/qplib_fp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/infiniband/hw/bnxt_re/qplib_fp.c b/drivers/infiniband/hw/bnxt_re/qplib_fp.c
index e8afc47f8949..e82644cf1aeb 100644
--- a/drivers/infiniband/hw/bnxt_re/qplib_fp.c
+++ b/drivers/infiniband/hw/bnxt_re/qplib_fp.c
@@ -1360,7 +1360,7 @@ int bnxt_qplib_post_send(struct bnxt_qplib_qp *qp,
 
 			break;
 		}
-		/* else, just fall thru */
+		/* fall thru */
 	case BNXT_QPLIB_SWQE_TYPE_SEND_WITH_IMM:
 	case BNXT_QPLIB_SWQE_TYPE_SEND_WITH_INV:
 	{
-- 
2.14.2

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

* [PATCH v2 07/45] RDMA/bnxt_re: Remove set-but-not-used variables
       [not found] ` <20171011174927.25113-1-bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
                     ` (5 preceding siblings ...)
  2017-10-11 17:48   ` [PATCH v2 06/45] RDMA/bnxt_re: " Bart Van Assche
@ 2017-10-11 17:48   ` Bart Van Assche
  2017-10-11 17:48   ` [PATCH v2 08/45] RDMA/cxgb3: Annotate locking assumptions Bart Van Assche
                     ` (38 subsequent siblings)
  45 siblings, 0 replies; 55+ messages in thread
From: Bart Van Assche @ 2017-10-11 17:48 UTC (permalink / raw)
  To: Doug Ledford
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Bart Van Assche, Somnath Kotur

Signed-off-by: Bart Van Assche <bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
Cc: Somnath Kotur <somnath.kotur-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
---
 drivers/infiniband/hw/bnxt_re/ib_verbs.c   | 12 +++++-------
 drivers/infiniband/hw/bnxt_re/qplib_fp.c   |  5 -----
 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c |  4 ----
 drivers/infiniband/hw/bnxt_re/qplib_sp.c   |  5 ++---
 4 files changed, 7 insertions(+), 19 deletions(-)

diff --git a/drivers/infiniband/hw/bnxt_re/ib_verbs.c b/drivers/infiniband/hw/bnxt_re/ib_verbs.c
index 0d89621d9fe8..af65f8114379 100644
--- a/drivers/infiniband/hw/bnxt_re/ib_verbs.c
+++ b/drivers/infiniband/hw/bnxt_re/ib_verbs.c
@@ -1643,7 +1643,7 @@ static int bnxt_re_build_qp1_send_v2(struct bnxt_re_qp *qp,
 	u8 ip_version = 0;
 	u16 vlan_id = 0xFFFF;
 	void *buf;
-	int i, rc = 0, size;
+	int i, rc = 0;
 
 	memset(&qp->qp1_hdr, 0, sizeof(qp->qp1_hdr));
 
@@ -1760,7 +1760,7 @@ static int bnxt_re_build_qp1_send_v2(struct bnxt_re_qp *qp,
 	/* Pack the QP1 to the transmit buffer */
 	buf = bnxt_qplib_get_qp1_sq_buf(&qp->qplib_qp, &sge);
 	if (buf) {
-		size = ib_ud_header_pack(&qp->qp1_hdr, buf);
+		ib_ud_header_pack(&qp->qp1_hdr, buf);
 		for (i = wqe->num_sge; i; i--) {
 			wqe->sg_list[i].addr = wqe->sg_list[i - 1].addr;
 			wqe->sg_list[i].lkey = wqe->sg_list[i - 1].lkey;
@@ -2216,7 +2216,7 @@ static int bnxt_re_post_recv_shadow_qp(struct bnxt_re_dev *rdev,
 				       struct ib_recv_wr *wr)
 {
 	struct bnxt_qplib_swqe wqe;
-	int rc = 0, payload_sz = 0;
+	int rc = 0;
 
 	memset(&wqe, 0, sizeof(wqe));
 	while (wr) {
@@ -2231,8 +2231,7 @@ static int bnxt_re_post_recv_shadow_qp(struct bnxt_re_dev *rdev,
 			rc = -EINVAL;
 			break;
 		}
-		payload_sz = bnxt_re_build_sgl(wr->sg_list, wqe.sg_list,
-					       wr->num_sge);
+		bnxt_re_build_sgl(wr->sg_list, wqe.sg_list, wr->num_sge);
 		wqe.wr_id = wr->wr_id;
 		wqe.type = BNXT_QPLIB_SWQE_TYPE_RECV;
 
@@ -2569,7 +2568,7 @@ static void bnxt_re_process_req_wc(struct ib_wc *wc, struct bnxt_qplib_cqe *cqe)
 static int bnxt_re_check_packet_type(u16 raweth_qp1_flags,
 				     u16 raweth_qp1_flags2)
 {
-	bool is_udp = false, is_ipv6 = false, is_ipv4 = false;
+	bool is_ipv6 = false, is_ipv4 = false;
 
 	/* raweth_qp1_flags Bit 9-6 indicates itype */
 	if ((raweth_qp1_flags & CQ_RES_RAWETH_QP1_RAWETH_QP1_FLAGS_ITYPE_ROCE)
@@ -2580,7 +2579,6 @@ static int bnxt_re_check_packet_type(u16 raweth_qp1_flags,
 	    CQ_RES_RAWETH_QP1_RAWETH_QP1_FLAGS2_IP_CS_CALC &&
 	    raweth_qp1_flags2 &
 	    CQ_RES_RAWETH_QP1_RAWETH_QP1_FLAGS2_L4_CS_CALC) {
-		is_udp = true;
 		/* raweth_qp1_flags2 Bit 8 indicates ip_type. 0-v4 1 - v6 */
 		(raweth_qp1_flags2 &
 		 CQ_RES_RAWETH_QP1_RAWETH_QP1_FLAGS2_IP_TYPE) ?
diff --git a/drivers/infiniband/hw/bnxt_re/qplib_fp.c b/drivers/infiniband/hw/bnxt_re/qplib_fp.c
index e82644cf1aeb..a82044dacce0 100644
--- a/drivers/infiniband/hw/bnxt_re/qplib_fp.c
+++ b/drivers/infiniband/hw/bnxt_re/qplib_fp.c
@@ -160,11 +160,6 @@ void bnxt_qplib_add_flush_qp(struct bnxt_qplib_qp *qp)
 
 static void __bnxt_qplib_del_flush_qp(struct bnxt_qplib_qp *qp)
 {
-	struct bnxt_qplib_cq *scq, *rcq;
-
-	scq = qp->scq;
-	rcq = qp->rcq;
-
 	if (qp->sq.flushed) {
 		qp->sq.flushed = false;
 		list_del(&qp->sq_flush);
diff --git a/drivers/infiniband/hw/bnxt_re/qplib_rcfw.c b/drivers/infiniband/hw/bnxt_re/qplib_rcfw.c
index 2bdb1562bd21..000e6a1940b9 100644
--- a/drivers/infiniband/hw/bnxt_re/qplib_rcfw.c
+++ b/drivers/infiniband/hw/bnxt_re/qplib_rcfw.c
@@ -88,7 +88,6 @@ static int __send_message(struct bnxt_qplib_rcfw *rcfw, struct cmdq_base *req,
 	unsigned long flags;
 	u32 size, opcode;
 	u16 cookie, cbit;
-	int pg, idx;
 	u8 *preq;
 
 	opcode = req->opcode;
@@ -149,9 +148,6 @@ static int __send_message(struct bnxt_qplib_rcfw *rcfw, struct cmdq_base *req,
 	preq = (u8 *)req;
 	size = req->cmd_size * BNXT_QPLIB_CMDQE_UNITS;
 	do {
-		pg = 0;
-		idx = 0;
-
 		/* Locate the next cmdq slot */
 		sw_prod = HWQ_CMP(cmdq->prod, cmdq);
 		cmdqe = &cmdq_ptr[get_cmdq_pg(sw_prod)][get_cmdq_idx(sw_prod)];
diff --git a/drivers/infiniband/hw/bnxt_re/qplib_sp.c b/drivers/infiniband/hw/bnxt_re/qplib_sp.c
index e277e54a05eb..9543ce51a28a 100644
--- a/drivers/infiniband/hw/bnxt_re/qplib_sp.c
+++ b/drivers/infiniband/hw/bnxt_re/qplib_sp.c
@@ -720,13 +720,12 @@ int bnxt_qplib_map_tc2cos(struct bnxt_qplib_res *res, u16 *cids)
 	struct cmdq_map_tc_to_cos req;
 	struct creq_map_tc_to_cos_resp resp;
 	u16 cmd_flags = 0;
-	int rc = 0;
 
 	RCFW_CMD_PREP(req, MAP_TC_TO_COS, cmd_flags);
 	req.cos0 = cpu_to_le16(cids[0]);
 	req.cos1 = cpu_to_le16(cids[1]);
 
-	rc = bnxt_qplib_rcfw_send_message(rcfw, (void *)&req,
-					  (void *)&resp, NULL, 0);
+	bnxt_qplib_rcfw_send_message(rcfw, (void *)&req, (void *)&resp, NULL,
+				     0);
 	return 0;
 }
-- 
2.14.2

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

* [PATCH v2 08/45] RDMA/cxgb3: Annotate locking assumptions
       [not found] ` <20171011174927.25113-1-bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
                     ` (6 preceding siblings ...)
  2017-10-11 17:48   ` [PATCH v2 07/45] RDMA/bnxt_re: Remove set-but-not-used variables Bart Van Assche
@ 2017-10-11 17:48   ` Bart Van Assche
  2017-10-11 17:48   ` [PATCH v2 09/45] RDMA/cxgb3: Annotate an RCU pointer Bart Van Assche
                     ` (37 subsequent siblings)
  45 siblings, 0 replies; 55+ messages in thread
From: Bart Van Assche @ 2017-10-11 17:48 UTC (permalink / raw)
  To: Doug Ledford; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Bart Van Assche

Tell sparse what the locking assumptions are for __flush_qp() such
that it does not complain about the locking operations inside that
function.

Signed-off-by: Bart Van Assche <bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
Reviewed-by: Steve Wise <swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>
---
 drivers/infiniband/hw/cxgb3/iwch_qp.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/infiniband/hw/cxgb3/iwch_qp.c b/drivers/infiniband/hw/cxgb3/iwch_qp.c
index 7f633da0185d..3871e1fd8395 100644
--- a/drivers/infiniband/hw/cxgb3/iwch_qp.c
+++ b/drivers/infiniband/hw/cxgb3/iwch_qp.c
@@ -722,10 +722,13 @@ int iwch_post_terminate(struct iwch_qp *qhp, struct respQ_msg_t *rsp_msg)
  */
 static void __flush_qp(struct iwch_qp *qhp, struct iwch_cq *rchp,
 				struct iwch_cq *schp)
+	__releases(&qhp->lock)
+	__acquires(&qhp->lock)
 {
 	int count;
 	int flushed;
 
+	lockdep_assert_held(&qhp->lock);
 
 	pr_debug("%s qhp %p rchp %p schp %p\n", __func__, qhp, rchp, schp);
 	/* take a ref on the qhp since we must release the lock */
-- 
2.14.2

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

* [PATCH v2 09/45] RDMA/cxgb3: Annotate an RCU pointer
       [not found] ` <20171011174927.25113-1-bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
                     ` (7 preceding siblings ...)
  2017-10-11 17:48   ` [PATCH v2 08/45] RDMA/cxgb3: Annotate locking assumptions Bart Van Assche
@ 2017-10-11 17:48   ` Bart Van Assche
  2017-10-11 17:48   ` [PATCH v2 10/45] RDMA/cxgb3: Remove a set-but-not-used variable Bart Van Assche
                     ` (36 subsequent siblings)
  45 siblings, 0 replies; 55+ messages in thread
From: Bart Van Assche @ 2017-10-11 17:48 UTC (permalink / raw)
  To: Doug Ledford; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Bart Van Assche

Annotate t3cdev.l2opt with __rcu since it is used as an RCU pointer.

Signed-off-by: Bart Van Assche <bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
Reviewed-by: Steve Wise <swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>
---
 drivers/net/ethernet/chelsio/cxgb3/t3cdev.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/chelsio/cxgb3/t3cdev.h b/drivers/net/ethernet/chelsio/cxgb3/t3cdev.h
index 705713b56636..3c3e6cf6aca6 100644
--- a/drivers/net/ethernet/chelsio/cxgb3/t3cdev.h
+++ b/drivers/net/ethernet/chelsio/cxgb3/t3cdev.h
@@ -60,7 +60,7 @@ struct t3cdev {
 	int (*ctl)(struct t3cdev *dev, unsigned int req, void *data);
 	void (*neigh_update)(struct t3cdev *dev, struct neighbour *neigh);
 	void *priv;		/* driver private data */
-	void *l2opt;		/* optional layer 2 data */
+	void __rcu *l2opt;	/* optional layer 2 data */
 	void *l3opt;		/* optional layer 3 data */
 	void *l4opt;		/* optional layer 4 data */
 	void *ulp;		/* ulp stuff */
-- 
2.14.2

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

* [PATCH v2 10/45] RDMA/cxgb3: Remove a set-but-not-used variable
       [not found] ` <20171011174927.25113-1-bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
                     ` (8 preceding siblings ...)
  2017-10-11 17:48   ` [PATCH v2 09/45] RDMA/cxgb3: Annotate an RCU pointer Bart Van Assche
@ 2017-10-11 17:48   ` Bart Van Assche
  2017-10-11 17:48   ` [PATCH v2 11/45] RDMA/cxgb4: Fix indentation Bart Van Assche
                     ` (35 subsequent siblings)
  45 siblings, 0 replies; 55+ messages in thread
From: Bart Van Assche @ 2017-10-11 17:48 UTC (permalink / raw)
  To: Doug Ledford; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Bart Van Assche

Signed-off-by: Bart Van Assche <bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
Reviewed-by: Steve Wise <swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>
---
 drivers/infiniband/hw/cxgb3/iwch_cm.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/infiniband/hw/cxgb3/iwch_cm.c b/drivers/infiniband/hw/cxgb3/iwch_cm.c
index 86975370a4c0..edc1c549289e 100644
--- a/drivers/infiniband/hw/cxgb3/iwch_cm.c
+++ b/drivers/infiniband/hw/cxgb3/iwch_cm.c
@@ -1760,8 +1760,8 @@ static void ep_timeout(unsigned long arg)
 
 int iwch_reject_cr(struct iw_cm_id *cm_id, const void *pdata, u8 pdata_len)
 {
-	int err;
 	struct iwch_ep *ep = to_ep(cm_id);
+
 	pr_debug("%s ep %p tid %u\n", __func__, ep, ep->hwtid);
 
 	if (state_read(&ep->com) == DEAD) {
@@ -1772,8 +1772,8 @@ int iwch_reject_cr(struct iw_cm_id *cm_id, const void *pdata, u8 pdata_len)
 	if (mpa_rev == 0)
 		abort_connection(ep, NULL, GFP_KERNEL);
 	else {
-		err = send_mpa_reject(ep, pdata, pdata_len);
-		err = iwch_ep_disconnect(ep, 0, GFP_KERNEL);
+		send_mpa_reject(ep, pdata, pdata_len);
+		iwch_ep_disconnect(ep, 0, GFP_KERNEL);
 	}
 	put_ep(&ep->com);
 	return 0;
-- 
2.14.2

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

* [PATCH v2 11/45] RDMA/cxgb4: Fix indentation
       [not found] ` <20171011174927.25113-1-bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
                     ` (9 preceding siblings ...)
  2017-10-11 17:48   ` [PATCH v2 10/45] RDMA/cxgb3: Remove a set-but-not-used variable Bart Van Assche
@ 2017-10-11 17:48   ` Bart Van Assche
  2017-10-11 17:48   ` [PATCH v2 12/45] RDMA/cxgb4: Remove the obsolete kernel module option 'c4iw_debug' Bart Van Assche
                     ` (34 subsequent siblings)
  45 siblings, 0 replies; 55+ messages in thread
From: Bart Van Assche @ 2017-10-11 17:48 UTC (permalink / raw)
  To: Doug Ledford; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Bart Van Assche

This patch avoids that smatch reports the following:

drivers/infiniband/hw/cxgb4/device.c:1105: copy_gl_to_skb_pkt() warn: inconsistent indenting
drivers/infiniband/hw/cxgb4/cm.c:835: send_connect() warn: inconsistent indenting
drivers/infiniband/hw/cxgb4/cm.c:841: send_connect() warn: inconsistent indenting
drivers/infiniband/hw/cxgb4/cm.c:888: send_connect() warn: inconsistent indenting
drivers/infiniband/hw/cxgb4/cm.c:894: send_connect() warn: inconsistent indenting

Signed-off-by: Bart Van Assche <bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
Reviewed-by: Steve Wise <swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>
---
 drivers/infiniband/hw/cxgb4/cm.c     | 8 ++++----
 drivers/infiniband/hw/cxgb4/device.c | 4 ++--
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/infiniband/hw/cxgb4/cm.c b/drivers/infiniband/hw/cxgb4/cm.c
index e395afcd7d33..2331e7d57704 100644
--- a/drivers/infiniband/hw/cxgb4/cm.c
+++ b/drivers/infiniband/hw/cxgb4/cm.c
@@ -832,13 +832,13 @@ static int send_connect(struct c4iw_ep *ep)
 				t5req->params =
 					  cpu_to_be64(FILTER_TUPLE_V(params));
 				t5req->rsvd = cpu_to_be32(isn);
-			pr_debug("snd_isn %u\n", t5req->rsvd);
+				pr_debug("snd_isn %u\n", t5req->rsvd);
 				t5req->opt2 = cpu_to_be32(opt2);
 			} else {
 				t6req->params =
 					  cpu_to_be64(FILTER_TUPLE_V(params));
 				t6req->rsvd = cpu_to_be32(isn);
-			pr_debug("snd_isn %u\n", t6req->rsvd);
+				pr_debug("snd_isn %u\n", t6req->rsvd);
 				t6req->opt2 = cpu_to_be32(opt2);
 			}
 		}
@@ -885,13 +885,13 @@ static int send_connect(struct c4iw_ep *ep)
 				t5req6->params =
 					    cpu_to_be64(FILTER_TUPLE_V(params));
 				t5req6->rsvd = cpu_to_be32(isn);
-			pr_debug("snd_isn %u\n", t5req6->rsvd);
+				pr_debug("snd_isn %u\n", t5req6->rsvd);
 				t5req6->opt2 = cpu_to_be32(opt2);
 			} else {
 				t6req6->params =
 					    cpu_to_be64(FILTER_TUPLE_V(params));
 				t6req6->rsvd = cpu_to_be32(isn);
-			pr_debug("snd_isn %u\n", t6req6->rsvd);
+				pr_debug("snd_isn %u\n", t6req6->rsvd);
 				t6req6->opt2 = cpu_to_be32(opt2);
 			}
 
diff --git a/drivers/infiniband/hw/cxgb4/device.c b/drivers/infiniband/hw/cxgb4/device.c
index fa16a4a8c9a4..33bfddf3b064 100644
--- a/drivers/infiniband/hw/cxgb4/device.c
+++ b/drivers/infiniband/hw/cxgb4/device.c
@@ -1102,8 +1102,8 @@ static inline struct sk_buff *copy_gl_to_skb_pkt(const struct pkt_gl *gl,
 	if (unlikely(!skb))
 		return NULL;
 
-	 __skb_put(skb, gl->tot_len + sizeof(struct cpl_pass_accept_req) +
-		   sizeof(struct rss_header) - pktshift);
+	__skb_put(skb, gl->tot_len + sizeof(struct cpl_pass_accept_req) +
+		  sizeof(struct rss_header) - pktshift);
 
 	/*
 	 * This skb will contain:
-- 
2.14.2

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

* [PATCH v2 12/45] RDMA/cxgb4: Remove the obsolete kernel module option 'c4iw_debug'
       [not found] ` <20171011174927.25113-1-bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
                     ` (10 preceding siblings ...)
  2017-10-11 17:48   ` [PATCH v2 11/45] RDMA/cxgb4: Fix indentation Bart Van Assche
@ 2017-10-11 17:48   ` Bart Van Assche
       [not found]     ` <20171011174927.25113-13-bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
  2017-10-11 17:48   ` [PATCH v2 13/45] RDMA/cxgb4: Suppress gcc 7 fall-through complaints Bart Van Assche
                     ` (33 subsequent siblings)
  45 siblings, 1 reply; 55+ messages in thread
From: Bart Van Assche @ 2017-10-11 17:48 UTC (permalink / raw)
  To: Doug Ledford
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Bart Van Assche, Steve Wise

This patch avoids that building the cxgb4 module with W=1 triggers
a complaint about a local variable that has not been declared static.

Signed-off-by: Bart Van Assche <bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
Cc: Steve Wise <swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>
---
 drivers/infiniband/hw/cxgb4/cm.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/infiniband/hw/cxgb4/cm.c b/drivers/infiniband/hw/cxgb4/cm.c
index 2331e7d57704..f3235c6169d4 100644
--- a/drivers/infiniband/hw/cxgb4/cm.c
+++ b/drivers/infiniband/hw/cxgb4/cm.c
@@ -99,10 +99,6 @@ module_param(enable_tcp_window_scaling, int, 0644);
 MODULE_PARM_DESC(enable_tcp_window_scaling,
 		 "Enable tcp window scaling (default=1)");
 
-int c4iw_debug;
-module_param(c4iw_debug, int, 0644);
-MODULE_PARM_DESC(c4iw_debug, "obsolete");
-
 static int peer2peer = 1;
 module_param(peer2peer, int, 0644);
 MODULE_PARM_DESC(peer2peer, "Support peer2peer ULPs (default=1)");
-- 
2.14.2

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

* [PATCH v2 13/45] RDMA/cxgb4: Suppress gcc 7 fall-through complaints
       [not found] ` <20171011174927.25113-1-bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
                     ` (11 preceding siblings ...)
  2017-10-11 17:48   ` [PATCH v2 12/45] RDMA/cxgb4: Remove the obsolete kernel module option 'c4iw_debug' Bart Van Assche
@ 2017-10-11 17:48   ` Bart Van Assche
  2017-10-11 17:48   ` [PATCH v2 14/45] RDMA/cxgb4: Remove a set-but-not-used variable Bart Van Assche
                     ` (32 subsequent siblings)
  45 siblings, 0 replies; 55+ messages in thread
From: Bart Van Assche @ 2017-10-11 17:48 UTC (permalink / raw)
  To: Doug Ledford; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Bart Van Assche

Avoid that gcc 7 reports the following warning when building with W=1:

warning: this statement may fall through [-Wimplicit-fallthrough=]

Signed-off-by: Bart Van Assche <bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
Reviewed-by: Steve Wise <swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>
---
 drivers/infiniband/hw/cxgb4/cm.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/infiniband/hw/cxgb4/cm.c b/drivers/infiniband/hw/cxgb4/cm.c
index f3235c6169d4..6e84179b4f9a 100644
--- a/drivers/infiniband/hw/cxgb4/cm.c
+++ b/drivers/infiniband/hw/cxgb4/cm.c
@@ -3638,6 +3638,7 @@ static void active_ofld_conn_reply(struct c4iw_dev *dev, struct sk_buff *skb,
 			send_fw_act_open_req(ep, atid);
 			return;
 		}
+		/* fall through */
 	case FW_EADDRINUSE:
 		set_bit(ACT_RETRY_INUSE, &ep->com.history);
 		if (ep->retry_count++ < ACT_OPEN_RETRY_COUNT) {
-- 
2.14.2

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

* [PATCH v2 14/45] RDMA/cxgb4: Remove a set-but-not-used variable
       [not found] ` <20171011174927.25113-1-bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
                     ` (12 preceding siblings ...)
  2017-10-11 17:48   ` [PATCH v2 13/45] RDMA/cxgb4: Suppress gcc 7 fall-through complaints Bart Van Assche
@ 2017-10-11 17:48   ` Bart Van Assche
  2017-10-11 17:48   ` [PATCH v2 15/45] IB/hfi1: Suppress gcc 7 fall-through complaints Bart Van Assche
                     ` (31 subsequent siblings)
  45 siblings, 0 replies; 55+ messages in thread
From: Bart Van Assche @ 2017-10-11 17:48 UTC (permalink / raw)
  To: Doug Ledford; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Bart Van Assche

Signed-off-by: Bart Van Assche <bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
Reviewed-by: Steve Wise <swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>
---
 drivers/infiniband/hw/cxgb4/cm.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/infiniband/hw/cxgb4/cm.c b/drivers/infiniband/hw/cxgb4/cm.c
index 6e84179b4f9a..78e2916f9c78 100644
--- a/drivers/infiniband/hw/cxgb4/cm.c
+++ b/drivers/infiniband/hw/cxgb4/cm.c
@@ -3877,7 +3877,6 @@ static int rx_pkt(struct c4iw_dev *dev, struct sk_buff *skb)
 	struct net_device *pdev;
 	u16 rss_qid, eth_hdr_len;
 	int step;
-	u32 tx_chan;
 	struct neighbour *neigh;
 
 	/* Drop all non-SYN packets */
@@ -3959,14 +3958,12 @@ static int rx_pkt(struct c4iw_dev *dev, struct sk_buff *skb)
 		e = cxgb4_l2t_get(dev->rdev.lldi.l2t, neigh,
 				    pdev, 0);
 		pi = (struct port_info *)netdev_priv(pdev);
-		tx_chan = cxgb4_port_chan(pdev);
 		dev_put(pdev);
 	} else {
 		pdev = get_real_dev(neigh->dev);
 		e = cxgb4_l2t_get(dev->rdev.lldi.l2t, neigh,
 					pdev, 0);
 		pi = (struct port_info *)netdev_priv(pdev);
-		tx_chan = cxgb4_port_chan(pdev);
 	}
 	neigh_release(neigh);
 	if (!e) {
-- 
2.14.2

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

* [PATCH v2 15/45] IB/hfi1: Suppress gcc 7 fall-through complaints
       [not found] ` <20171011174927.25113-1-bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
                     ` (13 preceding siblings ...)
  2017-10-11 17:48   ` [PATCH v2 14/45] RDMA/cxgb4: Remove a set-but-not-used variable Bart Van Assche
@ 2017-10-11 17:48   ` Bart Van Assche
  2017-10-11 17:48   ` [PATCH v2 16/45] IB/hfi1: Remove set-but-not-used variables Bart Van Assche
                     ` (30 subsequent siblings)
  45 siblings, 0 replies; 55+ messages in thread
From: Bart Van Assche @ 2017-10-11 17:48 UTC (permalink / raw)
  To: Doug Ledford
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Bart Van Assche, Ira Weiny

Avoid that gcc 7 reports the following warning when building with W=1:

warning: this statement may fall through [-Wimplicit-fallthrough=]

Signed-off-by: Bart Van Assche <bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
Reviewed-by: Dennis Dalessandro <dennis.dalessandro-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Cc: Ira Weiny <ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
---
 drivers/infiniband/hw/hfi1/mad.c  | 1 +
 drivers/infiniband/hw/hfi1/rc.c   | 2 +-
 drivers/infiniband/hw/hfi1/sdma.c | 3 ++-
 3 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/infiniband/hw/hfi1/mad.c b/drivers/infiniband/hw/hfi1/mad.c
index 07b80faf1675..c01335edeabd 100644
--- a/drivers/infiniband/hw/hfi1/mad.c
+++ b/drivers/infiniband/hw/hfi1/mad.c
@@ -711,6 +711,7 @@ static int check_mkey(struct hfi1_ibport *ibp, struct ib_mad_hdr *mad,
 			/* Bad mkey not a violation below level 2 */
 			if (ibp->rvp.mkeyprot < 2)
 				break;
+			/* fall through */
 		case IB_MGMT_METHOD_SET:
 		case IB_MGMT_METHOD_TRAP_REPRESS:
 			if (ibp->rvp.mkey_violations != 0xFFFF)
diff --git a/drivers/infiniband/hw/hfi1/rc.c b/drivers/infiniband/hw/hfi1/rc.c
index e1cf0c08ca6f..8ca26e67a096 100644
--- a/drivers/infiniband/hw/hfi1/rc.c
+++ b/drivers/infiniband/hw/hfi1/rc.c
@@ -2175,7 +2175,7 @@ void hfi1_rc_rcv(struct hfi1_packet *packet)
 			goto no_immediate_data;
 		if (opcode == OP(SEND_ONLY_WITH_INVALIDATE))
 			goto send_last_inv;
-		/* FALLTHROUGH for SEND_ONLY_WITH_IMMEDIATE */
+		/* FALLTHROUGH -- for SEND_ONLY_WITH_IMMEDIATE */
 	case OP(SEND_LAST_WITH_IMMEDIATE):
 send_last_imm:
 		wc.ex.imm_data = ohdr->u.imm_data;
diff --git a/drivers/infiniband/hw/hfi1/sdma.c b/drivers/infiniband/hw/hfi1/sdma.c
index e7df7794c97e..961507bb0391 100644
--- a/drivers/infiniband/hw/hfi1/sdma.c
+++ b/drivers/infiniband/hw/hfi1/sdma.c
@@ -2593,7 +2593,7 @@ static void __sdma_process_event(struct sdma_engine *sde,
 			 * 7220, e.g.
 			 */
 			ss->go_s99_running = 1;
-			/* fall through and start dma engine */
+			/* fall through -- and start dma engine */
 		case sdma_event_e10_go_hw_start:
 			/* This reference means the state machine is started */
 			sdma_get(&sde->state);
@@ -3016,6 +3016,7 @@ static void __sdma_process_event(struct sdma_engine *sde,
 		case sdma_event_e60_hw_halted:
 			need_progress = 1;
 			sdma_err_progress_check_schedule(sde);
+			/* fall through */
 		case sdma_event_e90_sw_halted:
 			/*
 			* SW initiated halt does not perform engines
-- 
2.14.2

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

* [PATCH v2 16/45] IB/hfi1: Remove set-but-not-used variables
       [not found] ` <20171011174927.25113-1-bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
                     ` (14 preceding siblings ...)
  2017-10-11 17:48   ` [PATCH v2 15/45] IB/hfi1: Suppress gcc 7 fall-through complaints Bart Van Assche
@ 2017-10-11 17:48   ` Bart Van Assche
  2017-10-11 17:48   ` [PATCH v2 17/45] IB/hfi1: Define hfi1_handle_cnp_tbl[] once Bart Van Assche
                     ` (29 subsequent siblings)
  45 siblings, 0 replies; 55+ messages in thread
From: Bart Van Assche @ 2017-10-11 17:48 UTC (permalink / raw)
  To: Doug Ledford
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Bart Van Assche, Ira Weiny

Signed-off-by: Bart Van Assche <bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
Reviewed-by: Dennis Dalessandro <dennis.dalessandro-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Cc: Ira Weiny <ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
---
 drivers/infiniband/hw/hfi1/file_ops.c |  4 +---
 drivers/infiniband/hw/hfi1/mad.c      |  2 --
 drivers/infiniband/hw/hfi1/ruc.c      |  9 ---------
 drivers/infiniband/hw/hfi1/sdma.c     |  2 --
 drivers/infiniband/hw/hfi1/ud.c       |  2 --
 drivers/infiniband/hw/hfi1/verbs.c    | 10 ----------
 6 files changed, 1 insertion(+), 28 deletions(-)

diff --git a/drivers/infiniband/hw/hfi1/file_ops.c b/drivers/infiniband/hw/hfi1/file_ops.c
index 2b7144e0405e..9a829ae95bc2 100644
--- a/drivers/infiniband/hw/hfi1/file_ops.c
+++ b/drivers/infiniband/hw/hfi1/file_ops.c
@@ -776,7 +776,7 @@ static int complete_subctxt(struct hfi1_filedata *fd)
 static int assign_ctxt(struct hfi1_filedata *fd, unsigned long arg, u32 len)
 {
 	int ret;
-	unsigned int swmajor, swminor;
+	unsigned int swmajor;
 	struct hfi1_ctxtdata *uctxt = NULL;
 	struct hfi1_user_info uinfo;
 
@@ -796,8 +796,6 @@ static int assign_ctxt(struct hfi1_filedata *fd, unsigned long arg, u32 len)
 	if (uinfo.subctxt_cnt > HFI1_MAX_SHARED_CTXTS)
 		return -EINVAL;
 
-	swminor = uinfo.userversion & 0xffff;
-
 	/*
 	 * Acquire the mutex to protect against multiple creations of what
 	 * could be a shared base context.
diff --git a/drivers/infiniband/hw/hfi1/mad.c b/drivers/infiniband/hw/hfi1/mad.c
index c01335edeabd..bf699d23b5c5 100644
--- a/drivers/infiniband/hw/hfi1/mad.c
+++ b/drivers/infiniband/hw/hfi1/mad.c
@@ -2889,7 +2889,6 @@ static int pma_get_opa_datacounters(struct opa_pma_mad *pmp,
 	struct _vls_dctrs *vlinfo;
 	size_t response_data_size;
 	u32 num_ports;
-	u8 num_pslm;
 	u8 lq, num_vls;
 	u8 res_lli, res_ler;
 	u64 port_mask;
@@ -2899,7 +2898,6 @@ static int pma_get_opa_datacounters(struct opa_pma_mad *pmp,
 	int vfi;
 
 	num_ports = be32_to_cpu(pmp->mad_hdr.attr_mod) >> 24;
-	num_pslm = hweight64(be64_to_cpu(req->port_select_mask[3]));
 	num_vls = hweight32(be32_to_cpu(req->vl_select_mask));
 	vl_select_mask = be32_to_cpu(req->vl_select_mask);
 	res_lli = (u8)(be32_to_cpu(req->resolution) & MSK_LLI) >> MSK_LLI_SFT;
diff --git a/drivers/infiniband/hw/hfi1/ruc.c b/drivers/infiniband/hw/hfi1/ruc.c
index b3291f0fde9a..d450d4d4bda3 100644
--- a/drivers/infiniband/hw/hfi1/ruc.c
+++ b/drivers/infiniband/hw/hfi1/ruc.c
@@ -825,11 +825,9 @@ static inline void hfi1_make_ruc_header_9B(struct rvt_qp *qp,
 {
 	struct hfi1_qp_priv *priv = qp->priv;
 	struct hfi1_ibport *ibp = ps->ibp;
-	struct hfi1_pportdata *ppd = ppd_from_ibp(ibp);
 	u32 bth1 = 0;
 	u16 pkey = hfi1_get_pkey(ibp, qp->s_pkey_index);
 	u16 lrh0 = HFI1_LRH_BTH;
-	u16 slid;
 	u8 extra_bytes = -ps->s_txreq->s_cur_size & 3;
 	u32 nwords = SIZE_OF_CRC + ((ps->s_txreq->s_cur_size +
 					 extra_bytes) >> 2);
@@ -866,13 +864,6 @@ static inline void hfi1_make_ruc_header_9B(struct rvt_qp *qp,
 		bth1 |= (IB_BECN_MASK << IB_BECN_SHIFT);
 	}
 	hfi1_make_ruc_bth(qp, ohdr, bth0, bth1, bth2);
-
-	if (!ppd->lid)
-		slid = be16_to_cpu(IB_LID_PERMISSIVE);
-	else
-		slid = ppd->lid |
-			(rdma_ah_get_path_bits(&qp->remote_ah_attr) &
-			((1 << ppd->lmc) - 1));
 	hfi1_make_ib_hdr(&ps->s_txreq->phdr.hdr.ibh,
 			 lrh0,
 			 qp->s_hdrwords + nwords,
diff --git a/drivers/infiniband/hw/hfi1/sdma.c b/drivers/infiniband/hw/hfi1/sdma.c
index 961507bb0391..3ba7f4ea4bc9 100644
--- a/drivers/infiniband/hw/hfi1/sdma.c
+++ b/drivers/infiniband/hw/hfi1/sdma.c
@@ -2144,7 +2144,6 @@ void sdma_dumpstate(struct sdma_engine *sde)
 
 static void dump_sdma_state(struct sdma_engine *sde)
 {
-	struct hw_sdma_desc *descq;
 	struct hw_sdma_desc *descqp;
 	u64 desc[2];
 	u64 addr;
@@ -2155,7 +2154,6 @@ static void dump_sdma_state(struct sdma_engine *sde)
 	head = sde->descq_head & sde->sdma_mask;
 	tail = sde->descq_tail & sde->sdma_mask;
 	cnt = sdma_descq_freecnt(sde);
-	descq = sde->descq;
 
 	dd_dev_err(sde->dd,
 		   "SDMA (%u) descq_head: %u descq_tail: %u freecnt: %u FLE %d\n",
diff --git a/drivers/infiniband/hw/hfi1/ud.c b/drivers/infiniband/hw/hfi1/ud.c
index 2ba74fdd6f15..84c7dbec0c28 100644
--- a/drivers/infiniband/hw/hfi1/ud.c
+++ b/drivers/infiniband/hw/hfi1/ud.c
@@ -854,7 +854,6 @@ void hfi1_ud_rcv(struct hfi1_packet *packet)
 	int mgmt_pkey_idx = -1;
 	struct hfi1_ibport *ibp = rcd_to_iport(packet->rcd);
 	struct hfi1_pportdata *ppd = ppd_from_ibp(ibp);
-	struct ib_header *hdr = packet->hdr;
 	void *data = packet->payload;
 	u32 tlen = packet->tlen;
 	struct rvt_qp *qp = packet->qp;
@@ -880,7 +879,6 @@ void hfi1_ud_rcv(struct hfi1_packet *packet)
 		dlid_is_permissive = (dlid == permissive_lid);
 		slid_is_permissive = (slid == permissive_lid);
 	} else {
-		hdr = packet->hdr;
 		pkey = ib_bth_get_pkey(ohdr);
 		dlid_is_permissive = (dlid == be16_to_cpu(IB_LID_PERMISSIVE));
 		slid_is_permissive = (slid == be16_to_cpu(IB_LID_PERMISSIVE));
diff --git a/drivers/infiniband/hw/hfi1/verbs.c b/drivers/infiniband/hw/hfi1/verbs.c
index e232f3c608b4..8acdb5dded24 100644
--- a/drivers/infiniband/hw/hfi1/verbs.c
+++ b/drivers/infiniband/hw/hfi1/verbs.c
@@ -812,7 +812,6 @@ static int build_verbs_tx_desc(
 	int ret = 0;
 	struct hfi1_sdma_header *phdr = &tx->phdr;
 	u16 hdrbytes = tx->hdr_dwords << 2;
-	u32 *hdr;
 	u8 extra_bytes = 0;
 	static char trail_buf[12]; /* CRC = 4, LT = 1, Pad = 0 to 7 bytes */
 
@@ -823,9 +822,6 @@ static int build_verbs_tx_desc(
 		 */
 		extra_bytes = hfi1_get_16b_padding(hdrbytes - 8, length) +
 			      (SIZE_OF_CRC << 2) + SIZE_OF_LT;
-		hdr = (u32 *)&phdr->hdr.opah;
-	} else {
-		hdr = (u32 *)&phdr->hdr.ibh;
 	}
 	if (!ahg_info->ahgcount) {
 		ret = sdma_txinit_ahg(
@@ -891,14 +887,12 @@ int hfi1_verbs_send_dma(struct rvt_qp *qp, struct hfi1_pkt_state *ps,
 	u8 sc5 = priv->s_sc;
 	int ret;
 	u32 dwords;
-	bool bypass = false;
 
 	if (ps->s_txreq->phdr.hdr.hdr_type) {
 		u8 extra_bytes = hfi1_get_16b_padding((hdrwords << 2), len);
 
 		dwords = (len + extra_bytes + (SIZE_OF_CRC << 2) +
 			  SIZE_OF_LT) >> 2;
-		bypass = true;
 	} else {
 		dwords = (len + 3) >> 2;
 	}
@@ -1033,8 +1027,6 @@ int hfi1_verbs_send_pio(struct rvt_qp *qp, struct hfi1_pkt_state *ps,
 	int wc_status = IB_WC_SUCCESS;
 	int ret = 0;
 	pio_release_cb cb = NULL;
-	u32 lrh0_16b;
-	bool bypass = false;
 	u8 extra_bytes = 0;
 
 	if (ps->s_txreq->phdr.hdr.hdr_type) {
@@ -1043,8 +1035,6 @@ int hfi1_verbs_send_pio(struct rvt_qp *qp, struct hfi1_pkt_state *ps,
 		extra_bytes = pad_size + (SIZE_OF_CRC << 2) + SIZE_OF_LT;
 		dwords = (len + extra_bytes) >> 2;
 		hdr = (u32 *)&ps->s_txreq->phdr.hdr.opah;
-		lrh0_16b = ps->s_txreq->phdr.hdr.opah.lrh[0];
-		bypass = true;
 	} else {
 		dwords = (len + 3) >> 2;
 		hdr = (u32 *)&ps->s_txreq->phdr.hdr.ibh;
-- 
2.14.2

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

* [PATCH v2 17/45] IB/hfi1: Define hfi1_handle_cnp_tbl[] once
       [not found] ` <20171011174927.25113-1-bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
                     ` (15 preceding siblings ...)
  2017-10-11 17:48   ` [PATCH v2 16/45] IB/hfi1: Remove set-but-not-used variables Bart Van Assche
@ 2017-10-11 17:48   ` Bart Van Assche
  2017-10-11 17:49   ` [PATCH v2 18/45] IB/hns: Annotate iomem pointers correctly Bart Van Assche
                     ` (28 subsequent siblings)
  45 siblings, 0 replies; 55+ messages in thread
From: Bart Van Assche @ 2017-10-11 17:48 UTC (permalink / raw)
  To: Doug Ledford
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Bart Van Assche, Ira Weiny

Move the hfi1_handle_cnp_tbl[] from a header file to a .c file
such that only one copy ends up in the hfi1 kernel module. This
patch does not change any functionality.

Signed-off-by: Bart Van Assche <bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
Reviewed-by: Dennis Dalessandro <dennis.dalessandro-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Cc: Ira Weiny <ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
---
 drivers/infiniband/hw/hfi1/driver.c | 6 ++++++
 drivers/infiniband/hw/hfi1/hfi.h    | 5 -----
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/drivers/infiniband/hw/hfi1/driver.c b/drivers/infiniband/hw/hfi1/driver.c
index 85a425ef740e..b4f69c07ca2a 100644
--- a/drivers/infiniband/hw/hfi1/driver.c
+++ b/drivers/infiniband/hw/hfi1/driver.c
@@ -433,6 +433,12 @@ static inline void init_packet(struct hfi1_ctxtdata *rcd,
 	packet->numpkt = 0;
 }
 
+/* We support only two types - 9B and 16B for now */
+static const hfi1_handle_cnp hfi1_handle_cnp_tbl[2] = {
+	[HFI1_PKT_TYPE_9B] = &return_cnp,
+	[HFI1_PKT_TYPE_16B] = &return_cnp_16B
+};
+
 void hfi1_process_ecn_slowpath(struct rvt_qp *qp, struct hfi1_packet *pkt,
 			       bool do_cnp)
 {
diff --git a/drivers/infiniband/hw/hfi1/hfi.h b/drivers/infiniband/hw/hfi1/hfi.h
index 2f3c830669a9..854b64e5976d 100644
--- a/drivers/infiniband/hw/hfi1/hfi.h
+++ b/drivers/infiniband/hw/hfi1/hfi.h
@@ -1538,11 +1538,6 @@ typedef void (*hfi1_handle_cnp)(struct hfi1_ibport *ibp, struct rvt_qp *qp,
 				u32 remote_qpn, u32 pkey, u32 slid, u32 dlid,
 				u8 sc5, const struct ib_grh *old_grh);
 
-/* We support only two types - 9B and 16B for now */
-static const hfi1_handle_cnp hfi1_handle_cnp_tbl[2] = {
-	[HFI1_PKT_TYPE_9B] = &return_cnp,
-	[HFI1_PKT_TYPE_16B] = &return_cnp_16B
-};
 #define PKEY_CHECK_INVALID -1
 int egress_pkey_check(struct hfi1_pportdata *ppd, u32 slid, u16 pkey,
 		      u8 sc5, int8_t s_pkey_index);
-- 
2.14.2

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

* [PATCH v2 18/45] IB/hns: Annotate iomem pointers correctly
       [not found] ` <20171011174927.25113-1-bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
                     ` (16 preceding siblings ...)
  2017-10-11 17:48   ` [PATCH v2 17/45] IB/hfi1: Define hfi1_handle_cnp_tbl[] once Bart Van Assche
@ 2017-10-11 17:49   ` Bart Van Assche
  2017-10-11 17:49   ` [PATCH v2 19/45] IB/hns: Declare local functions 'static' Bart Van Assche
                     ` (27 subsequent siblings)
  45 siblings, 0 replies; 55+ messages in thread
From: Bart Van Assche @ 2017-10-11 17:49 UTC (permalink / raw)
  To: Doug Ledford
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Bart Van Assche, Lijun Ou,
	Wei Hu, Shaobo Xu

This patch avoids that sparse complains that there is an address
space mismatch.

Signed-off-by: Bart Van Assche <bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
Cc: Lijun Ou <oulijun-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
Cc: Wei Hu (Xavier) <xavier.huwei-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
Cc: Shaobo Xu <xushaobo2-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
---
 drivers/infiniband/hw/hns/hns_roce_eq.c    | 6 +++---
 drivers/infiniband/hw/hns/hns_roce_hw_v1.c | 9 +++++----
 drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 3 ++-
 3 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/drivers/infiniband/hw/hns/hns_roce_eq.c b/drivers/infiniband/hw/hns/hns_roce_eq.c
index b0f43735de1a..d184431e2bf5 100644
--- a/drivers/infiniband/hw/hns/hns_roce_eq.c
+++ b/drivers/infiniband/hw/hns/hns_roce_eq.c
@@ -558,7 +558,7 @@ static int hns_roce_create_eq(struct hns_roce_dev *hr_dev,
 	writel(eqshift_val, eqc);
 
 	/* Configure eq extended address 12~44bit */
-	writel((u32)(eq->buf_list[0].map >> 12), (u8 *)eqc + 4);
+	writel((u32)(eq->buf_list[0].map >> 12), eqc + 4);
 
 	/*
 	 * Configure eq extended address 45~49 bit.
@@ -572,13 +572,13 @@ static int hns_roce_create_eq(struct hns_roce_dev *hr_dev,
 	roce_set_field(eqcuridx_val,
 		       ROCEE_CAEP_AEQE_CUR_IDX_CAEP_AEQE_CUR_IDX_M,
 		       ROCEE_CAEP_AEQE_CUR_IDX_CAEP_AEQE_CUR_IDX_S, 0);
-	writel(eqcuridx_val, (u8 *)eqc + 8);
+	writel(eqcuridx_val, eqc + 8);
 
 	/* Configure eq consumer index */
 	roce_set_field(eqconsindx_val,
 		       ROCEE_CAEP_AEQE_CONS_IDX_CAEP_AEQE_CONS_IDX_M,
 		       ROCEE_CAEP_AEQE_CONS_IDX_CAEP_AEQE_CONS_IDX_S, 0);
-	writel(eqconsindx_val, (u8 *)eqc + 0xc);
+	writel(eqconsindx_val, eqc + 0xc);
 
 	return 0;
 
diff --git a/drivers/infiniband/hw/hns/hns_roce_hw_v1.c b/drivers/infiniband/hw/hns/hns_roce_hw_v1.c
index 852db18ec128..187241484fa1 100644
--- a/drivers/infiniband/hw/hns/hns_roce_hw_v1.c
+++ b/drivers/infiniband/hw/hns/hns_roce_hw_v1.c
@@ -1639,7 +1639,7 @@ static int hns_roce_v1_post_mbox(struct hns_roce_dev *hr_dev, u64 in_param,
 				 u64 out_param, u32 in_modifier, u8 op_modifier,
 				 u16 op, u16 token, int event)
 {
-	u32 *hcr = (u32 *)(hr_dev->reg_base + ROCEE_MB1_REG);
+	u32 __iomem *hcr = (u32 __iomem *)(hr_dev->reg_base + ROCEE_MB1_REG);
 	unsigned long end;
 	u32 val = 0;
 
@@ -2534,7 +2534,7 @@ static int hns_roce_v1_m_sqp(struct ib_qp *ibqp, const struct ib_qp_attr *attr,
 	int rq_pa_start;
 	u32 reg_val;
 	u64 *mtts;
-	u32 *addr;
+	u32 __iomem *addr;
 
 	context = kzalloc(sizeof(*context), GFP_KERNEL);
 	if (!context)
@@ -2616,8 +2616,9 @@ static int hns_roce_v1_m_sqp(struct ib_qp *ibqp, const struct ib_qp_attr *attr,
 			       QP1C_BYTES_40_SQ_CUR_IDX_S, 0);
 
 		/* Copy context to QP1C register */
-		addr = (u32 *)(hr_dev->reg_base + ROCEE_QP1C_CFG0_0_REG +
-			hr_qp->phy_port * sizeof(*context));
+		addr = (u32 __iomem *)(hr_dev->reg_base +
+				       ROCEE_QP1C_CFG0_0_REG +
+				       hr_qp->phy_port * sizeof(*context));
 
 		writel(context->qp1c_bytes_4, addr);
 		writel(context->sq_rq_bt_l, addr + 1);
diff --git a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
index b99d70aa1120..ff61f30a82c2 100644
--- a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
+++ b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
@@ -976,7 +976,8 @@ static int hns_roce_v2_post_mbox(struct hns_roce_dev *hr_dev, u64 in_param,
 				 u16 op, u16 token, int event)
 {
 	struct device *dev = hr_dev->dev;
-	u32 *hcr = (u32 *)(hr_dev->reg_base + ROCEE_VF_MB_CFG0_REG);
+	u32 __iomem *hcr = (u32 __iomem *)(hr_dev->reg_base +
+					   ROCEE_VF_MB_CFG0_REG);
 	unsigned long end;
 	u32 val0 = 0;
 	u32 val1 = 0;
-- 
2.14.2

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

* [PATCH v2 19/45] IB/hns: Declare local functions 'static'
       [not found] ` <20171011174927.25113-1-bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
                     ` (17 preceding siblings ...)
  2017-10-11 17:49   ` [PATCH v2 18/45] IB/hns: Annotate iomem pointers correctly Bart Van Assche
@ 2017-10-11 17:49   ` Bart Van Assche
       [not found]     ` <20171011174927.25113-20-bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
  2017-10-11 17:49   ` [PATCH v2 20/45] RDMA/i40iw: Fix a race condition Bart Van Assche
                     ` (26 subsequent siblings)
  45 siblings, 1 reply; 55+ messages in thread
From: Bart Van Assche @ 2017-10-11 17:49 UTC (permalink / raw)
  To: Doug Ledford
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Bart Van Assche, Lijun Ou,
	Wei Hu, Shaobo Xu

Signed-off-by: Bart Van Assche <bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
Cc: Lijun Ou <oulijun-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
Cc: Wei Hu (Xavier) <xavier.huwei-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
Cc: Shaobo Xu <xushaobo2-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
---
 drivers/infiniband/hw/hns/hns_roce_hw_v1.c | 64 ++++++++++++++++--------------
 1 file changed, 35 insertions(+), 29 deletions(-)

diff --git a/drivers/infiniband/hw/hns/hns_roce_hw_v1.c b/drivers/infiniband/hw/hns/hns_roce_hw_v1.c
index 187241484fa1..658e3a7464b3 100644
--- a/drivers/infiniband/hw/hns/hns_roce_hw_v1.c
+++ b/drivers/infiniband/hw/hns/hns_roce_hw_v1.c
@@ -57,8 +57,8 @@ static void set_raddr_seg(struct hns_roce_wqe_raddr_seg *rseg, u64 remote_addr,
 	rseg->len   = 0;
 }
 
-int hns_roce_v1_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr,
-			  struct ib_send_wr **bad_wr)
+static int hns_roce_v1_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr,
+				 struct ib_send_wr **bad_wr)
 {
 	struct hns_roce_dev *hr_dev = to_hr_dev(ibqp->device);
 	struct hns_roce_ah *ah = to_hr_ah(ud_wr(wr)->ah);
@@ -317,8 +317,8 @@ int hns_roce_v1_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr,
 	return ret;
 }
 
-int hns_roce_v1_post_recv(struct ib_qp *ibqp, struct ib_recv_wr *wr,
-			  struct ib_recv_wr **bad_wr)
+static int hns_roce_v1_post_recv(struct ib_qp *ibqp, struct ib_recv_wr *wr,
+				 struct ib_recv_wr **bad_wr)
 {
 	int ret = 0;
 	int nreq = 0;
@@ -877,7 +877,7 @@ static int hns_roce_db_init(struct hns_roce_dev *hr_dev)
 	return 0;
 }
 
-void hns_roce_v1_recreate_lp_qp_work_fn(struct work_struct *work)
+static void hns_roce_v1_recreate_lp_qp_work_fn(struct work_struct *work)
 {
 	struct hns_roce_recreate_lp_qp_work *lp_qp_work;
 	struct hns_roce_dev *hr_dev;
@@ -1033,7 +1033,8 @@ static void hns_roce_v1_mr_free_work_fn(struct work_struct *work)
 	kfree(mr_work);
 }
 
-int hns_roce_v1_dereg_mr(struct hns_roce_dev *hr_dev, struct hns_roce_mr *mr)
+static int hns_roce_v1_dereg_mr(struct hns_roce_dev *hr_dev,
+				struct hns_roce_mr *mr)
 {
 	struct device *dev = &hr_dev->pdev->dev;
 	struct hns_roce_mr_free_work *mr_work;
@@ -1391,7 +1392,7 @@ static void hns_roce_free_mr_free(struct hns_roce_dev *hr_dev)
  * @enable: true -- drop reset, false -- reset
  * return 0 - success , negative --fail
  */
-int hns_roce_v1_reset(struct hns_roce_dev *hr_dev, bool dereset)
+static int hns_roce_v1_reset(struct hns_roce_dev *hr_dev, bool dereset)
 {
 	struct device_node *dsaf_node;
 	struct device *dev = &hr_dev->pdev->dev;
@@ -1466,7 +1467,7 @@ static void hns_roce_des_qp_free(struct hns_roce_dev *hr_dev)
 	destroy_workqueue(des_qp->qp_wq);
 }
 
-int hns_roce_v1_profile(struct hns_roce_dev *hr_dev)
+static int hns_roce_v1_profile(struct hns_roce_dev *hr_dev)
 {
 	int i = 0;
 	struct hns_roce_caps *caps = &hr_dev->caps;
@@ -1538,7 +1539,7 @@ int hns_roce_v1_profile(struct hns_roce_dev *hr_dev)
 	return 0;
 }
 
-int hns_roce_v1_init(struct hns_roce_dev *hr_dev)
+static int hns_roce_v1_init(struct hns_roce_dev *hr_dev)
 {
 	int ret;
 	u32 val;
@@ -1617,7 +1618,7 @@ int hns_roce_v1_init(struct hns_roce_dev *hr_dev)
 	return ret;
 }
 
-void hns_roce_v1_exit(struct hns_roce_dev *hr_dev)
+static void hns_roce_v1_exit(struct hns_roce_dev *hr_dev)
 {
 	hns_roce_port_enable(hr_dev, HNS_ROCE_PORT_DOWN);
 	hns_roce_free_mr_free(hr_dev);
@@ -1701,8 +1702,8 @@ static int hns_roce_v1_chk_mbox(struct hns_roce_dev *hr_dev,
 	return 0;
 }
 
-void hns_roce_v1_set_gid(struct hns_roce_dev *hr_dev, u8 port, int gid_index,
-			 union ib_gid *gid)
+static void hns_roce_v1_set_gid(struct hns_roce_dev *hr_dev, u8 port,
+				int gid_index, union ib_gid *gid)
 {
 	u32 *p = NULL;
 	u8 gid_idx = 0;
@@ -1765,8 +1766,8 @@ static int hns_roce_v1_set_mac(struct hns_roce_dev *hr_dev, u8 phy_port,
 	return 0;
 }
 
-void hns_roce_v1_set_mtu(struct hns_roce_dev *hr_dev, u8 phy_port,
-			 enum ib_mtu mtu)
+static void hns_roce_v1_set_mtu(struct hns_roce_dev *hr_dev, u8 phy_port,
+				enum ib_mtu mtu)
 {
 	u32 val;
 
@@ -1778,8 +1779,8 @@ void hns_roce_v1_set_mtu(struct hns_roce_dev *hr_dev, u8 phy_port,
 		   val);
 }
 
-int hns_roce_v1_write_mtpt(void *mb_buf, struct hns_roce_mr *mr,
-			   unsigned long mtpt_idx)
+static int hns_roce_v1_write_mtpt(void *mb_buf, struct hns_roce_mr *mr,
+				  unsigned long mtpt_idx)
 {
 	struct hns_roce_v1_mpt_entry *mpt_entry;
 	struct scatterlist *sg;
@@ -1951,7 +1952,7 @@ static struct hns_roce_cqe *next_cqe_sw(struct hns_roce_cq *hr_cq)
 	return get_sw_cqe(hr_cq, hr_cq->cons_index);
 }
 
-void hns_roce_v1_cq_set_ci(struct hns_roce_cq *hr_cq, u32 cons_index)
+static void hns_roce_v1_cq_set_ci(struct hns_roce_cq *hr_cq, u32 cons_index)
 {
 	u32 doorbell[2];
 
@@ -2024,9 +2025,10 @@ static void hns_roce_v1_cq_clean(struct hns_roce_cq *hr_cq, u32 qpn,
 	spin_unlock_irq(&hr_cq->lock);
 }
 
-void hns_roce_v1_write_cqc(struct hns_roce_dev *hr_dev,
-			   struct hns_roce_cq *hr_cq, void *mb_buf, u64 *mtts,
-			   dma_addr_t dma_handle, int nent, u32 vector)
+static void hns_roce_v1_write_cqc(struct hns_roce_dev *hr_dev,
+				  struct hns_roce_cq *hr_cq, void *mb_buf,
+				  u64 *mtts, dma_addr_t dma_handle, int nent,
+				  u32 vector)
 {
 	struct hns_roce_cq_context *cq_context = NULL;
 	struct hns_roce_buf_list *tptr_buf;
@@ -2111,7 +2113,8 @@ void hns_roce_v1_write_cqc(struct hns_roce_dev *hr_dev,
 	cq_context->cqc_byte_32 = cpu_to_le32(cq_context->cqc_byte_32);
 }
 
-int hns_roce_v1_req_notify_cq(struct ib_cq *ibcq, enum ib_cq_notify_flags flags)
+static int hns_roce_v1_req_notify_cq(struct ib_cq *ibcq,
+				     enum ib_cq_notify_flags flags)
 {
 	struct hns_roce_cq *hr_cq = to_hr_cq(ibcq);
 	u32 notification_flag;
@@ -2372,8 +2375,9 @@ int hns_roce_v1_poll_cq(struct ib_cq *ibcq, int num_entries, struct ib_wc *wc)
 		return ret;
 }
 
-int hns_roce_v1_clear_hem(struct hns_roce_dev *hr_dev,
-		struct hns_roce_hem_table *table, int obj, int step_idx)
+static int hns_roce_v1_clear_hem(struct hns_roce_dev *hr_dev,
+				 struct hns_roce_hem_table *table, int obj,
+				 int step_idx)
 {
 	struct device *dev = &hr_dev->pdev->dev;
 	struct hns_roce_v1_priv *priv;
@@ -3272,9 +3276,10 @@ static int hns_roce_v1_m_qp(struct ib_qp *ibqp, const struct ib_qp_attr *attr,
 	return ret;
 }
 
-int hns_roce_v1_modify_qp(struct ib_qp *ibqp, const struct ib_qp_attr *attr,
-			  int attr_mask, enum ib_qp_state cur_state,
-			  enum ib_qp_state new_state)
+static int hns_roce_v1_modify_qp(struct ib_qp *ibqp,
+				 const struct ib_qp_attr *attr, int attr_mask,
+				 enum ib_qp_state cur_state,
+				 enum ib_qp_state new_state)
 {
 
 	if (ibqp->qp_type == IB_QPT_GSI || ibqp->qp_type == IB_QPT_SMI)
@@ -3541,8 +3546,9 @@ static int hns_roce_v1_q_qp(struct ib_qp *ibqp, struct ib_qp_attr *qp_attr,
 	return ret;
 }
 
-int hns_roce_v1_query_qp(struct ib_qp *ibqp, struct ib_qp_attr *qp_attr,
-			 int qp_attr_mask, struct ib_qp_init_attr *qp_init_attr)
+static int hns_roce_v1_query_qp(struct ib_qp *ibqp, struct ib_qp_attr *qp_attr,
+				int qp_attr_mask,
+				struct ib_qp_init_attr *qp_init_attr)
 {
 	struct hns_roce_qp *hr_qp = to_hr_qp(ibqp);
 
@@ -3893,7 +3899,7 @@ int hns_roce_v1_destroy_qp(struct ib_qp *ibqp)
 	return 0;
 }
 
-int hns_roce_v1_destroy_cq(struct ib_cq *ibcq)
+static int hns_roce_v1_destroy_cq(struct ib_cq *ibcq)
 {
 	struct hns_roce_dev *hr_dev = to_hr_dev(ibcq->device);
 	struct hns_roce_cq *hr_cq = to_hr_cq(ibcq);
-- 
2.14.2

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

* [PATCH v2 20/45] RDMA/i40iw: Fix a race condition
       [not found] ` <20171011174927.25113-1-bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
                     ` (18 preceding siblings ...)
  2017-10-11 17:49   ` [PATCH v2 19/45] IB/hns: Declare local functions 'static' Bart Van Assche
@ 2017-10-11 17:49   ` Bart Van Assche
  2017-10-11 17:49   ` [PATCH v2 21/45] RDMA/i40iw: Suppress gcc 7 fall-through complaints Bart Van Assche
                     ` (25 subsequent siblings)
  45 siblings, 0 replies; 55+ messages in thread
From: Bart Van Assche @ 2017-10-11 17:49 UTC (permalink / raw)
  To: Doug Ledford; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Bart Van Assche

Use the proper primitives to dereference the RCU pointer
upper_dev->ip_ptr. Compile-tested only.

Signed-off-by: Bart Van Assche <bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
Reviewed-by: Shiraz Saleem <shiraz.saleem-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
---
 drivers/infiniband/hw/i40iw/i40iw_utils.c | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/drivers/infiniband/hw/i40iw/i40iw_utils.c b/drivers/infiniband/hw/i40iw/i40iw_utils.c
index e52dbbb4165e..7304189b62ef 100644
--- a/drivers/infiniband/hw/i40iw/i40iw_utils.c
+++ b/drivers/infiniband/hw/i40iw/i40iw_utils.c
@@ -168,11 +168,16 @@ int i40iw_inetaddr_event(struct notifier_block *notifier,
 	if (netdev != event_netdev)
 		return NOTIFY_DONE;
 
-	if (upper_dev)
-		local_ipaddr = ntohl(
-			((struct in_device *)upper_dev->ip_ptr)->ifa_list->ifa_address);
-	else
+	if (upper_dev) {
+		struct in_device *in;
+
+		rcu_read_lock();
+		in = __in_dev_get_rcu(upper_dev);
+		local_ipaddr = ntohl(in->ifa_list->ifa_address);
+		rcu_read_unlock();
+	} else {
 		local_ipaddr = ntohl(ifa->ifa_address);
+	}
 	switch (event) {
 	case NETDEV_DOWN:
 		action = I40IW_ARP_DELETE;
-- 
2.14.2

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

* [PATCH v2 21/45] RDMA/i40iw: Suppress gcc 7 fall-through complaints
       [not found] ` <20171011174927.25113-1-bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
                     ` (19 preceding siblings ...)
  2017-10-11 17:49   ` [PATCH v2 20/45] RDMA/i40iw: Fix a race condition Bart Van Assche
@ 2017-10-11 17:49   ` Bart Van Assche
  2017-10-11 17:49   ` [PATCH v2 22/45] RDMA/i40iw: Remove a set-but-not-used variable Bart Van Assche
                     ` (24 subsequent siblings)
  45 siblings, 0 replies; 55+ messages in thread
From: Bart Van Assche @ 2017-10-11 17:49 UTC (permalink / raw)
  To: Doug Ledford; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Bart Van Assche

Avoid that gcc 7 reports the following warning when building with W=1:

warning: this statement may fall through [-Wimplicit-fallthrough=]

Signed-off-by: Bart Van Assche <bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
Reviewed-by: Shiraz Saleem <shiraz.saleem-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
---
 drivers/infiniband/hw/i40iw/i40iw_cm.c   | 1 +
 drivers/infiniband/hw/i40iw/i40iw_hw.c   | 1 +
 drivers/infiniband/hw/i40iw/i40iw_puda.c | 1 +
 3 files changed, 3 insertions(+)

diff --git a/drivers/infiniband/hw/i40iw/i40iw_cm.c b/drivers/infiniband/hw/i40iw/i40iw_cm.c
index 50c43766defd..4e1ff81c5ba0 100644
--- a/drivers/infiniband/hw/i40iw/i40iw_cm.c
+++ b/drivers/infiniband/hw/i40iw/i40iw_cm.c
@@ -2410,6 +2410,7 @@ static void i40iw_handle_rst_pkt(struct i40iw_cm_node *cm_node,
 	case I40IW_CM_STATE_FIN_WAIT1:
 	case I40IW_CM_STATE_LAST_ACK:
 		cm_node->cm_id->rem_ref(cm_node->cm_id);
+		/* fall through */
 	case I40IW_CM_STATE_TIME_WAIT:
 		cm_node->state = I40IW_CM_STATE_CLOSED;
 		i40iw_rem_ref_cm_node(cm_node);
diff --git a/drivers/infiniband/hw/i40iw/i40iw_hw.c b/drivers/infiniband/hw/i40iw/i40iw_hw.c
index 476867a3f584..7e9de845a350 100644
--- a/drivers/infiniband/hw/i40iw/i40iw_hw.c
+++ b/drivers/infiniband/hw/i40iw/i40iw_hw.c
@@ -410,6 +410,7 @@ void i40iw_process_aeq(struct i40iw_device *iwdev)
 		case I40IW_AE_UDA_XMIT_DGRAM_TOO_LONG:
 		case I40IW_AE_UDA_XMIT_IPADDR_MISMATCH:
 			ctx_info->err_rq_idx_valid = false;
+			/* fall through */
 		default:
 			if (!info->sq && ctx_info->err_rq_idx_valid) {
 				ctx_info->err_rq_idx = info->wqe_idx;
diff --git a/drivers/infiniband/hw/i40iw/i40iw_puda.c b/drivers/infiniband/hw/i40iw/i40iw_puda.c
index c2cab20c4bc5..2a3bf6488b4b 100644
--- a/drivers/infiniband/hw/i40iw/i40iw_puda.c
+++ b/drivers/infiniband/hw/i40iw/i40iw_puda.c
@@ -816,6 +816,7 @@ void i40iw_puda_dele_resources(struct i40iw_sc_vsi *vsi,
 	switch (rsrc->completion) {
 	case PUDA_HASH_CRC_COMPLETE:
 		i40iw_free_hash_desc(rsrc->hash_desc);
+		/* fall through */
 	case PUDA_QP_CREATED:
 		if (!reset)
 			i40iw_puda_free_qp(rsrc);
-- 
2.14.2

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

* [PATCH v2 22/45] RDMA/i40iw: Remove a set-but-not-used variable
       [not found] ` <20171011174927.25113-1-bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
                     ` (20 preceding siblings ...)
  2017-10-11 17:49   ` [PATCH v2 21/45] RDMA/i40iw: Suppress gcc 7 fall-through complaints Bart Van Assche
@ 2017-10-11 17:49   ` Bart Van Assche
  2017-10-11 17:49   ` [PATCH v2 23/45] IB/mthca: Fix indentation Bart Van Assche
                     ` (23 subsequent siblings)
  45 siblings, 0 replies; 55+ messages in thread
From: Bart Van Assche @ 2017-10-11 17:49 UTC (permalink / raw)
  To: Doug Ledford; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Bart Van Assche

Signed-off-by: Bart Van Assche <bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
Reviewed-by: Shiraz Saleem <shiraz.saleem-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
---
 drivers/infiniband/hw/i40iw/i40iw_cm.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/infiniband/hw/i40iw/i40iw_cm.c b/drivers/infiniband/hw/i40iw/i40iw_cm.c
index 4e1ff81c5ba0..f5cfb224e153 100644
--- a/drivers/infiniband/hw/i40iw/i40iw_cm.c
+++ b/drivers/infiniband/hw/i40iw/i40iw_cm.c
@@ -1199,7 +1199,6 @@ static void i40iw_cm_timer_tick(unsigned long pass)
 	struct i40iw_cm_core *cm_core = (struct i40iw_cm_core *)pass;
 	u32 settimer = 0;
 	unsigned long timetosend;
-	struct i40iw_sc_dev *dev;
 	unsigned long flags;
 
 	struct list_head timer_list;
@@ -1270,7 +1269,6 @@ static void i40iw_cm_timer_tick(unsigned long pass)
 		spin_unlock_irqrestore(&cm_node->retrans_list_lock, flags);
 
 		vsi = &cm_node->iwdev->vsi;
-		dev = cm_node->dev;
 
 		if (!cm_node->ack_rcvd) {
 			atomic_inc(&send_entry->sqbuf->refcount);
-- 
2.14.2

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

* [PATCH v2 23/45] IB/mthca: Fix indentation
       [not found] ` <20171011174927.25113-1-bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
                     ` (21 preceding siblings ...)
  2017-10-11 17:49   ` [PATCH v2 22/45] RDMA/i40iw: Remove a set-but-not-used variable Bart Van Assche
@ 2017-10-11 17:49   ` Bart Van Assche
  2017-10-11 17:49   ` [PATCH v2 24/45] IB/mlx4: Suppress gcc 7 fall-through complaints Bart Van Assche
                     ` (22 subsequent siblings)
  45 siblings, 0 replies; 55+ messages in thread
From: Bart Van Assche @ 2017-10-11 17:49 UTC (permalink / raw)
  To: Doug Ledford
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Bart Van Assche, Leon Romanovsky

Signed-off-by: Bart Van Assche <bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
Cc: Leon Romanovsky <leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
---
 drivers/infiniband/hw/mthca/mthca_main.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/infiniband/hw/mthca/mthca_main.c b/drivers/infiniband/hw/mthca/mthca_main.c
index e36a9bc52268..f3e80dec1334 100644
--- a/drivers/infiniband/hw/mthca/mthca_main.c
+++ b/drivers/infiniband/hw/mthca/mthca_main.c
@@ -473,11 +473,11 @@ static int mthca_init_icm(struct mthca_dev *mdev,
 		goto err_unmap_eqp;
 	}
 
-       mdev->cq_table.table = mthca_alloc_icm_table(mdev, init_hca->cqc_base,
-						    dev_lim->cqc_entry_sz,
-						    mdev->limits.num_cqs,
-						    mdev->limits.reserved_cqs,
-						    0, 0);
+	mdev->cq_table.table = mthca_alloc_icm_table(mdev, init_hca->cqc_base,
+						     dev_lim->cqc_entry_sz,
+						     mdev->limits.num_cqs,
+						     mdev->limits.reserved_cqs,
+						     0, 0);
 	if (!mdev->cq_table.table) {
 		mthca_err(mdev, "Failed to map CQ context memory, aborting.\n");
 		err = -ENOMEM;
-- 
2.14.2

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

* [PATCH v2 24/45] IB/mlx4: Suppress gcc 7 fall-through complaints
       [not found] ` <20171011174927.25113-1-bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
                     ` (22 preceding siblings ...)
  2017-10-11 17:49   ` [PATCH v2 23/45] IB/mthca: Fix indentation Bart Van Assche
@ 2017-10-11 17:49   ` Bart Van Assche
  2017-10-11 17:49   ` [PATCH v2 25/45] IB/mlx5: " Bart Van Assche
                     ` (21 subsequent siblings)
  45 siblings, 0 replies; 55+ messages in thread
From: Bart Van Assche @ 2017-10-11 17:49 UTC (permalink / raw)
  To: Doug Ledford; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Bart Van Assche

Avoid that gcc 7 reports the following warning when building with W=1:

warning: this statement may fall through [-Wimplicit-fallthrough=]

Signed-off-by: Bart Van Assche <bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
Reviewed-by: Leon Romanovsky <leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
---
 drivers/infiniband/hw/mlx4/cq.c  | 2 ++
 drivers/infiniband/hw/mlx4/mcg.c | 1 +
 2 files changed, 3 insertions(+)

diff --git a/drivers/infiniband/hw/mlx4/cq.c b/drivers/infiniband/hw/mlx4/cq.c
index cab796341697..6d5f405912dd 100644
--- a/drivers/infiniband/hw/mlx4/cq.c
+++ b/drivers/infiniband/hw/mlx4/cq.c
@@ -768,11 +768,13 @@ static int mlx4_ib_poll_one(struct mlx4_ib_cq *cq,
 		switch (cqe->owner_sr_opcode & MLX4_CQE_OPCODE_MASK) {
 		case MLX4_OPCODE_RDMA_WRITE_IMM:
 			wc->wc_flags |= IB_WC_WITH_IMM;
+			/* fall through */
 		case MLX4_OPCODE_RDMA_WRITE:
 			wc->opcode    = IB_WC_RDMA_WRITE;
 			break;
 		case MLX4_OPCODE_SEND_IMM:
 			wc->wc_flags |= IB_WC_WITH_IMM;
+			/* fall through */
 		case MLX4_OPCODE_SEND:
 		case MLX4_OPCODE_SEND_INVAL:
 			wc->opcode    = IB_WC_SEND;
diff --git a/drivers/infiniband/hw/mlx4/mcg.c b/drivers/infiniband/hw/mlx4/mcg.c
index 70eb9f917303..81ffc007e0a1 100644
--- a/drivers/infiniband/hw/mlx4/mcg.c
+++ b/drivers/infiniband/hw/mlx4/mcg.c
@@ -944,6 +944,7 @@ int mlx4_ib_mcg_multiplex_handler(struct ib_device *ibdev, int port,
 	switch (sa_mad->mad_hdr.method) {
 	case IB_MGMT_METHOD_SET:
 		may_create = 1;
+		/* fall through */
 	case IB_SA_METHOD_DELETE:
 		req = kzalloc(sizeof *req, GFP_KERNEL);
 		if (!req)
-- 
2.14.2

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

* [PATCH v2 25/45] IB/mlx5: Suppress gcc 7 fall-through complaints
       [not found] ` <20171011174927.25113-1-bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
                     ` (23 preceding siblings ...)
  2017-10-11 17:49   ` [PATCH v2 24/45] IB/mlx4: Suppress gcc 7 fall-through complaints Bart Van Assche
@ 2017-10-11 17:49   ` Bart Van Assche
  2017-10-11 17:49   ` [PATCH v2 26/45] IB/mlx5: Remove a set-but-not-used variable Bart Van Assche
                     ` (20 subsequent siblings)
  45 siblings, 0 replies; 55+ messages in thread
From: Bart Van Assche @ 2017-10-11 17:49 UTC (permalink / raw)
  To: Doug Ledford; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Bart Van Assche

Avoid that gcc 7 reports the following warning when building with W=1:

warning: this statement may fall through [-Wimplicit-fallthrough=]

Signed-off-by: Bart Van Assche <bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
Reviewed-by: Leon Romanovsky <leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
---
 drivers/infiniband/hw/mlx5/cq.c | 2 ++
 drivers/infiniband/hw/mlx5/qp.c | 1 +
 2 files changed, 3 insertions(+)

diff --git a/drivers/infiniband/hw/mlx5/cq.c b/drivers/infiniband/hw/mlx5/cq.c
index 2aa53f427685..b8a116d0e063 100644
--- a/drivers/infiniband/hw/mlx5/cq.c
+++ b/drivers/infiniband/hw/mlx5/cq.c
@@ -124,11 +124,13 @@ static void handle_good_req(struct ib_wc *wc, struct mlx5_cqe64 *cqe,
 	switch (be32_to_cpu(cqe->sop_drop_qpn) >> 24) {
 	case MLX5_OPCODE_RDMA_WRITE_IMM:
 		wc->wc_flags |= IB_WC_WITH_IMM;
+		/* fall through */
 	case MLX5_OPCODE_RDMA_WRITE:
 		wc->opcode    = IB_WC_RDMA_WRITE;
 		break;
 	case MLX5_OPCODE_SEND_IMM:
 		wc->wc_flags |= IB_WC_WITH_IMM;
+		/* fall through */
 	case MLX5_OPCODE_SEND:
 	case MLX5_OPCODE_SEND_INVAL:
 		wc->opcode    = IB_WC_SEND;
diff --git a/drivers/infiniband/hw/mlx5/qp.c b/drivers/infiniband/hw/mlx5/qp.c
index acb79d3a4f1d..b0b09febafda 100644
--- a/drivers/infiniband/hw/mlx5/qp.c
+++ b/drivers/infiniband/hw/mlx5/qp.c
@@ -4053,6 +4053,7 @@ int mlx5_ib_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr,
 				*bad_wr = wr;
 				goto out;
 			}
+			/* fall through */
 		case MLX5_IB_QPT_HW_GSI:
 			set_datagram_seg(seg, wr);
 			seg += sizeof(struct mlx5_wqe_datagram_seg);
-- 
2.14.2

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

* [PATCH v2 26/45] IB/mlx5: Remove a set-but-not-used variable
       [not found] ` <20171011174927.25113-1-bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
                     ` (24 preceding siblings ...)
  2017-10-11 17:49   ` [PATCH v2 25/45] IB/mlx5: " Bart Van Assche
@ 2017-10-11 17:49   ` Bart Van Assche
  2017-10-11 17:49   ` [PATCH v2 27/45] IB/nes: Fix indentation Bart Van Assche
                     ` (19 subsequent siblings)
  45 siblings, 0 replies; 55+ messages in thread
From: Bart Van Assche @ 2017-10-11 17:49 UTC (permalink / raw)
  To: Doug Ledford; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Bart Van Assche

References: commit 5fe9dec0d045 ("IB/mlx5: Use blue flame register allocator in mlx5_ib")
Signed-off-by: Bart Van Assche <bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
Reviewed-by: Leon Romanovsky <leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
---
 drivers/infiniband/hw/mlx5/qp.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/infiniband/hw/mlx5/qp.c b/drivers/infiniband/hw/mlx5/qp.c
index b0b09febafda..37a0976240fd 100644
--- a/drivers/infiniband/hw/mlx5/qp.c
+++ b/drivers/infiniband/hw/mlx5/qp.c
@@ -3858,7 +3858,6 @@ int mlx5_ib_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr,
 	unsigned long flags;
 	unsigned idx;
 	int err = 0;
-	int inl = 0;
 	int num_sge;
 	void *seg;
 	int nreq;
@@ -4117,7 +4116,6 @@ int mlx5_ib_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr,
 				*bad_wr = wr;
 				goto out;
 			}
-			inl = 1;
 			size += sz;
 		} else {
 			dpseg = seg;
-- 
2.14.2

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

* [PATCH v2 27/45] IB/nes: Fix indentation
       [not found] ` <20171011174927.25113-1-bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
                     ` (25 preceding siblings ...)
  2017-10-11 17:49   ` [PATCH v2 26/45] IB/mlx5: Remove a set-but-not-used variable Bart Van Assche
@ 2017-10-11 17:49   ` Bart Van Assche
       [not found]     ` <20171011174927.25113-28-bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
  2017-10-11 17:49   ` [PATCH v2 28/45] IB/nes: Suppress gcc 7 fall-through complaints Bart Van Assche
                     ` (18 subsequent siblings)
  45 siblings, 1 reply; 55+ messages in thread
From: Bart Van Assche @ 2017-10-11 17:49 UTC (permalink / raw)
  To: Doug Ledford
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Bart Van Assche, Faisal Latif

Signed-off-by: Bart Van Assche <bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
Cc: Faisal Latif <faisal.latif-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
---
 drivers/infiniband/hw/nes/nes.c       | 22 +++++++++++-----------
 drivers/infiniband/hw/nes/nes_hw.c    |  5 +++--
 drivers/infiniband/hw/nes/nes_nic.c   |  9 ++++-----
 drivers/infiniband/hw/nes/nes_utils.c |  8 ++++----
 drivers/infiniband/hw/nes/nes_verbs.c | 12 ++++++------
 5 files changed, 28 insertions(+), 28 deletions(-)

diff --git a/drivers/infiniband/hw/nes/nes.c b/drivers/infiniband/hw/nes/nes.c
index 942ca84713c9..ff58dfa071b8 100644
--- a/drivers/infiniband/hw/nes/nes.c
+++ b/drivers/infiniband/hw/nes/nes.c
@@ -757,18 +757,18 @@ static void nes_remove(struct pci_dev *pcidev)
 	int netdev_index = 0;
 	unsigned long flags;
 
-		if (nesdev->netdev_count) {
-			netdev = nesdev->netdev[netdev_index];
-			if (netdev) {
-				netif_stop_queue(netdev);
-				unregister_netdev(netdev);
-				nes_netdev_destroy(netdev);
-
-				nesdev->netdev[netdev_index] = NULL;
-				nesdev->netdev_count--;
-				nesdev->nesadapter->netdev_count--;
-			}
+	if (nesdev->netdev_count) {
+		netdev = nesdev->netdev[netdev_index];
+		if (netdev) {
+			netif_stop_queue(netdev);
+			unregister_netdev(netdev);
+			nes_netdev_destroy(netdev);
+
+			nesdev->netdev[netdev_index] = NULL;
+			nesdev->netdev_count--;
+			nesdev->nesadapter->netdev_count--;
 		}
+	}
 
 	nes_notifiers_registered--;
 	if (nes_notifiers_registered == 0) {
diff --git a/drivers/infiniband/hw/nes/nes_hw.c b/drivers/infiniband/hw/nes/nes_hw.c
index b0adf65e4bdb..812b59d8f13c 100644
--- a/drivers/infiniband/hw/nes/nes_hw.c
+++ b/drivers/infiniband/hw/nes/nes_hw.c
@@ -1861,8 +1861,9 @@ int nes_init_nic_qp(struct nes_device *nesdev, struct net_device *netdev)
 	}
 	if ((nesdev->nesadapter->allow_unaligned_fpdus) &&
 		(nes_init_mgt_qp(nesdev, netdev, nesvnic))) {
-			nes_debug(NES_DBG_INIT, "%s: Out of memory for pau nic\n", netdev->name);
-			nes_destroy_nic_qp(nesvnic);
+		nes_debug(NES_DBG_INIT, "%s: Out of memory for pau nic\n",
+			  netdev->name);
+		nes_destroy_nic_qp(nesvnic);
 		return -ENOMEM;
 	}
 
diff --git a/drivers/infiniband/hw/nes/nes_nic.c b/drivers/infiniband/hw/nes/nes_nic.c
index 5921ea3d50ae..6977fcfcbb76 100644
--- a/drivers/infiniband/hw/nes/nes_nic.c
+++ b/drivers/infiniband/hw/nes/nes_nic.c
@@ -926,11 +926,10 @@ static void nes_netdev_set_multicast_list(struct net_device *netdev)
 				nesadapter->pft_mcast_map[mc_index] !=
 					nesvnic->nic_index &&
 					mc_index < max_pft_entries_avaiable) {
-						nes_debug(NES_DBG_NIC_RX,
-					"mc_index=%d skipping nic_index=%d, "
-					"used for=%d \n", mc_index,
-					nesvnic->nic_index,
-					nesadapter->pft_mcast_map[mc_index]);
+				nes_debug(NES_DBG_NIC_RX,
+					  "mc_index=%d skipping nic_index=%d, used for=%d\n",
+					  mc_index, nesvnic->nic_index,
+					  nesadapter->pft_mcast_map[mc_index]);
 				mc_index++;
 			}
 			if (mc_index >= max_pft_entries_avaiable)
diff --git a/drivers/infiniband/hw/nes/nes_utils.c b/drivers/infiniband/hw/nes/nes_utils.c
index 37331e2fdc5f..7b67e9cb57ed 100644
--- a/drivers/infiniband/hw/nes/nes_utils.c
+++ b/drivers/infiniband/hw/nes/nes_utils.c
@@ -888,10 +888,10 @@ void nes_clc(unsigned long parm)
 	struct nes_adapter *nesadapter = nesdev->nesadapter;
 
 	spin_lock_irqsave(&nesadapter->phy_lock, flags);
-    nesadapter->link_interrupt_count[0] = 0;
-    nesadapter->link_interrupt_count[1] = 0;
-    nesadapter->link_interrupt_count[2] = 0;
-    nesadapter->link_interrupt_count[3] = 0;
+	nesadapter->link_interrupt_count[0] = 0;
+	nesadapter->link_interrupt_count[1] = 0;
+	nesadapter->link_interrupt_count[2] = 0;
+	nesadapter->link_interrupt_count[3] = 0;
 	spin_unlock_irqrestore(&nesadapter->phy_lock, flags);
 
 	nesadapter->lc_timer.expires = jiffies + 3600 * HZ;  /* 1 hour */
diff --git a/drivers/infiniband/hw/nes/nes_verbs.c b/drivers/infiniband/hw/nes/nes_verbs.c
index f0dc5f4aa177..6abe90b58c91 100644
--- a/drivers/infiniband/hw/nes/nes_verbs.c
+++ b/drivers/infiniband/hw/nes/nes_verbs.c
@@ -2865,11 +2865,11 @@ int nes_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr,
 
 				next_iwarp_state = NES_CQP_QP_IWARP_STATE_ERROR;
 				/* next_iwarp_state = (NES_CQP_QP_IWARP_STATE_TERMINATE | 0x02000000); */
-					if (nesqp->hte_added) {
-						nes_debug(NES_DBG_MOD_QP, "set CQP_QP_DEL_HTE\n");
-						next_iwarp_state |= NES_CQP_QP_DEL_HTE;
-						nesqp->hte_added = 0;
-					}
+				if (nesqp->hte_added) {
+					nes_debug(NES_DBG_MOD_QP, "set CQP_QP_DEL_HTE\n");
+					next_iwarp_state |= NES_CQP_QP_DEL_HTE;
+					nesqp->hte_added = 0;
+				}
 				if ((nesqp->hw_tcp_state > NES_AEQE_TCP_STATE_CLOSED) &&
 						(nesdev->iw_status) &&
 						(nesqp->hw_tcp_state != NES_AEQE_TCP_STATE_TIME_WAIT)) {
@@ -3560,7 +3560,7 @@ static int nes_poll_cq(struct ib_cq *ibcq, int num_entries, struct ib_wc *entry)
 				entry->byte_len = le32_to_cpu(cqe.cqe_words[NES_CQE_PAYLOAD_LENGTH_IDX]);
 				wrid = ((u64)(le32_to_cpu(nesqp->hwqp.rq_vbase[wqe_index].wqe_words[NES_IWARP_RQ_WQE_COMP_SCRATCH_LOW_IDX]))) |
 					((u64)(le32_to_cpu(nesqp->hwqp.rq_vbase[wqe_index].wqe_words[NES_IWARP_RQ_WQE_COMP_SCRATCH_HIGH_IDX]))<<32);
-					entry->opcode = IB_WC_RECV;
+				entry->opcode = IB_WC_RECV;
 
 				nesqp->hwqp.rq_tail = (wqe_index+1)&(nesqp->hwqp.rq_size - 1);
 				if ((entry->status != IB_WC_SUCCESS) && (nesqp->hwqp.rq_tail != nesqp->hwqp.rq_head)) {
-- 
2.14.2

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

* [PATCH v2 28/45] IB/nes: Suppress gcc 7 fall-through complaints
       [not found] ` <20171011174927.25113-1-bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
                     ` (26 preceding siblings ...)
  2017-10-11 17:49   ` [PATCH v2 27/45] IB/nes: Fix indentation Bart Van Assche
@ 2017-10-11 17:49   ` Bart Van Assche
       [not found]     ` <20171011174927.25113-29-bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
  2017-10-11 17:49   ` [PATCH v2 29/45] IB/nes: Remove set-but-not-used variables Bart Van Assche
                     ` (17 subsequent siblings)
  45 siblings, 1 reply; 55+ messages in thread
From: Bart Van Assche @ 2017-10-11 17:49 UTC (permalink / raw)
  To: Doug Ledford
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Bart Van Assche, Faisal Latif

Avoid that gcc 7 reports the following warning when building with W=1:

warning: this statement may fall through [-Wimplicit-fallthrough=]

Signed-off-by: Bart Van Assche <bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
Cc: Faisal Latif <faisal.latif-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
---
 drivers/infiniband/hw/nes/nes_cm.c | 1 +
 drivers/infiniband/hw/nes/nes_hw.c | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/infiniband/hw/nes/nes_cm.c b/drivers/infiniband/hw/nes/nes_cm.c
index de4025deaa4a..a5f6dffef07a 100644
--- a/drivers/infiniband/hw/nes/nes_cm.c
+++ b/drivers/infiniband/hw/nes/nes_cm.c
@@ -1768,6 +1768,7 @@ static void handle_rst_pkt(struct nes_cm_node *cm_node, struct sk_buff *skb,
 	case NES_CM_STATE_FIN_WAIT1:
 	case NES_CM_STATE_LAST_ACK:
 		cm_node->cm_id->rem_ref(cm_node->cm_id);
+		/* fall through */
 	case NES_CM_STATE_TIME_WAIT:
 		cm_node->state = NES_CM_STATE_CLOSED;
 		rem_ref_cm_node(cm_node->cm_core, cm_node);
diff --git a/drivers/infiniband/hw/nes/nes_hw.c b/drivers/infiniband/hw/nes/nes_hw.c
index 812b59d8f13c..c392f83c0629 100644
--- a/drivers/infiniband/hw/nes/nes_hw.c
+++ b/drivers/infiniband/hw/nes/nes_hw.c
@@ -3632,7 +3632,7 @@ static void nes_process_iwarp_aeqe(struct nes_device *nesdev,
 				aeq_info |= NES_AEQE_AEID_RDMAP_ROE_UNEXPECTED_OPCODE;
 				aeqe->aeqe_words[NES_AEQE_MISC_IDX] = cpu_to_le32(aeq_info);
 			}
-
+			/* fall through */
 		case NES_AEQE_AEID_RDMAP_ROE_BAD_LLP_CLOSE:
 		case NES_AEQE_AEID_LLP_TOO_MANY_RETRIES:
 		case NES_AEQE_AEID_DDP_UBE_INVALID_MSN_NO_BUFFER_AVAILABLE:
-- 
2.14.2

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

* [PATCH v2 29/45] IB/nes: Remove set-but-not-used variables
       [not found] ` <20171011174927.25113-1-bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
                     ` (27 preceding siblings ...)
  2017-10-11 17:49   ` [PATCH v2 28/45] IB/nes: Suppress gcc 7 fall-through complaints Bart Van Assche
@ 2017-10-11 17:49   ` Bart Van Assche
       [not found]     ` <20171011174927.25113-30-bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
  2017-10-11 17:49   ` [PATCH v2 30/45] IB/nes: Fix a race condition in nes_inetaddr_event() Bart Van Assche
                     ` (16 subsequent siblings)
  45 siblings, 1 reply; 55+ messages in thread
From: Bart Van Assche @ 2017-10-11 17:49 UTC (permalink / raw)
  To: Doug Ledford
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Bart Van Assche, Faisal Latif

This patch does not change any functionality.

Signed-off-by: Bart Van Assche <bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
Cc: Faisal Latif <faisal.latif-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
---
 drivers/infiniband/hw/nes/nes_cm.c    | 8 --------
 drivers/infiniband/hw/nes/nes_utils.c | 5 ++---
 2 files changed, 2 insertions(+), 11 deletions(-)

diff --git a/drivers/infiniband/hw/nes/nes_cm.c b/drivers/infiniband/hw/nes/nes_cm.c
index a5f6dffef07a..bfe2156813b1 100644
--- a/drivers/infiniband/hw/nes/nes_cm.c
+++ b/drivers/infiniband/hw/nes/nes_cm.c
@@ -1389,7 +1389,6 @@ static int nes_addr_resolve_neigh(struct nes_vnic *nesvnic, u32 dst_ip, int arpi
 	struct rtable *rt;
 	struct neighbour *neigh;
 	int rc = arpindex;
-	struct net_device *netdev;
 	struct nes_adapter *nesadapter = nesvnic->nesdev->nesadapter;
 	__be32 dst_ipaddr = htonl(dst_ip);
 
@@ -1400,11 +1399,6 @@ static int nes_addr_resolve_neigh(struct nes_vnic *nesvnic, u32 dst_ip, int arpi
 		return rc;
 	}
 
-	if (netif_is_bond_slave(nesvnic->netdev))
-		netdev = netdev_master_upper_dev_get(nesvnic->netdev);
-	else
-		netdev = nesvnic->netdev;
-
 	neigh = dst_neigh_lookup(&rt->dst, &dst_ipaddr);
 
 	rcu_read_lock();
@@ -3075,7 +3069,6 @@ int nes_accept(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param)
 	u32 crc_value;
 	int ret;
 	int passive_state;
-	struct nes_ib_device *nesibdev;
 	struct ib_mr *ibmr = NULL;
 	struct nes_pd *nespd;
 	u64 tagged_offset;
@@ -3158,7 +3151,6 @@ int nes_accept(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param)
 
 	if (raddr->sin_addr.s_addr != laddr->sin_addr.s_addr) {
 		u64temp = (unsigned long)nesqp;
-		nesibdev = nesvnic->nesibdev;
 		nespd = nesqp->nespd;
 		tagged_offset = (u64)(unsigned long)*start_buff;
 		ibmr = nes_reg_phys_mr(&nespd->ibpd,
diff --git a/drivers/infiniband/hw/nes/nes_utils.c b/drivers/infiniband/hw/nes/nes_utils.c
index 7b67e9cb57ed..0613eb5006cc 100644
--- a/drivers/infiniband/hw/nes/nes_utils.c
+++ b/drivers/infiniband/hw/nes/nes_utils.c
@@ -753,7 +753,6 @@ void nes_mh_fix(unsigned long parm)
 	u32 mac_tx_frames_low;
 	u32 mac_tx_frames_high;
 	u32 mac_tx_pauses;
-	u32 serdes_status;
 	u32 reset_value;
 	u32 tx_control;
 	u32 tx_config;
@@ -846,7 +845,7 @@ void nes_mh_fix(unsigned long parm)
 		}
 
 		nes_write_indexed(nesdev, NES_IDX_ETH_SERDES_COMMON_CONTROL0, 0x00000008);
-		serdes_status = nes_read_indexed(nesdev, NES_IDX_ETH_SERDES_COMMON_STATUS0);
+		nes_read_indexed(nesdev, NES_IDX_ETH_SERDES_COMMON_STATUS0);
 
 		nes_write_indexed(nesdev, NES_IDX_ETH_SERDES_TX_EMP0, 0x000bdef7);
 		nes_write_indexed(nesdev, NES_IDX_ETH_SERDES_TX_DRIVE0, 0x9ce73000);
@@ -859,7 +858,7 @@ void nes_mh_fix(unsigned long parm)
 		} else {
 			nes_write_indexed(nesdev, NES_IDX_ETH_SERDES_RX_EQ_CONTROL0, 0xf0042222);
 		}
-		serdes_status = nes_read_indexed(nesdev, NES_IDX_ETH_SERDES_RX_EQ_STATUS0);
+		nes_read_indexed(nesdev, NES_IDX_ETH_SERDES_RX_EQ_STATUS0);
 		nes_write_indexed(nesdev, NES_IDX_ETH_SERDES_CDR_CONTROL0, 0x000000ff);
 
 		nes_write_indexed(nesdev, NES_IDX_MAC_TX_CONTROL, tx_control);
-- 
2.14.2

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

* [PATCH v2 30/45] IB/nes: Fix a race condition in nes_inetaddr_event()
       [not found] ` <20171011174927.25113-1-bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
                     ` (28 preceding siblings ...)
  2017-10-11 17:49   ` [PATCH v2 29/45] IB/nes: Remove set-but-not-used variables Bart Van Assche
@ 2017-10-11 17:49   ` Bart Van Assche
       [not found]     ` <20171011174927.25113-31-bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
  2017-10-11 17:49   ` [PATCH v2 31/45] RDMA/ocrdma: Use NULL instead of 0 to represent a pointer Bart Van Assche
                     ` (15 subsequent siblings)
  45 siblings, 1 reply; 55+ messages in thread
From: Bart Van Assche @ 2017-10-11 17:49 UTC (permalink / raw)
  To: Doug Ledford
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Bart Van Assche, Faisal Latif

This patch has been compile-tested only.

Signed-off-by: Bart Van Assche <bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
Cc: Faisal Latif <faisal.latif-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
---
 drivers/infiniband/hw/nes/nes.c | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/drivers/infiniband/hw/nes/nes.c b/drivers/infiniband/hw/nes/nes.c
index ff58dfa071b8..42b68aa999fc 100644
--- a/drivers/infiniband/hw/nes/nes.c
+++ b/drivers/infiniband/hw/nes/nes.c
@@ -178,11 +178,16 @@ static int nes_inetaddr_event(struct notifier_block *notifier,
 					/* fall through */
 				case NETDEV_CHANGEADDR:
 					/* Add the address to the IP table */
-					if (upper_dev)
-						nesvnic->local_ipaddr =
-							((struct in_device *)upper_dev->ip_ptr)->ifa_list->ifa_address;
-					else
+					if (upper_dev) {
+						struct in_device *in;
+
+						rcu_read_lock();
+						in = __in_dev_get_rcu(upper_dev);
+						nesvnic->local_ipaddr = in->ifa_list->ifa_address;
+						rcu_read_unlock();
+					} else {
 						nesvnic->local_ipaddr = ifa->ifa_address;
+					}
 
 					nes_write_indexed(nesdev,
 							NES_IDX_DST_IP_ADDR+(0x10*PCI_FUNC(nesdev->pcidev->devfn)),
-- 
2.14.2

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

* [PATCH v2 31/45] RDMA/ocrdma: Use NULL instead of 0 to represent a pointer
       [not found] ` <20171011174927.25113-1-bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
                     ` (29 preceding siblings ...)
  2017-10-11 17:49   ` [PATCH v2 30/45] IB/nes: Fix a race condition in nes_inetaddr_event() Bart Van Assche
@ 2017-10-11 17:49   ` Bart Van Assche
  2017-10-11 17:49   ` [PATCH v2 32/45] RDMA/ocrdma: Suppress gcc 7 fall-through complaints Bart Van Assche
                     ` (14 subsequent siblings)
  45 siblings, 0 replies; 55+ messages in thread
From: Bart Van Assche @ 2017-10-11 17:49 UTC (permalink / raw)
  To: Doug Ledford
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Bart Van Assche,
	Selvin Xavier, Devesh Sharma

Signed-off-by: Bart Van Assche <bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
Cc: Selvin Xavier <selvin.xavier-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
Cc: Devesh Sharma <devesh.sharma-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
---
 drivers/infiniband/hw/ocrdma/ocrdma_hw.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_hw.c b/drivers/infiniband/hw/ocrdma/ocrdma_hw.c
index 8e2e9bcf1916..eaacb71b0bff 100644
--- a/drivers/infiniband/hw/ocrdma/ocrdma_hw.c
+++ b/drivers/infiniband/hw/ocrdma/ocrdma_hw.c
@@ -3186,7 +3186,7 @@ void ocrdma_eqd_set_task(struct work_struct *work)
 {
 	struct ocrdma_dev *dev =
 		container_of(work, struct ocrdma_dev, eqd_work.work);
-	struct ocrdma_eq *eq = 0;
+	struct ocrdma_eq *eq = NULL;
 	int i, num = 0, status = -EINVAL;
 	u64 eq_intr;
 
-- 
2.14.2

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

* [PATCH v2 32/45] RDMA/ocrdma: Suppress gcc 7 fall-through complaints
       [not found] ` <20171011174927.25113-1-bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
                     ` (30 preceding siblings ...)
  2017-10-11 17:49   ` [PATCH v2 31/45] RDMA/ocrdma: Use NULL instead of 0 to represent a pointer Bart Van Assche
@ 2017-10-11 17:49   ` Bart Van Assche
  2017-10-11 17:49   ` [PATCH v2 33/45] RDMA/ocrdma: Remove set-but-not-used variables Bart Van Assche
                     ` (13 subsequent siblings)
  45 siblings, 0 replies; 55+ messages in thread
From: Bart Van Assche @ 2017-10-11 17:49 UTC (permalink / raw)
  To: Doug Ledford
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Bart Van Assche,
	Selvin Xavier, Devesh Sharma

Avoid that gcc 7 reports the following warning when building with
W=1:

warning: this statement may fall through [-Wimplicit-fallthrough=]

Signed-off-by: Bart Van Assche <bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
Cc: Selvin Xavier <selvin.xavier-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
Cc: Devesh Sharma <devesh.sharma-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
---
 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c b/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c
index 27d5e8d9f08d..3757f1b8cbfc 100644
--- a/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c
+++ b/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c
@@ -2247,6 +2247,7 @@ int ocrdma_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr,
 		case IB_WR_SEND_WITH_IMM:
 			hdr->cw |= (OCRDMA_FLAG_IMM << OCRDMA_WQE_FLAGS_SHIFT);
 			hdr->immdt = ntohl(wr->ex.imm_data);
+			/* fall through */
 		case IB_WR_SEND:
 			hdr->cw |= (OCRDMA_SEND << OCRDMA_WQE_OPCODE_SHIFT);
 			ocrdma_build_send(qp, hdr, wr);
@@ -2260,6 +2261,7 @@ int ocrdma_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr,
 		case IB_WR_RDMA_WRITE_WITH_IMM:
 			hdr->cw |= (OCRDMA_FLAG_IMM << OCRDMA_WQE_FLAGS_SHIFT);
 			hdr->immdt = ntohl(wr->ex.imm_data);
+			/* fall through */
 		case IB_WR_RDMA_WRITE:
 			hdr->cw |= (OCRDMA_WRITE << OCRDMA_WQE_OPCODE_SHIFT);
 			status = ocrdma_build_write(qp, hdr, wr);
-- 
2.14.2

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

* [PATCH v2 33/45] RDMA/ocrdma: Remove set-but-not-used variables
       [not found] ` <20171011174927.25113-1-bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
                     ` (31 preceding siblings ...)
  2017-10-11 17:49   ` [PATCH v2 32/45] RDMA/ocrdma: Suppress gcc 7 fall-through complaints Bart Van Assche
@ 2017-10-11 17:49   ` Bart Van Assche
  2017-10-11 17:49   ` [PATCH v2 34/45] RDMA/qedr: Use NULL instead of 0 to represent a pointer Bart Van Assche
                     ` (12 subsequent siblings)
  45 siblings, 0 replies; 55+ messages in thread
From: Bart Van Assche @ 2017-10-11 17:49 UTC (permalink / raw)
  To: Doug Ledford
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Bart Van Assche,
	Selvin Xavier, Devesh Sharma

Signed-off-by: Bart Van Assche <bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
Cc: Selvin Xavier <selvin.xavier-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
Cc: Devesh Sharma <devesh.sharma-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
---
 drivers/infiniband/hw/ocrdma/ocrdma_hw.c    | 4 ++--
 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c | 2 --
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_hw.c b/drivers/infiniband/hw/ocrdma/ocrdma_hw.c
index eaacb71b0bff..f8c14c7baedb 100644
--- a/drivers/infiniband/hw/ocrdma/ocrdma_hw.c
+++ b/drivers/infiniband/hw/ocrdma/ocrdma_hw.c
@@ -3187,7 +3187,7 @@ void ocrdma_eqd_set_task(struct work_struct *work)
 	struct ocrdma_dev *dev =
 		container_of(work, struct ocrdma_dev, eqd_work.work);
 	struct ocrdma_eq *eq = NULL;
-	int i, num = 0, status = -EINVAL;
+	int i, num = 0;
 	u64 eq_intr;
 
 	for (i = 0; i < dev->eq_cnt; i++) {
@@ -3209,7 +3209,7 @@ void ocrdma_eqd_set_task(struct work_struct *work)
 	}
 
 	if (num)
-		status = ocrdma_modify_eqd(dev, &dev->eq_tbl[0], num);
+		ocrdma_modify_eqd(dev, &dev->eq_tbl[0], num);
 	schedule_delayed_work(&dev->eqd_work, msecs_to_jiffies(1000));
 }
 
diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c b/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c
index 3757f1b8cbfc..7866fd8051f6 100644
--- a/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c
+++ b/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c
@@ -66,9 +66,7 @@ int ocrdma_query_gid(struct ib_device *ibdev, u8 port,
 		     int index, union ib_gid *sgid)
 {
 	int ret;
-	struct ocrdma_dev *dev;
 
-	dev = get_ocrdma_dev(ibdev);
 	memset(sgid, 0, sizeof(*sgid));
 	if (index >= OCRDMA_MAX_SGID)
 		return -EINVAL;
-- 
2.14.2

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

* [PATCH v2 34/45] RDMA/qedr: Use NULL instead of 0 to represent a pointer
       [not found] ` <20171011174927.25113-1-bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
                     ` (32 preceding siblings ...)
  2017-10-11 17:49   ` [PATCH v2 33/45] RDMA/ocrdma: Remove set-but-not-used variables Bart Van Assche
@ 2017-10-11 17:49   ` Bart Van Assche
  2017-10-11 17:49   ` [PATCH v2 35/45] RDMA/qedr: Declare local functions static Bart Van Assche
                     ` (11 subsequent siblings)
  45 siblings, 0 replies; 55+ messages in thread
From: Bart Van Assche @ 2017-10-11 17:49 UTC (permalink / raw)
  To: Doug Ledford
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Bart Van Assche, Ram Amrani,
	Michal Kalderon, Ariel Elior

Signed-off-by: Bart Van Assche <bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
Cc: Ram Amrani <Ram.Amrani-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org>
Cc: Michal Kalderon <Michal.Kalderon-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org>
Cc: Ariel Elior <Ariel.Elior-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org>
---
 drivers/infiniband/hw/qedr/qedr_roce_cm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/infiniband/hw/qedr/qedr_roce_cm.c b/drivers/infiniband/hw/qedr/qedr_roce_cm.c
index c3c249ba62b8..2a0346678ddd 100644
--- a/drivers/infiniband/hw/qedr/qedr_roce_cm.c
+++ b/drivers/infiniband/hw/qedr/qedr_roce_cm.c
@@ -660,7 +660,7 @@ int qedr_gsi_post_recv(struct ib_qp *ibqp, struct ib_recv_wr *wr,
 						  dev->gsi_ll2_handle,
 						  wr->sg_list[0].addr,
 						  wr->sg_list[0].length,
-						  0 /* cookie */,
+						  NULL /* cookie */,
 						  1 /* notify_fw */);
 		if (rc) {
 			DP_ERR(dev,
-- 
2.14.2

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

* [PATCH v2 35/45] RDMA/qedr: Declare local functions static
       [not found] ` <20171011174927.25113-1-bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
                     ` (33 preceding siblings ...)
  2017-10-11 17:49   ` [PATCH v2 34/45] RDMA/qedr: Use NULL instead of 0 to represent a pointer Bart Van Assche
@ 2017-10-11 17:49   ` Bart Van Assche
  2017-10-11 17:49   ` [PATCH v2 36/45] RDMA/qedr: Annotate iomem pointers correctly Bart Van Assche
                     ` (10 subsequent siblings)
  45 siblings, 0 replies; 55+ messages in thread
From: Bart Van Assche @ 2017-10-11 17:49 UTC (permalink / raw)
  To: Doug Ledford
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Bart Van Assche, Michal Kalderon

Signed-off-by: Bart Van Assche <bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
Cc: Michal Kalderon <Michal.Kalderon-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org>
---
 drivers/infiniband/hw/qedr/main.c         | 22 +++++++++++-----------
 drivers/infiniband/hw/qedr/qedr_iw_cm.c   | 14 +++++++-------
 drivers/infiniband/hw/qedr/qedr_roce_cm.c | 27 +++++++++++++--------------
 drivers/infiniband/hw/qedr/verbs.c        |  2 +-
 4 files changed, 32 insertions(+), 33 deletions(-)

diff --git a/drivers/infiniband/hw/qedr/main.c b/drivers/infiniband/hw/qedr/main.c
index 1afc26785049..be282e4915d8 100644
--- a/drivers/infiniband/hw/qedr/main.c
+++ b/drivers/infiniband/hw/qedr/main.c
@@ -54,8 +54,8 @@ MODULE_LICENSE("Dual BSD/GPL");
 
 #define QEDR_WQ_MULTIPLIER_DFT	(3)
 
-void qedr_ib_dispatch_event(struct qedr_dev *dev, u8 port_num,
-			    enum ib_event_type type)
+static void qedr_ib_dispatch_event(struct qedr_dev *dev, u8 port_num,
+				   enum ib_event_type type)
 {
 	struct ib_event ibev;
 
@@ -96,8 +96,8 @@ static struct net_device *qedr_get_netdev(struct ib_device *dev, u8 port_num)
 	return qdev->ndev;
 }
 
-int qedr_roce_port_immutable(struct ib_device *ibdev, u8 port_num,
-			     struct ib_port_immutable *immutable)
+static int qedr_roce_port_immutable(struct ib_device *ibdev, u8 port_num,
+				    struct ib_port_immutable *immutable)
 {
 	struct ib_port_attr attr;
 	int err;
@@ -115,8 +115,8 @@ int qedr_roce_port_immutable(struct ib_device *ibdev, u8 port_num,
 	return 0;
 }
 
-int qedr_iw_port_immutable(struct ib_device *ibdev, u8 port_num,
-			   struct ib_port_immutable *immutable)
+static int qedr_iw_port_immutable(struct ib_device *ibdev, u8 port_num,
+				  struct ib_port_immutable *immutable)
 {
 	struct ib_port_attr attr;
 	int err;
@@ -133,7 +133,7 @@ int qedr_iw_port_immutable(struct ib_device *ibdev, u8 port_num,
 	return 0;
 }
 
-int qedr_iw_register_device(struct qedr_dev *dev)
+static int qedr_iw_register_device(struct qedr_dev *dev)
 {
 	dev->ibdev.node_type = RDMA_NODE_RNIC;
 	dev->ibdev.query_gid = qedr_iw_query_gid;
@@ -159,7 +159,7 @@ int qedr_iw_register_device(struct qedr_dev *dev)
 	return 0;
 }
 
-void qedr_roce_register_device(struct qedr_dev *dev)
+static void qedr_roce_register_device(struct qedr_dev *dev)
 {
 	dev->ibdev.node_type = RDMA_NODE_IB_CA;
 	dev->ibdev.query_gid = qedr_query_gid;
@@ -689,12 +689,12 @@ static int qedr_set_device_attr(struct qedr_dev *dev)
 	return 0;
 }
 
-void qedr_unaffiliated_event(void *context, u8 event_code)
+static void qedr_unaffiliated_event(void *context, u8 event_code)
 {
 	pr_err("unaffiliated event not implemented yet\n");
 }
 
-void qedr_affiliated_event(void *context, u8 e_code, void *fw_handle)
+static void qedr_affiliated_event(void *context, u8 e_code, void *fw_handle)
 {
 #define EVENT_TYPE_NOT_DEFINED	0
 #define EVENT_TYPE_CQ		1
@@ -833,7 +833,7 @@ static int qedr_init_hw(struct qedr_dev *dev)
 	return rc;
 }
 
-void qedr_stop_hw(struct qedr_dev *dev)
+static void qedr_stop_hw(struct qedr_dev *dev)
 {
 	dev->ops->rdma_remove_user(dev->rdma_ctx, dev->dpi);
 	dev->ops->rdma_stop(dev->rdma_ctx);
diff --git a/drivers/infiniband/hw/qedr/qedr_iw_cm.c b/drivers/infiniband/hw/qedr/qedr_iw_cm.c
index 2950d3f6ecb8..478b7317b80a 100644
--- a/drivers/infiniband/hw/qedr/qedr_iw_cm.c
+++ b/drivers/infiniband/hw/qedr/qedr_iw_cm.c
@@ -79,7 +79,7 @@ qedr_fill_sockaddr6(const struct qed_iwarp_cm_info *cm_info,
 	}
 }
 
-void
+static void
 qedr_iw_mpa_request(void *context, struct qed_iwarp_cm_event_params *params)
 {
 	struct qedr_iw_listener *listener = (struct qedr_iw_listener *)context;
@@ -113,7 +113,7 @@ qedr_iw_mpa_request(void *context, struct qed_iwarp_cm_event_params *params)
 	listener->cm_id->event_handler(listener->cm_id, &event);
 }
 
-void
+static void
 qedr_iw_issue_event(void *context,
 		    struct qed_iwarp_cm_event_params *params,
 		    enum iw_cm_event_type event_type)
@@ -136,7 +136,7 @@ qedr_iw_issue_event(void *context,
 		ep->cm_id->event_handler(ep->cm_id, &event);
 }
 
-void
+static void
 qedr_iw_close_event(void *context, struct qed_iwarp_cm_event_params *params)
 {
 	struct qedr_iw_ep *ep = (struct qedr_iw_ep *)context;
@@ -149,7 +149,7 @@ qedr_iw_close_event(void *context, struct qed_iwarp_cm_event_params *params)
 	}
 }
 
-void
+static void
 qedr_iw_qp_event(void *context,
 		 struct qed_iwarp_cm_event_params *params,
 		 enum ib_event_type ib_event, char *str)
@@ -217,7 +217,7 @@ static void qedr_iw_disconnect_worker(struct work_struct *work)
 	qedr_iw_qp_rem_ref(&qp->ibqp);
 }
 
-void
+static void
 qedr_iw_disconnect_event(void *context,
 			 struct qed_iwarp_cm_event_params *params)
 {
@@ -262,7 +262,7 @@ qedr_iw_passive_complete(void *context,
 		qedr_iw_close_event(context, params);
 }
 
-int
+static int
 qedr_iw_mpa_reply(void *context, struct qed_iwarp_cm_event_params *params)
 {
 	struct qedr_iw_ep *ep = (struct qedr_iw_ep *)context;
@@ -274,7 +274,7 @@ qedr_iw_mpa_reply(void *context, struct qed_iwarp_cm_event_params *params)
 	return dev->ops->iwarp_send_rtr(dev->rdma_ctx, &rtr_in);
 }
 
-int
+static int
 qedr_iw_event_handler(void *context, struct qed_iwarp_cm_event_params *params)
 {
 	struct qedr_iw_ep *ep = (struct qedr_iw_ep *)context;
diff --git a/drivers/infiniband/hw/qedr/qedr_roce_cm.c b/drivers/infiniband/hw/qedr/qedr_roce_cm.c
index 2a0346678ddd..9dbf0cc985f3 100644
--- a/drivers/infiniband/hw/qedr/qedr_roce_cm.c
+++ b/drivers/infiniband/hw/qedr/qedr_roce_cm.c
@@ -64,11 +64,11 @@ void qedr_store_gsi_qp_cq(struct qedr_dev *dev, struct qedr_qp *qp,
 	dev->gsi_qp = qp;
 }
 
-void qedr_ll2_complete_tx_packet(void *cxt,
-				 u8 connection_handle,
-				 void *cookie,
-				 dma_addr_t first_frag_addr,
-				 bool b_last_fragment, bool b_last_packet)
+static void qedr_ll2_complete_tx_packet(void *cxt, u8 connection_handle,
+					void *cookie,
+					dma_addr_t first_frag_addr,
+					bool b_last_fragment,
+					bool b_last_packet)
 {
 	struct qedr_dev *dev = (struct qedr_dev *)cxt;
 	struct qed_roce_ll2_packet *pkt = cookie;
@@ -93,8 +93,8 @@ void qedr_ll2_complete_tx_packet(void *cxt,
 		(*cq->ibcq.comp_handler) (&cq->ibcq, cq->ibcq.cq_context);
 }
 
-void qedr_ll2_complete_rx_packet(void *cxt,
-				 struct qed_ll2_comp_rx_data *data)
+static void qedr_ll2_complete_rx_packet(void *cxt,
+					struct qed_ll2_comp_rx_data *data)
 {
 	struct qedr_dev *dev = (struct qedr_dev *)cxt;
 	struct qedr_cq *cq = dev->gsi_rqcq;
@@ -122,10 +122,9 @@ void qedr_ll2_complete_rx_packet(void *cxt,
 		(*cq->ibcq.comp_handler) (&cq->ibcq, cq->ibcq.cq_context);
 }
 
-void qedr_ll2_release_rx_packet(void *cxt,
-				u8 connection_handle,
-				void *cookie,
-				dma_addr_t rx_buf_addr, bool b_last_packet)
+static void qedr_ll2_release_rx_packet(void *cxt, u8 connection_handle,
+				       void *cookie, dma_addr_t rx_buf_addr,
+				       bool b_last_packet)
 {
 	/* Do nothing... */
 }
@@ -237,7 +236,7 @@ static int qedr_ll2_post_tx(struct qedr_dev *dev,
 	return 0;
 }
 
-int qedr_ll2_stop(struct qedr_dev *dev)
+static int qedr_ll2_stop(struct qedr_dev *dev)
 {
 	int rc;
 
@@ -260,8 +259,8 @@ int qedr_ll2_stop(struct qedr_dev *dev)
 	return rc;
 }
 
-int qedr_ll2_start(struct qedr_dev *dev,
-		   struct ib_qp_init_attr *attrs, struct qedr_qp *qp)
+static int qedr_ll2_start(struct qedr_dev *dev,
+			  struct ib_qp_init_attr *attrs, struct qedr_qp *qp)
 {
 	struct qed_ll2_acquire_data data;
 	struct qed_ll2_cbs cbs;
diff --git a/drivers/infiniband/hw/qedr/verbs.c b/drivers/infiniband/hw/qedr/verbs.c
index a8a6e66767d5..5acb9eab64ed 100644
--- a/drivers/infiniband/hw/qedr/verbs.c
+++ b/drivers/infiniband/hw/qedr/verbs.c
@@ -2268,7 +2268,7 @@ int qedr_query_qp(struct ib_qp *ibqp,
 	return rc;
 }
 
-int qedr_free_qp_resources(struct qedr_dev *dev, struct qedr_qp *qp)
+static int qedr_free_qp_resources(struct qedr_dev *dev, struct qedr_qp *qp)
 {
 	int rc = 0;
 
-- 
2.14.2

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

* [PATCH v2 36/45] RDMA/qedr: Annotate iomem pointers correctly
       [not found] ` <20171011174927.25113-1-bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
                     ` (34 preceding siblings ...)
  2017-10-11 17:49   ` [PATCH v2 35/45] RDMA/qedr: Declare local functions static Bart Van Assche
@ 2017-10-11 17:49   ` Bart Van Assche
  2017-10-11 17:49   ` [PATCH v2 37/45] RDMA/qedr: Remove set-but-not-used variables Bart Van Assche
                     ` (9 subsequent siblings)
  45 siblings, 0 replies; 55+ messages in thread
From: Bart Van Assche @ 2017-10-11 17:49 UTC (permalink / raw)
  To: Doug Ledford
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Bart Van Assche, Ram Amrani,
	Michal Kalderon, Ariel Elior

Signed-off-by: Bart Van Assche <bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
Cc: Ram Amrani <Ram.Amrani-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org>
Cc: Michal Kalderon <Michal.Kalderon-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org>
Cc: Ariel Elior <Ariel.Elior-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org>
---
 drivers/infiniband/hw/qedr/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/infiniband/hw/qedr/main.c b/drivers/infiniband/hw/qedr/main.c
index be282e4915d8..50812b33291b 100644
--- a/drivers/infiniband/hw/qedr/main.c
+++ b/drivers/infiniband/hw/qedr/main.c
@@ -819,7 +819,7 @@ static int qedr_init_hw(struct qedr_dev *dev)
 	if (rc)
 		goto out;
 
-	dev->db_addr = (void *)(uintptr_t)out_params.dpi_addr;
+	dev->db_addr = (void __iomem *)(uintptr_t)out_params.dpi_addr;
 	dev->db_phys_addr = out_params.dpi_phys_addr;
 	dev->db_size = out_params.dpi_size;
 	dev->dpi = out_params.dpi;
-- 
2.14.2

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

* [PATCH v2 37/45] RDMA/qedr: Remove set-but-not-used variables
       [not found] ` <20171011174927.25113-1-bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
                     ` (35 preceding siblings ...)
  2017-10-11 17:49   ` [PATCH v2 36/45] RDMA/qedr: Annotate iomem pointers correctly Bart Van Assche
@ 2017-10-11 17:49   ` Bart Van Assche
       [not found]     ` <20171011174927.25113-38-bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
  2017-10-11 17:49   ` [PATCH v2 38/45] IB/qib: Remove remaining code related to writing the EEPROM Bart Van Assche
                     ` (8 subsequent siblings)
  45 siblings, 1 reply; 55+ messages in thread
From: Bart Van Assche @ 2017-10-11 17:49 UTC (permalink / raw)
  To: Doug Ledford
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Bart Van Assche, Ram Amrani,
	Michal Kalderon, Ariel Elior

Signed-off-by: Bart Van Assche <bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
Cc: Ram Amrani <Ram.Amrani-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org>
Cc: Michal Kalderon <Michal.Kalderon-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org>
Cc: Ariel Elior <Ariel.Elior-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org>
---
 drivers/infiniband/hw/qedr/verbs.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/infiniband/hw/qedr/verbs.c b/drivers/infiniband/hw/qedr/verbs.c
index 5acb9eab64ed..b26aa88dab48 100644
--- a/drivers/infiniband/hw/qedr/verbs.c
+++ b/drivers/infiniband/hw/qedr/verbs.c
@@ -1447,13 +1447,11 @@ static int qedr_create_user_qp(struct qedr_dev *dev,
 	struct qed_rdma_create_qp_out_params out_params;
 	struct qedr_pd *pd = get_qedr_pd(ibpd);
 	struct ib_ucontext *ib_ctx = NULL;
-	struct qedr_ucontext *ctx = NULL;
 	struct qedr_create_qp_ureq ureq;
 	int alloc_and_init = rdma_protocol_roce(&dev->ibdev, 1);
 	int rc = -EINVAL;
 
 	ib_ctx = ibpd->uobject->context;
-	ctx = get_qedr_ucontext(ib_ctx);
 
 	memset(&ureq, 0, sizeof(ureq));
 	rc = ib_copy_from_udata(&ureq, udata, sizeof(ureq));
@@ -2602,7 +2600,6 @@ static struct qedr_mr *__qedr_alloc_mr(struct ib_pd *ibpd,
 struct ib_mr *qedr_alloc_mr(struct ib_pd *ibpd,
 			    enum ib_mr_type mr_type, u32 max_num_sg)
 {
-	struct qedr_dev *dev;
 	struct qedr_mr *mr;
 
 	if (mr_type != IB_MR_TYPE_MEM_REG)
@@ -2613,8 +2610,6 @@ struct ib_mr *qedr_alloc_mr(struct ib_pd *ibpd,
 	if (IS_ERR(mr))
 		return ERR_PTR(-EINVAL);
 
-	dev = mr->dev;
-
 	return &mr->ibmr;
 }
 
@@ -3109,7 +3104,7 @@ static int __qedr_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr,
 		break;
 	case IB_WR_RDMA_READ_WITH_INV:
 		SET_FIELD2(wqe->flags, RDMA_SQ_RDMA_WQE_1ST_READ_INV_FLG, 1);
-		/* fallthrough... same is identical to RDMA READ */
+		/* fallthrough -- same is identical to RDMA READ */
 
 	case IB_WR_RDMA_READ:
 		wqe->req_type = RDMA_SQ_REQ_TYPE_RDMA_RD;
-- 
2.14.2

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

* [PATCH v2 38/45] IB/qib: Remove remaining code related to writing the EEPROM
       [not found] ` <20171011174927.25113-1-bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
                     ` (36 preceding siblings ...)
  2017-10-11 17:49   ` [PATCH v2 37/45] RDMA/qedr: Remove set-but-not-used variables Bart Van Assche
@ 2017-10-11 17:49   ` Bart Van Assche
  2017-10-11 17:49   ` [PATCH v2 39/45] IB/qib: Suppress gcc 7 fall-through complaints Bart Van Assche
                     ` (7 subsequent siblings)
  45 siblings, 0 replies; 55+ messages in thread
From: Bart Van Assche @ 2017-10-11 17:49 UTC (permalink / raw)
  To: Doug Ledford
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Bart Van Assche, Mike Marciniszyn

Due to removal of the EEPROM writing code, the qib_inc_eeprom_err()
macro became a no-op. Remove the code that calls it. Since that
change removes all code that reads the eep_st_masks array, also
remove the code that updates that array and the array itself.

References: commit 18c0b82a3e45 ("IB/qib: Do not write EEPROM")
Signed-off-by: Bart Van Assche <bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
Cc: Mike Marciniszyn <infinipath-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
---
 drivers/infiniband/hw/qib/qib.h         | 18 ------------------
 drivers/infiniband/hw/qib/qib_iba6120.c | 25 -------------------------
 drivers/infiniband/hw/qib/qib_iba7220.c | 20 --------------------
 drivers/infiniband/hw/qib/qib_iba7322.c |  6 +-----
 4 files changed, 1 insertion(+), 68 deletions(-)

diff --git a/drivers/infiniband/hw/qib/qib.h b/drivers/infiniband/hw/qib/qib.h
index 1167a9c1776b..689f5d001892 100644
--- a/drivers/infiniband/hw/qib/qib.h
+++ b/drivers/infiniband/hw/qib/qib.h
@@ -101,18 +101,6 @@ extern const struct pci_error_handlers qib_pci_err_handler;
  */
 #define QIB_TRAFFIC_ACTIVE_THRESHOLD (2000)
 
-/*
- * Struct used to indicate which errors are logged in each of the
- * error-counters that are logged to EEPROM. A counter is incremented
- * _once_ (saturating at 255) for each event with any bits set in
- * the error or hwerror register masks below.
- */
-#define QIB_EEP_LOG_CNT (4)
-struct qib_eep_log_mask {
-	u64 errs_to_log;
-	u64 hwerrs_to_log;
-};
-
 /*
  * Below contains all data related to a single context (formerly called port).
  */
@@ -1079,11 +1067,6 @@ struct qib_devdata {
 	/* control high-level access to EEPROM */
 	struct mutex eep_lock;
 	uint64_t traffic_wds;
-	/*
-	 * masks for which bits of errs, hwerrs that cause
-	 * each of the counters to increment.
-	 */
-	struct qib_eep_log_mask eep_st_masks[QIB_EEP_LOG_CNT];
 	struct qib_diag_client *diag_client;
 	spinlock_t qib_diag_trans_lock; /* protect diag observer ops */
 	struct diag_observer_list_elt *diag_observer_list;
@@ -1297,7 +1280,6 @@ int qib_twsi_blk_rd(struct qib_devdata *dd, int dev, int addr, void *buffer,
 int qib_twsi_blk_wr(struct qib_devdata *dd, int dev, int addr,
 		    const void *buffer, int len);
 void qib_get_eeprom_info(struct qib_devdata *);
-#define qib_inc_eeprom_err(dd, eidx, incr)
 void qib_dump_lookup_output_queue(struct qib_devdata *);
 void qib_force_pio_avail_update(struct qib_devdata *);
 void qib_clear_symerror_on_linkup(unsigned long opaque);
diff --git a/drivers/infiniband/hw/qib/qib_iba6120.c b/drivers/infiniband/hw/qib/qib_iba6120.c
index c4a4c57e0f0a..3c5adfa104a0 100644
--- a/drivers/infiniband/hw/qib/qib_iba6120.c
+++ b/drivers/infiniband/hw/qib/qib_iba6120.c
@@ -748,7 +748,6 @@ static void qib_handle_6120_hwerrors(struct qib_devdata *dd, char *msg,
 	u32 bits, ctrl;
 	int isfatal = 0;
 	char *bitsmsg;
-	int log_idx;
 
 	hwerrs = qib_read_kreg64(dd, kr_hwerrstatus);
 	if (!hwerrs)
@@ -770,11 +769,6 @@ static void qib_handle_6120_hwerrors(struct qib_devdata *dd, char *msg,
 
 	hwerrs &= dd->cspec->hwerrmask;
 
-	/* We log some errors to EEPROM, check if we have any of those. */
-	for (log_idx = 0; log_idx < QIB_EEP_LOG_CNT; ++log_idx)
-		if (hwerrs & dd->eep_st_masks[log_idx].hwerrs_to_log)
-			qib_inc_eeprom_err(dd, log_idx, 1);
-
 	/*
 	 * Make sure we get this much out, unless told to be quiet,
 	 * or it's occurred within the last 5 seconds.
@@ -1004,7 +998,6 @@ static void handle_6120_errors(struct qib_devdata *dd, u64 errs)
 	char *msg;
 	u64 ignore_this_time = 0;
 	u64 iserr = 0;
-	int log_idx;
 	struct qib_pportdata *ppd = dd->pport;
 	u64 mask;
 
@@ -1015,10 +1008,6 @@ static void handle_6120_errors(struct qib_devdata *dd, u64 errs)
 	/* do these first, they are most important */
 	if (errs & ERR_MASK(HardwareErr))
 		qib_handle_6120_hwerrors(dd, msg, sizeof(dd->cspec->emsgbuf));
-	else
-		for (log_idx = 0; log_idx < QIB_EEP_LOG_CNT; ++log_idx)
-			if (errs & dd->eep_st_masks[log_idx].errs_to_log)
-				qib_inc_eeprom_err(dd, log_idx, 1);
 
 	if (errs & ~IB_E_BITSEXTANT)
 		qib_dev_err(dd,
@@ -3227,20 +3216,6 @@ static int init_6120_variables(struct qib_devdata *dd)
 	if (qib_unordered_wc())
 		dd->flags |= QIB_PIO_FLUSH_WC;
 
-	/*
-	 * EEPROM error log 0 is TXE Parity errors. 1 is RXE Parity.
-	 * 2 is Some Misc, 3 is reserved for future.
-	 */
-	dd->eep_st_masks[0].hwerrs_to_log = HWE_MASK(TXEMemParityErr);
-
-	/* Ignore errors in PIO/PBC on systems with unordered write-combining */
-	if (qib_unordered_wc())
-		dd->eep_st_masks[0].hwerrs_to_log &= ~TXE_PIO_PARITY;
-
-	dd->eep_st_masks[1].hwerrs_to_log = HWE_MASK(RXEMemParityErr);
-
-	dd->eep_st_masks[2].errs_to_log = ERR_MASK(ResetNegated);
-
 	ret = qib_init_pportdata(ppd, dd, 0, 1);
 	if (ret)
 		goto bail;
diff --git a/drivers/infiniband/hw/qib/qib_iba7220.c b/drivers/infiniband/hw/qib/qib_iba7220.c
index 78ce79be4120..ceb2259a5efb 100644
--- a/drivers/infiniband/hw/qib/qib_iba7220.c
+++ b/drivers/infiniband/hw/qib/qib_iba7220.c
@@ -1094,7 +1094,6 @@ static void handle_7220_errors(struct qib_devdata *dd, u64 errs)
 	char *msg;
 	u64 ignore_this_time = 0;
 	u64 iserr = 0;
-	int log_idx;
 	struct qib_pportdata *ppd = dd->pport;
 	u64 mask;
 
@@ -1105,10 +1104,6 @@ static void handle_7220_errors(struct qib_devdata *dd, u64 errs)
 	/* do these first, they are most important */
 	if (errs & ERR_MASK(HardwareErr))
 		qib_7220_handle_hwerrors(dd, msg, sizeof(dd->cspec->emsgbuf));
-	else
-		for (log_idx = 0; log_idx < QIB_EEP_LOG_CNT; ++log_idx)
-			if (errs & dd->eep_st_masks[log_idx].errs_to_log)
-				qib_inc_eeprom_err(dd, log_idx, 1);
 
 	if (errs & QLOGIC_IB_E_SDMAERRS)
 		sdma_7220_errors(ppd, errs);
@@ -1302,7 +1297,6 @@ static void qib_7220_handle_hwerrors(struct qib_devdata *dd, char *msg,
 	u32 bits, ctrl;
 	int isfatal = 0;
 	char *bitsmsg;
-	int log_idx;
 
 	hwerrs = qib_read_kreg64(dd, kr_hwerrstatus);
 	if (!hwerrs)
@@ -1326,10 +1320,6 @@ static void qib_7220_handle_hwerrors(struct qib_devdata *dd, char *msg,
 
 	hwerrs &= dd->cspec->hwerrmask;
 
-	/* We log some errors to EEPROM, check if we have any of those. */
-	for (log_idx = 0; log_idx < QIB_EEP_LOG_CNT; ++log_idx)
-		if (hwerrs & dd->eep_st_masks[log_idx].hwerrs_to_log)
-			qib_inc_eeprom_err(dd, log_idx, 1);
 	if (hwerrs & ~(TXEMEMPARITYERR_PIOBUF | TXEMEMPARITYERR_PIOPBC |
 		       RXE_PARITY))
 		qib_devinfo(dd->pcidev,
@@ -4016,16 +4006,6 @@ static int qib_init_7220_variables(struct qib_devdata *dd)
 	dd->flags |= qib_special_trigger ?
 		QIB_USE_SPCL_TRIG : QIB_HAS_SEND_DMA;
 
-	/*
-	 * EEPROM error log 0 is TXE Parity errors. 1 is RXE Parity.
-	 * 2 is Some Misc, 3 is reserved for future.
-	 */
-	dd->eep_st_masks[0].hwerrs_to_log = HWE_MASK(TXEMemParityErr);
-
-	dd->eep_st_masks[1].hwerrs_to_log = HWE_MASK(RXEMemParityErr);
-
-	dd->eep_st_masks[2].errs_to_log = ERR_MASK(ResetNegated);
-
 	init_waitqueue_head(&cpspec->autoneg_wait);
 	INIT_DELAYED_WORK(&cpspec->autoneg_work, autoneg_7220_work);
 
diff --git a/drivers/infiniband/hw/qib/qib_iba7322.c b/drivers/infiniband/hw/qib/qib_iba7322.c
index 4d02cffe4e03..77217fae9c06 100644
--- a/drivers/infiniband/hw/qib/qib_iba7322.c
+++ b/drivers/infiniband/hw/qib/qib_iba7322.c
@@ -1644,7 +1644,6 @@ static noinline void handle_7322_errors(struct qib_devdata *dd)
 	u64 iserr = 0;
 	u64 errs;
 	u64 mask;
-	int log_idx;
 
 	qib_stats.sps_errints++;
 	errs = qib_read_kreg64(dd, kr_errstatus);
@@ -1662,10 +1661,7 @@ static noinline void handle_7322_errors(struct qib_devdata *dd)
 	if (errs & QIB_E_HARDWARE) {
 		*msg = '\0';
 		qib_7322_handle_hwerrors(dd, msg, sizeof(dd->cspec->emsgbuf));
-	} else
-		for (log_idx = 0; log_idx < QIB_EEP_LOG_CNT; ++log_idx)
-			if (errs & dd->eep_st_masks[log_idx].errs_to_log)
-				qib_inc_eeprom_err(dd, log_idx, 1);
+	}
 
 	if (errs & QIB_E_SPKTERRS) {
 		qib_disarm_7322_senderrbufs(dd->pport);
-- 
2.14.2

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

* [PATCH v2 39/45] IB/qib: Suppress gcc 7 fall-through complaints
       [not found] ` <20171011174927.25113-1-bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
                     ` (37 preceding siblings ...)
  2017-10-11 17:49   ` [PATCH v2 38/45] IB/qib: Remove remaining code related to writing the EEPROM Bart Van Assche
@ 2017-10-11 17:49   ` Bart Van Assche
  2017-10-11 17:49   ` [PATCH v2 40/45] IB/qib: Remove set-but-not-used variables Bart Van Assche
                     ` (6 subsequent siblings)
  45 siblings, 0 replies; 55+ messages in thread
From: Bart Van Assche @ 2017-10-11 17:49 UTC (permalink / raw)
  To: Doug Ledford; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Bart Van Assche

Avoid that gcc 7 reports the following warning when building with W=1:

warning: this statement may fall through [-Wimplicit-fallthrough=]

Signed-off-by: Bart Van Assche <bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
Acked-by: Mike Marciniszyn <infinipath-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
---
 drivers/infiniband/hw/qib/qib_mad.c  | 1 +
 drivers/infiniband/hw/qib/qib_rc.c   | 2 +-
 drivers/infiniband/hw/qib/qib_sdma.c | 2 +-
 3 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/infiniband/hw/qib/qib_mad.c b/drivers/infiniband/hw/qib/qib_mad.c
index 1237952c144e..04367e0f6f9b 100644
--- a/drivers/infiniband/hw/qib/qib_mad.c
+++ b/drivers/infiniband/hw/qib/qib_mad.c
@@ -434,6 +434,7 @@ static int check_mkey(struct qib_ibport *ibp, struct ib_smp *smp, int mad_flags)
 			/* Bad mkey not a violation below level 2 */
 			if (ibp->rvp.mkeyprot < 2)
 				break;
+			/* fall through */
 		case IB_MGMT_METHOD_SET:
 		case IB_MGMT_METHOD_TRAP_REPRESS:
 			if (ibp->rvp.mkey_violations != 0xFFFF)
diff --git a/drivers/infiniband/hw/qib/qib_rc.c b/drivers/infiniband/hw/qib/qib_rc.c
index e9a91736b12d..8f5754fb8579 100644
--- a/drivers/infiniband/hw/qib/qib_rc.c
+++ b/drivers/infiniband/hw/qib/qib_rc.c
@@ -1869,7 +1869,7 @@ void qib_rc_rcv(struct qib_ctxtdata *rcd, struct ib_header *hdr,
 		qp->r_rcv_len = 0;
 		if (opcode == OP(SEND_ONLY))
 			goto no_immediate_data;
-		/* FALLTHROUGH for SEND_ONLY_WITH_IMMEDIATE */
+		/* fall through -- for SEND_ONLY_WITH_IMMEDIATE */
 	case OP(SEND_LAST_WITH_IMMEDIATE):
 send_last_imm:
 		wc.ex.imm_data = ohdr->u.imm_data;
diff --git a/drivers/infiniband/hw/qib/qib_sdma.c b/drivers/infiniband/hw/qib/qib_sdma.c
index 891873b38a1e..c3690bd51582 100644
--- a/drivers/infiniband/hw/qib/qib_sdma.c
+++ b/drivers/infiniband/hw/qib/qib_sdma.c
@@ -808,7 +808,7 @@ void __qib_sdma_process_event(struct qib_pportdata *ppd,
 			 * bringing the link up with traffic active on
 			 * 7220, e.g. */
 			ss->go_s99_running = 1;
-			/* fall through and start dma engine */
+			/* fall through -- and start dma engine */
 		case qib_sdma_event_e10_go_hw_start:
 			/* This reference means the state machine is started */
 			sdma_get(&ppd->sdma_state);
-- 
2.14.2

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

* [PATCH v2 40/45] IB/qib: Remove set-but-not-used variables
       [not found] ` <20171011174927.25113-1-bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
                     ` (38 preceding siblings ...)
  2017-10-11 17:49   ` [PATCH v2 39/45] IB/qib: Suppress gcc 7 fall-through complaints Bart Van Assche
@ 2017-10-11 17:49   ` Bart Van Assche
  2017-10-11 17:49   ` [PATCH v2 41/45] RDMA/rdmavt: Suppress gcc 7 fall-through complaints Bart Van Assche
                     ` (5 subsequent siblings)
  45 siblings, 0 replies; 55+ messages in thread
From: Bart Van Assche @ 2017-10-11 17:49 UTC (permalink / raw)
  To: Doug Ledford; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Bart Van Assche

Signed-off-by: Bart Van Assche <bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
Tested-by: Mike Marciniszyn <mike.marciniszyn-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Acked-by: Mike Marciniszyn <mike.marciniszyn-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
---
 drivers/infiniband/hw/qib/qib_diag.c     |  6 ------
 drivers/infiniband/hw/qib/qib_file_ops.c |  9 ---------
 drivers/infiniband/hw/qib/qib_iba6120.c  |  2 --
 drivers/infiniband/hw/qib/qib_iba7220.c  |  3 ---
 drivers/infiniband/hw/qib/qib_iba7322.c  | 15 ++++-----------
 drivers/infiniband/hw/qib/qib_mad.c      |  3 +--
 drivers/infiniband/hw/qib/qib_pcie.c     |  3 +--
 drivers/infiniband/hw/qib/qib_sd7220.c   |  2 --
 drivers/infiniband/hw/qib/qib_tx.c       |  4 ----
 drivers/infiniband/hw/qib/qib_verbs.c    |  3 +--
 10 files changed, 7 insertions(+), 43 deletions(-)

diff --git a/drivers/infiniband/hw/qib/qib_diag.c b/drivers/infiniband/hw/qib/qib_diag.c
index 775018b32b0d..a9377eee8734 100644
--- a/drivers/infiniband/hw/qib/qib_diag.c
+++ b/drivers/infiniband/hw/qib/qib_diag.c
@@ -761,7 +761,6 @@ static ssize_t qib_diag_read(struct file *fp, char __user *data,
 {
 	struct qib_diag_client *dc = fp->private_data;
 	struct qib_devdata *dd = dc->dd;
-	void __iomem *kreg_base;
 	ssize_t ret;
 
 	if (dc->pid != current->pid) {
@@ -769,8 +768,6 @@ static ssize_t qib_diag_read(struct file *fp, char __user *data,
 		goto bail;
 	}
 
-	kreg_base = dd->kregbase;
-
 	if (count == 0)
 		ret = 0;
 	else if ((count % 4) || (*off % 4))
@@ -838,7 +835,6 @@ static ssize_t qib_diag_write(struct file *fp, const char __user *data,
 {
 	struct qib_diag_client *dc = fp->private_data;
 	struct qib_devdata *dd = dc->dd;
-	void __iomem *kreg_base;
 	ssize_t ret;
 
 	if (dc->pid != current->pid) {
@@ -846,8 +842,6 @@ static ssize_t qib_diag_write(struct file *fp, const char __user *data,
 		goto bail;
 	}
 
-	kreg_base = dd->kregbase;
-
 	if (count == 0)
 		ret = 0;
 	else if ((count % 4) || (*off % 4))
diff --git a/drivers/infiniband/hw/qib/qib_file_ops.c b/drivers/infiniband/hw/qib/qib_file_ops.c
index 9396c1807cc3..2d6a191afec0 100644
--- a/drivers/infiniband/hw/qib/qib_file_ops.c
+++ b/drivers/infiniband/hw/qib/qib_file_ops.c
@@ -696,15 +696,8 @@ static void qib_clean_part_key(struct qib_ctxtdata *rcd,
 			       struct qib_devdata *dd)
 {
 	int i, j, pchanged = 0;
-	u64 oldpkey;
 	struct qib_pportdata *ppd = rcd->ppd;
 
-	/* for debugging only */
-	oldpkey = (u64) ppd->pkeys[0] |
-		((u64) ppd->pkeys[1] << 16) |
-		((u64) ppd->pkeys[2] << 32) |
-		((u64) ppd->pkeys[3] << 48);
-
 	for (i = 0; i < ARRAY_SIZE(rcd->pkeys); i++) {
 		if (!rcd->pkeys[i])
 			continue;
@@ -1817,7 +1810,6 @@ static int qib_close(struct inode *in, struct file *fp)
 	struct qib_devdata *dd;
 	unsigned long flags;
 	unsigned ctxt;
-	pid_t pid;
 
 	mutex_lock(&qib_mutex);
 
@@ -1859,7 +1851,6 @@ static int qib_close(struct inode *in, struct file *fp)
 	spin_lock_irqsave(&dd->uctxt_lock, flags);
 	ctxt = rcd->ctxt;
 	dd->rcd[ctxt] = NULL;
-	pid = rcd->pid;
 	rcd->pid = 0;
 	spin_unlock_irqrestore(&dd->uctxt_lock, flags);
 
diff --git a/drivers/infiniband/hw/qib/qib_iba6120.c b/drivers/infiniband/hw/qib/qib_iba6120.c
index 3c5adfa104a0..3a0a28e10b86 100644
--- a/drivers/infiniband/hw/qib/qib_iba6120.c
+++ b/drivers/infiniband/hw/qib/qib_iba6120.c
@@ -1903,7 +1903,6 @@ static void qib_6120_put_tid_2(struct qib_devdata *dd, u64 __iomem *tidptr,
 			       u32 type, unsigned long pa)
 {
 	u32 __iomem *tidp32 = (u32 __iomem *)tidptr;
-	u32 tidx;
 
 	if (!dd->kregbase)
 		return;
@@ -1927,7 +1926,6 @@ static void qib_6120_put_tid_2(struct qib_devdata *dd, u64 __iomem *tidptr,
 		else /* for now, always full 4KB page */
 			pa |= 2 << 29;
 	}
-	tidx = tidptr - dd->egrtidbase;
 	writel(pa, tidp32);
 	mmiowb();
 }
diff --git a/drivers/infiniband/hw/qib/qib_iba7220.c b/drivers/infiniband/hw/qib/qib_iba7220.c
index ceb2259a5efb..d66d68e2cf24 100644
--- a/drivers/infiniband/hw/qib/qib_iba7220.c
+++ b/drivers/infiniband/hw/qib/qib_iba7220.c
@@ -3514,7 +3514,6 @@ static void autoneg_7220_work(struct work_struct *work)
 {
 	struct qib_pportdata *ppd;
 	struct qib_devdata *dd;
-	u64 startms;
 	u32 i;
 	unsigned long flags;
 
@@ -3522,8 +3521,6 @@ static void autoneg_7220_work(struct work_struct *work)
 			    autoneg_work.work)->pportdata;
 	dd = ppd->dd;
 
-	startms = jiffies_to_msecs(jiffies);
-
 	/*
 	 * Busy wait for this first part, it should be at most a
 	 * few hundred usec, since we scheduled ourselves for 2msec.
diff --git a/drivers/infiniband/hw/qib/qib_iba7322.c b/drivers/infiniband/hw/qib/qib_iba7322.c
index 77217fae9c06..b0413f9ecbe3 100644
--- a/drivers/infiniband/hw/qib/qib_iba7322.c
+++ b/drivers/infiniband/hw/qib/qib_iba7322.c
@@ -3431,7 +3431,6 @@ static void qib_setup_7322_interrupt(struct qib_devdata *dd, int clearpend)
 	for (i = 0; msixnum < dd->cspec->num_msix_entries; i++) {
 		irq_handler_t handler;
 		void *arg;
-		u64 val;
 		int lsb, reg, sh;
 #ifdef CONFIG_INFINIBAND_QIB_DCA
 		int dca = 0;
@@ -3502,8 +3501,8 @@ static void qib_setup_7322_interrupt(struct qib_devdata *dd, int clearpend)
 			mask &= ~(1ULL << lsb);
 			redirect[reg] |= ((u64) msixnum) << sh;
 		}
-		val = qib_read_kreg64(dd, 2 * msixnum + 1 +
-			(QIB_7322_MsixTable_OFFS / sizeof(u64)));
+		qib_read_kreg64(dd, 2 * msixnum + 1 +
+				(QIB_7322_MsixTable_OFFS / sizeof(u64)));
 		if (firstcpu < nr_cpu_ids &&
 			zalloc_cpumask_var(
 				&dd->cspec->msix_entries[msixnum].mask,
@@ -5358,16 +5357,11 @@ static void try_7322_autoneg(struct qib_pportdata *ppd)
 static void autoneg_7322_work(struct work_struct *work)
 {
 	struct qib_pportdata *ppd;
-	struct qib_devdata *dd;
-	u64 startms;
 	u32 i;
 	unsigned long flags;
 
 	ppd = container_of(work, struct qib_chippport_specific,
 			    autoneg_work.work)->ppd;
-	dd = ppd->dd;
-
-	startms = jiffies_to_msecs(jiffies);
 
 	/*
 	 * Busy wait for this first part, it should be at most a
@@ -7807,13 +7801,12 @@ static void ibsd_wr_allchans(struct qib_pportdata *ppd, int addr, unsigned data,
 {
 	struct qib_devdata *dd = ppd->dd;
 	int chan;
-	u32 rbc;
 
 	for (chan = 0; chan < SERDES_CHANS; ++chan) {
 		ahb_mod(dd, IBSD(ppd->hw_pidx), (chan + (chan >> 1)), addr,
 			data, mask);
-		rbc = ahb_mod(dd, IBSD(ppd->hw_pidx), (chan + (chan >> 1)),
-			      addr, 0, 0);
+		ahb_mod(dd, IBSD(ppd->hw_pidx), (chan + (chan >> 1)), addr,
+			0, 0);
 	}
 }
 
diff --git a/drivers/infiniband/hw/qib/qib_mad.c b/drivers/infiniband/hw/qib/qib_mad.c
index 04367e0f6f9b..841312f60dfd 100644
--- a/drivers/infiniband/hw/qib/qib_mad.c
+++ b/drivers/infiniband/hw/qib/qib_mad.c
@@ -280,7 +280,7 @@ static int subn_get_nodeinfo(struct ib_smp *smp, struct ib_device *ibdev,
 {
 	struct ib_node_info *nip = (struct ib_node_info *)&smp->data;
 	struct qib_devdata *dd = dd_from_ibdev(ibdev);
-	u32 vendor, majrev, minrev;
+	u32 majrev, minrev;
 	unsigned pidx = port - 1; /* IB number port from 1, hdw from 0 */
 
 	/* GUID 0 is illegal */
@@ -303,7 +303,6 @@ static int subn_get_nodeinfo(struct ib_smp *smp, struct ib_device *ibdev,
 	minrev = dd->minrev;
 	nip->revision = cpu_to_be32((majrev << 16) | minrev);
 	nip->local_port_num = port;
-	vendor = dd->vendorid;
 	nip->vendor_id[0] = QIB_SRC_OUI_1;
 	nip->vendor_id[1] = QIB_SRC_OUI_2;
 	nip->vendor_id[2] = QIB_SRC_OUI_3;
diff --git a/drivers/infiniband/hw/qib/qib_pcie.c b/drivers/infiniband/hw/qib/qib_pcie.c
index 6f4cc268926c..5ac7b31c346b 100644
--- a/drivers/infiniband/hw/qib/qib_pcie.c
+++ b/drivers/infiniband/hw/qib/qib_pcie.c
@@ -397,7 +397,6 @@ MODULE_PARM_DESC(pcie_coalesce, "tune PCIe colescing on some Intel chipsets");
  */
 static void qib_tune_pcie_coalesce(struct qib_devdata *dd)
 {
-	int r;
 	struct pci_dev *parent;
 	u16 devid;
 	u32 mask, bits, val;
@@ -452,7 +451,7 @@ static void qib_tune_pcie_coalesce(struct qib_devdata *dd)
 	pci_read_config_dword(parent, 0x48, &val);
 	val &= ~mask;
 	val |= bits;
-	r = pci_write_config_dword(parent, 0x48, val);
+	pci_write_config_dword(parent, 0x48, val);
 }
 
 /*
diff --git a/drivers/infiniband/hw/qib/qib_sd7220.c b/drivers/infiniband/hw/qib/qib_sd7220.c
index c72775f27212..ad52f7ac620c 100644
--- a/drivers/infiniband/hw/qib/qib_sd7220.c
+++ b/drivers/infiniband/hw/qib/qib_sd7220.c
@@ -755,7 +755,6 @@ static int qib_sd7220_ram_xfer(struct qib_devdata *dd, int sdnum, u32 loc,
 	int addr;
 	int ret;
 	unsigned long flags;
-	const char *op;
 
 	/* Pick appropriate transaction reg and "Chip select" for this serdes */
 	switch (sdnum) {
@@ -775,7 +774,6 @@ static int qib_sd7220_ram_xfer(struct qib_devdata *dd, int sdnum, u32 loc,
 		return -1;
 	}
 
-	op = rd_notwr ? "Rd" : "Wr";
 	spin_lock_irqsave(&dd->cspec->sdepb_lock, flags);
 
 	owned = epb_access(dd, sdnum, 1);
diff --git a/drivers/infiniband/hw/qib/qib_tx.c b/drivers/infiniband/hw/qib/qib_tx.c
index eface3b3dacf..c9537cfc12ce 100644
--- a/drivers/infiniband/hw/qib/qib_tx.c
+++ b/drivers/infiniband/hw/qib/qib_tx.c
@@ -179,8 +179,6 @@ void qib_disarm_piobufs_set(struct qib_devdata *dd, unsigned long *mask,
 		pppd[i] = NULL;
 
 	for (i = 0; i < cnt; i++) {
-		int which;
-
 		if (!test_bit(i, mask))
 			continue;
 		/*
@@ -201,9 +199,7 @@ void qib_disarm_piobufs_set(struct qib_devdata *dd, unsigned long *mask,
 		    (!test_bit(i << 1, dd->pioavailkernel) &&
 		     find_ctxt(dd, i))) {
 			__set_bit(i, dd->pio_need_disarm);
-			which = 0;
 		} else {
-			which = 1;
 			dd->f_sendctrl(dd->pport, QIB_SENDCTRL_DISARM_BUF(i));
 		}
 		spin_unlock_irqrestore(&dd->pioavail_lock, flags);
diff --git a/drivers/infiniband/hw/qib/qib_verbs.c b/drivers/infiniband/hw/qib/qib_verbs.c
index 9d92aeb8d9a1..46e2da09d05b 100644
--- a/drivers/infiniband/hw/qib/qib_verbs.c
+++ b/drivers/infiniband/hw/qib/qib_verbs.c
@@ -701,7 +701,7 @@ void qib_put_txreq(struct qib_verbs_txreq *tx)
  */
 void qib_verbs_sdma_desc_avail(struct qib_pportdata *ppd, unsigned avail)
 {
-	struct rvt_qp *qp, *nqp;
+	struct rvt_qp *qp;
 	struct qib_qp_priv *qpp, *nqpp;
 	struct rvt_qp *qps[20];
 	struct qib_ibdev *dev;
@@ -714,7 +714,6 @@ void qib_verbs_sdma_desc_avail(struct qib_pportdata *ppd, unsigned avail)
 	/* Search wait list for first QP wanting DMA descriptors. */
 	list_for_each_entry_safe(qpp, nqpp, &dev->dmawait, iowait) {
 		qp = qpp->owner;
-		nqp = nqpp->owner;
 		if (qp->port_num != ppd->port)
 			continue;
 		if (n == ARRAY_SIZE(qps))
-- 
2.14.2

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

* [PATCH v2 41/45] RDMA/rdmavt: Suppress gcc 7 fall-through complaints
       [not found] ` <20171011174927.25113-1-bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
                     ` (39 preceding siblings ...)
  2017-10-11 17:49   ` [PATCH v2 40/45] IB/qib: Remove set-but-not-used variables Bart Van Assche
@ 2017-10-11 17:49   ` Bart Van Assche
  2017-10-11 17:49   ` [PATCH v2 42/45] RDMA/rxe: " Bart Van Assche
                     ` (4 subsequent siblings)
  45 siblings, 0 replies; 55+ messages in thread
From: Bart Van Assche @ 2017-10-11 17:49 UTC (permalink / raw)
  To: Doug Ledford; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Bart Van Assche

Avoid that gcc 7 reports the following warning when building with W=1:

warning: this statement may fall through [-Wimplicit-fallthrough=]

Signed-off-by: Bart Van Assche <bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
Reviewed-by: Dennis Dalessandro <dennis.dalessandro-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
---
 drivers/infiniband/sw/rdmavt/qp.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/infiniband/sw/rdmavt/qp.c b/drivers/infiniband/sw/rdmavt/qp.c
index 22df09ae809e..efcff7056496 100644
--- a/drivers/infiniband/sw/rdmavt/qp.c
+++ b/drivers/infiniband/sw/rdmavt/qp.c
@@ -807,6 +807,7 @@ struct ib_qp *rvt_create_qp(struct ib_pd *ibpd,
 		if (init_attr->port_num == 0 ||
 		    init_attr->port_num > ibpd->device->phys_port_cnt)
 			return ERR_PTR(-EINVAL);
+		/* fall through */
 	case IB_QPT_UC:
 	case IB_QPT_RC:
 	case IB_QPT_UD:
-- 
2.14.2

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

* [PATCH v2 42/45] RDMA/rxe: Suppress gcc 7 fall-through complaints
       [not found] ` <20171011174927.25113-1-bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
                     ` (40 preceding siblings ...)
  2017-10-11 17:49   ` [PATCH v2 41/45] RDMA/rdmavt: Suppress gcc 7 fall-through complaints Bart Van Assche
@ 2017-10-11 17:49   ` Bart Van Assche
       [not found]     ` <20171011174927.25113-43-bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
  2017-10-11 17:49   ` [PATCH v2 43/45] RDMA/usnic: Make the compiler check declaration consistency during compilation Bart Van Assche
                     ` (3 subsequent siblings)
  45 siblings, 1 reply; 55+ messages in thread
From: Bart Van Assche @ 2017-10-11 17:49 UTC (permalink / raw)
  To: Doug Ledford
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Bart Van Assche, Moni Shoua

Avoid that gcc 7 reports the following warning when building with W=1:

warning: this statement may fall through [-Wimplicit-fallthrough=]

Signed-off-by: Bart Van Assche <bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
Reviewed-by: Leon Romanovsky <leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Cc: Moni Shoua <monis-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
---
 drivers/infiniband/sw/rxe/rxe_comp.c  | 4 ++--
 drivers/infiniband/sw/rxe/rxe_task.c  | 2 +-
 drivers/infiniband/sw/rxe/rxe_verbs.c | 1 +
 3 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/infiniband/sw/rxe/rxe_comp.c b/drivers/infiniband/sw/rxe/rxe_comp.c
index 9eb12c2e3c74..ff64875e3d15 100644
--- a/drivers/infiniband/sw/rxe/rxe_comp.c
+++ b/drivers/infiniband/sw/rxe/rxe_comp.c
@@ -270,8 +270,8 @@ static inline enum comp_state check_ack(struct rxe_qp *qp,
 		if ((syn & AETH_TYPE_MASK) != AETH_ACK)
 			return COMPST_ERROR;
 
-		/* Fall through (IB_OPCODE_RC_RDMA_READ_RESPONSE_MIDDLE
-		 * doesn't have an AETH)
+		/* fall through */
+		/* (IB_OPCODE_RC_RDMA_READ_RESPONSE_MIDDLE doesn't have an AETH)
 		 */
 	case IB_OPCODE_RC_RDMA_READ_RESPONSE_MIDDLE:
 		if (wqe->wr.opcode != IB_WR_RDMA_READ &&
diff --git a/drivers/infiniband/sw/rxe/rxe_task.c b/drivers/infiniband/sw/rxe/rxe_task.c
index ea3810b29273..08f05ac5f5d5 100644
--- a/drivers/infiniband/sw/rxe/rxe_task.c
+++ b/drivers/infiniband/sw/rxe/rxe_task.c
@@ -71,7 +71,7 @@ void rxe_do_task(unsigned long data)
 
 	case TASK_STATE_BUSY:
 		task->state = TASK_STATE_ARMED;
-		/* fall through to */
+		/* fall through */
 	case TASK_STATE_ARMED:
 		spin_unlock_irqrestore(&task->state_lock, flags);
 		return;
diff --git a/drivers/infiniband/sw/rxe/rxe_verbs.c b/drivers/infiniband/sw/rxe/rxe_verbs.c
index 0b362f49a10a..ff77f4f66970 100644
--- a/drivers/infiniband/sw/rxe/rxe_verbs.c
+++ b/drivers/infiniband/sw/rxe/rxe_verbs.c
@@ -644,6 +644,7 @@ static void init_send_wr(struct rxe_qp *qp, struct rxe_send_wr *wr,
 		switch (wr->opcode) {
 		case IB_WR_RDMA_WRITE_WITH_IMM:
 			wr->ex.imm_data = ibwr->ex.imm_data;
+			/* fall through */
 		case IB_WR_RDMA_READ:
 		case IB_WR_RDMA_WRITE:
 			wr->wr.rdma.remote_addr = rdma_wr(ibwr)->remote_addr;
-- 
2.14.2

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

* [PATCH v2 43/45] RDMA/usnic: Make the compiler check declaration consistency during compilation
       [not found] ` <20171011174927.25113-1-bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
                     ` (41 preceding siblings ...)
  2017-10-11 17:49   ` [PATCH v2 42/45] RDMA/rxe: " Bart Van Assche
@ 2017-10-11 17:49   ` Bart Van Assche
  2017-10-11 17:49   ` [PATCH v2 44/45] RDMA/usnic: Remove a set-but-not-used variable Bart Van Assche
                     ` (2 subsequent siblings)
  45 siblings, 0 replies; 55+ messages in thread
From: Bart Van Assche @ 2017-10-11 17:49 UTC (permalink / raw)
  To: Doug Ledford
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Bart Van Assche,
	Bart Van Assche, Christian Benvenuti, Dave Goodell

This patch avoids that sparse complains about missing declarations.

Signed-off-by: Bart Van Assche <bart.vanassche-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
Cc: Christian Benvenuti <benve-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
Cc: Dave Goodell <dgoodell-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
---
 drivers/infiniband/hw/usnic/usnic_ib_sysfs.c | 1 +
 drivers/infiniband/hw/usnic/usnic_ib_verbs.c | 1 +
 2 files changed, 2 insertions(+)

diff --git a/drivers/infiniband/hw/usnic/usnic_ib_sysfs.c b/drivers/infiniband/hw/usnic/usnic_ib_sysfs.c
index 32956f9f5715..685ef2293cb8 100644
--- a/drivers/infiniband/hw/usnic/usnic_ib_sysfs.c
+++ b/drivers/infiniband/hw/usnic/usnic_ib_sysfs.c
@@ -43,6 +43,7 @@
 #include "usnic_ib_qp_grp.h"
 #include "usnic_vnic.h"
 #include "usnic_ib_verbs.h"
+#include "usnic_ib_sysfs.h"
 #include "usnic_log.h"
 #include "usnic_ib_sysfs.h"
 
diff --git a/drivers/infiniband/hw/usnic/usnic_ib_verbs.c b/drivers/infiniband/hw/usnic/usnic_ib_verbs.c
index e4113ef09315..8372c32485ad 100644
--- a/drivers/infiniband/hw/usnic/usnic_ib_verbs.c
+++ b/drivers/infiniband/hw/usnic/usnic_ib_verbs.c
@@ -42,6 +42,7 @@
 #include "usnic_ib.h"
 #include "usnic_common_util.h"
 #include "usnic_ib_qp_grp.h"
+#include "usnic_ib_verbs.h"
 #include "usnic_fwd.h"
 #include "usnic_log.h"
 #include "usnic_uiom.h"
-- 
2.14.2

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

* [PATCH v2 44/45] RDMA/usnic: Remove a set-but-not-used variable
       [not found] ` <20171011174927.25113-1-bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
                     ` (42 preceding siblings ...)
  2017-10-11 17:49   ` [PATCH v2 43/45] RDMA/usnic: Make the compiler check declaration consistency during compilation Bart Van Assche
@ 2017-10-11 17:49   ` Bart Van Assche
  2017-10-11 17:49   ` [PATCH v2 45/45] RDMA/usnic: Instantiate data structures once Bart Van Assche
  2017-10-15  0:48   ` [PATCH v2 00/45] Address issues detected by static analysis tools Doug Ledford
  45 siblings, 0 replies; 55+ messages in thread
From: Bart Van Assche @ 2017-10-11 17:49 UTC (permalink / raw)
  To: Doug Ledford
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Bart Van Assche,
	Bart Van Assche, Christian Benvenuti, Dave Goodell

Signed-off-by: Bart Van Assche <bart.vanassche-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
Cc: Christian Benvenuti <benve-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
Cc: Dave Goodell <dgoodell-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
---
 drivers/infiniband/hw/usnic/usnic_ib_qp_grp.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/infiniband/hw/usnic/usnic_ib_qp_grp.c b/drivers/infiniband/hw/usnic/usnic_ib_qp_grp.c
index 092d4e11a633..912d8ef04352 100644
--- a/drivers/infiniband/hw/usnic/usnic_ib_qp_grp.c
+++ b/drivers/infiniband/hw/usnic/usnic_ib_qp_grp.c
@@ -392,14 +392,12 @@ int usnic_ib_qp_grp_modify(struct usnic_ib_qp_grp *qp_grp,
 				void *data)
 {
 	int status = 0;
-	int vnic_idx;
 	struct ib_event ib_event;
 	enum ib_qp_state old_state;
 	struct usnic_transport_spec *trans_spec;
 	struct usnic_ib_qp_grp_flow *qp_flow;
 
 	old_state = qp_grp->state;
-	vnic_idx = usnic_vnic_get_index(qp_grp->vf->vnic);
 	trans_spec = (struct usnic_transport_spec *) data;
 
 	spin_lock(&qp_grp->lock);
-- 
2.14.2

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

* [PATCH v2 45/45] RDMA/usnic: Instantiate data structures once
       [not found] ` <20171011174927.25113-1-bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
                     ` (43 preceding siblings ...)
  2017-10-11 17:49   ` [PATCH v2 44/45] RDMA/usnic: Remove a set-but-not-used variable Bart Van Assche
@ 2017-10-11 17:49   ` Bart Van Assche
  2017-10-15  0:48   ` [PATCH v2 00/45] Address issues detected by static analysis tools Doug Ledford
  45 siblings, 0 replies; 55+ messages in thread
From: Bart Van Assche @ 2017-10-11 17:49 UTC (permalink / raw)
  To: Doug Ledford
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Bart Van Assche,
	Bart Van Assche, Christian Benvenuti, Dave Goodell

Data structures should not be defined in a header file. Hence move
the min_transport_spec[] definition from a header file to a .c file.

Signed-off-by: Bart Van Assche <bart.vanassche-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
Cc: Christian Benvenuti <benve-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
Cc: Dave Goodell <dgoodell-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
---
 drivers/infiniband/hw/usnic/usnic_ib_qp_grp.h | 25 +------------------------
 drivers/infiniband/hw/usnic/usnic_ib_verbs.c  | 24 ++++++++++++++++++++++++
 2 files changed, 25 insertions(+), 24 deletions(-)

diff --git a/drivers/infiniband/hw/usnic/usnic_ib_qp_grp.h b/drivers/infiniband/hw/usnic/usnic_ib_qp_grp.h
index b1458be1d402..a8a2314c9531 100644
--- a/drivers/infiniband/hw/usnic/usnic_ib_qp_grp.h
+++ b/drivers/infiniband/hw/usnic/usnic_ib_qp_grp.h
@@ -84,30 +84,7 @@ struct usnic_ib_qp_grp_flow {
 	char				dentry_name[32];
 };
 
-static const struct
-usnic_vnic_res_spec min_transport_spec[USNIC_TRANSPORT_MAX] = {
-	{ /*USNIC_TRANSPORT_UNKNOWN*/
-		.resources = {
-			{.type = USNIC_VNIC_RES_TYPE_EOL,	.cnt = 0,},
-		},
-	},
-	{ /*USNIC_TRANSPORT_ROCE_CUSTOM*/
-		.resources = {
-			{.type = USNIC_VNIC_RES_TYPE_WQ,	.cnt = 1,},
-			{.type = USNIC_VNIC_RES_TYPE_RQ,	.cnt = 1,},
-			{.type = USNIC_VNIC_RES_TYPE_CQ,	.cnt = 1,},
-			{.type = USNIC_VNIC_RES_TYPE_EOL,	.cnt = 0,},
-		},
-	},
-	{ /*USNIC_TRANSPORT_IPV4_UDP*/
-		.resources = {
-			{.type = USNIC_VNIC_RES_TYPE_WQ,	.cnt = 1,},
-			{.type = USNIC_VNIC_RES_TYPE_RQ,	.cnt = 1,},
-			{.type = USNIC_VNIC_RES_TYPE_CQ,	.cnt = 1,},
-			{.type = USNIC_VNIC_RES_TYPE_EOL,	.cnt = 0,},
-		},
-	},
-};
+extern const struct usnic_vnic_res_spec min_transport_spec[USNIC_TRANSPORT_MAX];
 
 const char *usnic_ib_qp_grp_state_to_string(enum ib_qp_state state);
 int usnic_ib_qp_grp_dump_hdr(char *buf, int buf_sz);
diff --git a/drivers/infiniband/hw/usnic/usnic_ib_verbs.c b/drivers/infiniband/hw/usnic/usnic_ib_verbs.c
index 8372c32485ad..aa2456a4f9bd 100644
--- a/drivers/infiniband/hw/usnic/usnic_ib_verbs.c
+++ b/drivers/infiniband/hw/usnic/usnic_ib_verbs.c
@@ -51,6 +51,30 @@
 
 #define USNIC_DEFAULT_TRANSPORT USNIC_TRANSPORT_ROCE_CUSTOM
 
+const struct usnic_vnic_res_spec min_transport_spec[USNIC_TRANSPORT_MAX] = {
+	{ /*USNIC_TRANSPORT_UNKNOWN*/
+		.resources = {
+			{.type = USNIC_VNIC_RES_TYPE_EOL,	.cnt = 0,},
+		},
+	},
+	{ /*USNIC_TRANSPORT_ROCE_CUSTOM*/
+		.resources = {
+			{.type = USNIC_VNIC_RES_TYPE_WQ,	.cnt = 1,},
+			{.type = USNIC_VNIC_RES_TYPE_RQ,	.cnt = 1,},
+			{.type = USNIC_VNIC_RES_TYPE_CQ,	.cnt = 1,},
+			{.type = USNIC_VNIC_RES_TYPE_EOL,	.cnt = 0,},
+		},
+	},
+	{ /*USNIC_TRANSPORT_IPV4_UDP*/
+		.resources = {
+			{.type = USNIC_VNIC_RES_TYPE_WQ,	.cnt = 1,},
+			{.type = USNIC_VNIC_RES_TYPE_RQ,	.cnt = 1,},
+			{.type = USNIC_VNIC_RES_TYPE_CQ,	.cnt = 1,},
+			{.type = USNIC_VNIC_RES_TYPE_EOL,	.cnt = 0,},
+		},
+	},
+};
+
 static void usnic_ib_fw_string_to_u64(char *fw_ver_str, u64 *fw_ver)
 {
 	*fw_ver = *((u64 *)fw_ver_str);
-- 
2.14.2

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

* RE: [PATCH v2 12/45] RDMA/cxgb4: Remove the obsolete kernel module option 'c4iw_debug'
       [not found]     ` <20171011174927.25113-13-bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
@ 2017-10-11 17:51       ` Steve Wise
  0 siblings, 0 replies; 55+ messages in thread
From: Steve Wise @ 2017-10-11 17:51 UTC (permalink / raw)
  To: 'Bart Van Assche', 'Doug Ledford'
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA

> 
> This patch avoids that building the cxgb4 module with W=1 triggers
> a complaint about a local variable that has not been declared static.
> 
> Signed-off-by: Bart Van Assche <bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
> Cc: Steve Wise <swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>

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

* RE: [PATCH v2 28/45] IB/nes: Suppress gcc 7 fall-through complaints
       [not found]     ` <20171011174927.25113-29-bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
@ 2017-10-11 18:11       ` Latif, Faisal
  0 siblings, 0 replies; 55+ messages in thread
From: Latif, Faisal @ 2017-10-11 18:11 UTC (permalink / raw)
  To: Bart Van Assche, Doug Ledford; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA

>-----Original Message-----
>From: Bart Van Assche [mailto:bart.vanassche-Sjgp3cTcYWE@public.gmane.org]
>Sent: Wednesday, October 11, 2017 12:49 PM
>To: Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
>Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org; Bart Van Assche <bart.vanassche-Sjgp3cTcYWE@public.gmane.org>;
>Latif, Faisal <faisal.latif-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
>Subject: [PATCH v2 28/45] IB/nes: Suppress gcc 7 fall-through complaints
>
>Avoid that gcc 7 reports the following warning when building with W=1:
>
>warning: this statement may fall through [-Wimplicit-fallthrough=]
>
>Signed-off-by: Bart Van Assche <bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
>Cc: Faisal Latif <faisal.latif-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
>---
> drivers/infiniband/hw/nes/nes_cm.c | 1 +
>drivers/infiniband/hw/nes/nes_hw.c | 2 +-
> 2 files changed, 2 insertions(+), 1 deletion(-)
>
>diff --git a/drivers/infiniband/hw/nes/nes_cm.c
>b/drivers/infiniband/hw/nes/nes_cm.c
>index de4025deaa4a..a5f6dffef07a 100644
>--- a/drivers/infiniband/hw/nes/nes_cm.c
>+++ b/drivers/infiniband/hw/nes/nes_cm.c
>@@ -1768,6 +1768,7 @@ static void handle_rst_pkt(struct nes_cm_node
>*cm_node, struct sk_buff *skb,
> 	case NES_CM_STATE_FIN_WAIT1:
> 	case NES_CM_STATE_LAST_ACK:
> 		cm_node->cm_id->rem_ref(cm_node->cm_id);
>+		/* fall through */
> 	case NES_CM_STATE_TIME_WAIT:
> 		cm_node->state = NES_CM_STATE_CLOSED;
> 		rem_ref_cm_node(cm_node->cm_core, cm_node); diff --git
>a/drivers/infiniband/hw/nes/nes_hw.c b/drivers/infiniband/hw/nes/nes_hw.c
>index 812b59d8f13c..c392f83c0629 100644
>--- a/drivers/infiniband/hw/nes/nes_hw.c
>+++ b/drivers/infiniband/hw/nes/nes_hw.c
>@@ -3632,7 +3632,7 @@ static void nes_process_iwarp_aeqe(struct
>nes_device *nesdev,
> 				aeq_info |=
>NES_AEQE_AEID_RDMAP_ROE_UNEXPECTED_OPCODE;
> 				aeqe->aeqe_words[NES_AEQE_MISC_IDX] =
>cpu_to_le32(aeq_info);
> 			}
>-
>+			/* fall through */
> 		case NES_AEQE_AEID_RDMAP_ROE_BAD_LLP_CLOSE:
> 		case NES_AEQE_AEID_LLP_TOO_MANY_RETRIES:
> 		case
>NES_AEQE_AEID_DDP_UBE_INVALID_MSN_NO_BUFFER_AVAILABLE:
>--
>2.14.2

Acked-by: Faisal Latif <fasial.latif-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] 55+ messages in thread

* RE: [PATCH v2 29/45] IB/nes: Remove set-but-not-used variables
       [not found]     ` <20171011174927.25113-30-bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
@ 2017-10-11 18:12       ` Latif, Faisal
  0 siblings, 0 replies; 55+ messages in thread
From: Latif, Faisal @ 2017-10-11 18:12 UTC (permalink / raw)
  To: Bart Van Assche, Doug Ledford; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA

>-----Original Message-----
>From: Bart Van Assche [mailto:bart.vanassche-Sjgp3cTcYWE@public.gmane.org]
>Sent: Wednesday, October 11, 2017 12:49 PM
>To: Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
>Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org; Bart Van Assche <bart.vanassche-Sjgp3cTcYWE@public.gmane.org>;
>Latif, Faisal <faisal.latif-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
>Subject: [PATCH v2 29/45] IB/nes: Remove set-but-not-used variables
>
>This patch does not change any functionality.
>
>Signed-off-by: Bart Van Assche <bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
>Cc: Faisal Latif <faisal.latif-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
>---
> drivers/infiniband/hw/nes/nes_cm.c    | 8 --------
> drivers/infiniband/hw/nes/nes_utils.c | 5 ++---
> 2 files changed, 2 insertions(+), 11 deletions(-)
>
>diff --git a/drivers/infiniband/hw/nes/nes_cm.c
>b/drivers/infiniband/hw/nes/nes_cm.c
>index a5f6dffef07a..bfe2156813b1 100644
>--- a/drivers/infiniband/hw/nes/nes_cm.c
>+++ b/drivers/infiniband/hw/nes/nes_cm.c
>@@ -1389,7 +1389,6 @@ static int nes_addr_resolve_neigh(struct nes_vnic
>*nesvnic, u32 dst_ip, int arpi
> 	struct rtable *rt;
> 	struct neighbour *neigh;
> 	int rc = arpindex;
>-	struct net_device *netdev;
> 	struct nes_adapter *nesadapter = nesvnic->nesdev->nesadapter;
> 	__be32 dst_ipaddr = htonl(dst_ip);
>
>@@ -1400,11 +1399,6 @@ static int nes_addr_resolve_neigh(struct nes_vnic
>*nesvnic, u32 dst_ip, int arpi
> 		return rc;
> 	}
>
>-	if (netif_is_bond_slave(nesvnic->netdev))
>-		netdev = netdev_master_upper_dev_get(nesvnic->netdev);
>-	else
>-		netdev = nesvnic->netdev;
>-
> 	neigh = dst_neigh_lookup(&rt->dst, &dst_ipaddr);
>
> 	rcu_read_lock();
>@@ -3075,7 +3069,6 @@ int nes_accept(struct iw_cm_id *cm_id, struct
>iw_cm_conn_param *conn_param)
> 	u32 crc_value;
> 	int ret;
> 	int passive_state;
>-	struct nes_ib_device *nesibdev;
> 	struct ib_mr *ibmr = NULL;
> 	struct nes_pd *nespd;
> 	u64 tagged_offset;
>@@ -3158,7 +3151,6 @@ int nes_accept(struct iw_cm_id *cm_id, struct
>iw_cm_conn_param *conn_param)
>
> 	if (raddr->sin_addr.s_addr != laddr->sin_addr.s_addr) {
> 		u64temp = (unsigned long)nesqp;
>-		nesibdev = nesvnic->nesibdev;
> 		nespd = nesqp->nespd;
> 		tagged_offset = (u64)(unsigned long)*start_buff;
> 		ibmr = nes_reg_phys_mr(&nespd->ibpd,
>diff --git a/drivers/infiniband/hw/nes/nes_utils.c
>b/drivers/infiniband/hw/nes/nes_utils.c
>index 7b67e9cb57ed..0613eb5006cc 100644
>--- a/drivers/infiniband/hw/nes/nes_utils.c
>+++ b/drivers/infiniband/hw/nes/nes_utils.c
>@@ -753,7 +753,6 @@ void nes_mh_fix(unsigned long parm)
> 	u32 mac_tx_frames_low;
> 	u32 mac_tx_frames_high;
> 	u32 mac_tx_pauses;
>-	u32 serdes_status;
> 	u32 reset_value;
> 	u32 tx_control;
> 	u32 tx_config;
>@@ -846,7 +845,7 @@ void nes_mh_fix(unsigned long parm)
> 		}
>
> 		nes_write_indexed(nesdev,
>NES_IDX_ETH_SERDES_COMMON_CONTROL0, 0x00000008);
>-		serdes_status = nes_read_indexed(nesdev,
>NES_IDX_ETH_SERDES_COMMON_STATUS0);
>+		nes_read_indexed(nesdev,
>NES_IDX_ETH_SERDES_COMMON_STATUS0);
>
> 		nes_write_indexed(nesdev, NES_IDX_ETH_SERDES_TX_EMP0,
>0x000bdef7);
> 		nes_write_indexed(nesdev,
>NES_IDX_ETH_SERDES_TX_DRIVE0, 0x9ce73000); @@ -859,7 +858,7 @@ void
>nes_mh_fix(unsigned long parm)
> 		} else {
> 			nes_write_indexed(nesdev,
>NES_IDX_ETH_SERDES_RX_EQ_CONTROL0, 0xf0042222);
> 		}
>-		serdes_status = nes_read_indexed(nesdev,
>NES_IDX_ETH_SERDES_RX_EQ_STATUS0);
>+		nes_read_indexed(nesdev,
>NES_IDX_ETH_SERDES_RX_EQ_STATUS0);
> 		nes_write_indexed(nesdev,
>NES_IDX_ETH_SERDES_CDR_CONTROL0, 0x000000ff);
>
> 		nes_write_indexed(nesdev, NES_IDX_MAC_TX_CONTROL,
>tx_control);
>--
>2.14.2
Acked-by: Faisal Latif <fasial.latif-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] 55+ messages in thread

* RE: [PATCH v2 30/45] IB/nes: Fix a race condition in nes_inetaddr_event()
       [not found]     ` <20171011174927.25113-31-bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
@ 2017-10-11 18:13       ` Latif, Faisal
  0 siblings, 0 replies; 55+ messages in thread
From: Latif, Faisal @ 2017-10-11 18:13 UTC (permalink / raw)
  To: Bart Van Assche, Doug Ledford; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA

>From: Bart Van Assche [mailto:bart.vanassche-Sjgp3cTcYWE@public.gmane.org]
>Sent: Wednesday, October 11, 2017 12:49 PM
>To: Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
>Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org; Bart Van Assche <bart.vanassche-Sjgp3cTcYWE@public.gmane.org>;
>Latif, Faisal <faisal.latif-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
>Subject: [PATCH v2 30/45] IB/nes: Fix a race condition in nes_inetaddr_event()
>
>This patch has been compile-tested only.
>
>Signed-off-by: Bart Van Assche <bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
>Cc: Faisal Latif <faisal.latif-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
>---
> drivers/infiniband/hw/nes/nes.c | 13 +++++++++----
> 1 file changed, 9 insertions(+), 4 deletions(-)
>
>diff --git a/drivers/infiniband/hw/nes/nes.c b/drivers/infiniband/hw/nes/nes.c
>index ff58dfa071b8..42b68aa999fc 100644
>--- a/drivers/infiniband/hw/nes/nes.c
>+++ b/drivers/infiniband/hw/nes/nes.c
>@@ -178,11 +178,16 @@ static int nes_inetaddr_event(struct notifier_block
>*notifier,
> 					/* fall through */
> 				case NETDEV_CHANGEADDR:
> 					/* Add the address to the IP table */
>-					if (upper_dev)
>-						nesvnic->local_ipaddr =
>-							((struct in_device
>*)upper_dev->ip_ptr)->ifa_list->ifa_address;
>-					else
>+					if (upper_dev) {
>+						struct in_device *in;
>+
>+						rcu_read_lock();
>+						in =
>__in_dev_get_rcu(upper_dev);
>+						nesvnic->local_ipaddr = in-
>>ifa_list->ifa_address;
>+						rcu_read_unlock();
>+					} else {
> 						nesvnic->local_ipaddr = ifa-
>>ifa_address;
>+					}
>
> 					nes_write_indexed(nesdev,
>
>	NES_IDX_DST_IP_ADDR+(0x10*PCI_FUNC(nesdev->pcidev->devfn)),
>--
>2.14.2
Acked-by: Faisal Latif <fasial.latif-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] 55+ messages in thread

* RE: [PATCH v2 27/45] IB/nes: Fix indentation
       [not found]     ` <20171011174927.25113-28-bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
@ 2017-10-11 18:14       ` Latif, Faisal
  0 siblings, 0 replies; 55+ messages in thread
From: Latif, Faisal @ 2017-10-11 18:14 UTC (permalink / raw)
  To: Bart Van Assche, Doug Ledford; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA

>From: Bart Van Assche [mailto:bart.vanassche-Sjgp3cTcYWE@public.gmane.org]
>Sent: Wednesday, October 11, 2017 12:49 PM
>To: Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
>Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org; Bart Van Assche <bart.vanassche-Sjgp3cTcYWE@public.gmane.org>;
>Latif, Faisal <faisal.latif-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
>Subject: [PATCH v2 27/45] IB/nes: Fix indentation
>
>Signed-off-by: Bart Van Assche <bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
>Cc: Faisal Latif <faisal.latif-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
>---
> drivers/infiniband/hw/nes/nes.c       | 22 +++++++++++-----------
> drivers/infiniband/hw/nes/nes_hw.c    |  5 +++--
> drivers/infiniband/hw/nes/nes_nic.c   |  9 ++++-----
> drivers/infiniband/hw/nes/nes_utils.c |  8 ++++----
>drivers/infiniband/hw/nes/nes_verbs.c | 12 ++++++------
> 5 files changed, 28 insertions(+), 28 deletions(-)
>
>diff --git a/drivers/infiniband/hw/nes/nes.c b/drivers/infiniband/hw/nes/nes.c
>index 942ca84713c9..ff58dfa071b8 100644
>--- a/drivers/infiniband/hw/nes/nes.c
>+++ b/drivers/infiniband/hw/nes/nes.c
>@@ -757,18 +757,18 @@ static void nes_remove(struct pci_dev *pcidev)
> 	int netdev_index = 0;
> 	unsigned long flags;
>
>-		if (nesdev->netdev_count) {
>-			netdev = nesdev->netdev[netdev_index];
>-			if (netdev) {
>-				netif_stop_queue(netdev);
>-				unregister_netdev(netdev);
>-				nes_netdev_destroy(netdev);
>-
>-				nesdev->netdev[netdev_index] = NULL;
>-				nesdev->netdev_count--;
>-				nesdev->nesadapter->netdev_count--;
>-			}
>+	if (nesdev->netdev_count) {
>+		netdev = nesdev->netdev[netdev_index];
>+		if (netdev) {
>+			netif_stop_queue(netdev);
>+			unregister_netdev(netdev);
>+			nes_netdev_destroy(netdev);
>+
>+			nesdev->netdev[netdev_index] = NULL;
>+			nesdev->netdev_count--;
>+			nesdev->nesadapter->netdev_count--;
> 		}
>+	}
>
> 	nes_notifiers_registered--;
> 	if (nes_notifiers_registered == 0) {
>diff --git a/drivers/infiniband/hw/nes/nes_hw.c
>b/drivers/infiniband/hw/nes/nes_hw.c
>index b0adf65e4bdb..812b59d8f13c 100644
>--- a/drivers/infiniband/hw/nes/nes_hw.c
>+++ b/drivers/infiniband/hw/nes/nes_hw.c
>@@ -1861,8 +1861,9 @@ int nes_init_nic_qp(struct nes_device *nesdev,
>struct net_device *netdev)
> 	}
> 	if ((nesdev->nesadapter->allow_unaligned_fpdus) &&
> 		(nes_init_mgt_qp(nesdev, netdev, nesvnic))) {
>-			nes_debug(NES_DBG_INIT, "%s: Out of memory for
>pau nic\n", netdev->name);
>-			nes_destroy_nic_qp(nesvnic);
>+		nes_debug(NES_DBG_INIT, "%s: Out of memory for pau nic\n",
>+			  netdev->name);
>+		nes_destroy_nic_qp(nesvnic);
> 		return -ENOMEM;
> 	}
>
>diff --git a/drivers/infiniband/hw/nes/nes_nic.c
>b/drivers/infiniband/hw/nes/nes_nic.c
>index 5921ea3d50ae..6977fcfcbb76 100644
>--- a/drivers/infiniband/hw/nes/nes_nic.c
>+++ b/drivers/infiniband/hw/nes/nes_nic.c
>@@ -926,11 +926,10 @@ static void nes_netdev_set_multicast_list(struct
>net_device *netdev)
> 				nesadapter->pft_mcast_map[mc_index] !=
> 					nesvnic->nic_index &&
> 					mc_index < max_pft_entries_avaiable)
>{
>-						nes_debug(NES_DBG_NIC_RX,
>-					"mc_index=%d skipping nic_index=%d,
>"
>-					"used for=%d \n", mc_index,
>-					nesvnic->nic_index,
>-					nesadapter-
>>pft_mcast_map[mc_index]);
>+				nes_debug(NES_DBG_NIC_RX,
>+					  "mc_index=%d skipping
>nic_index=%d, used for=%d\n",
>+					  mc_index, nesvnic->nic_index,
>+					  nesadapter-
>>pft_mcast_map[mc_index]);
> 				mc_index++;
> 			}
> 			if (mc_index >= max_pft_entries_avaiable) diff --git
>a/drivers/infiniband/hw/nes/nes_utils.c
>b/drivers/infiniband/hw/nes/nes_utils.c
>index 37331e2fdc5f..7b67e9cb57ed 100644
>--- a/drivers/infiniband/hw/nes/nes_utils.c
>+++ b/drivers/infiniband/hw/nes/nes_utils.c
>@@ -888,10 +888,10 @@ void nes_clc(unsigned long parm)
> 	struct nes_adapter *nesadapter = nesdev->nesadapter;
>
> 	spin_lock_irqsave(&nesadapter->phy_lock, flags);
>-    nesadapter->link_interrupt_count[0] = 0;
>-    nesadapter->link_interrupt_count[1] = 0;
>-    nesadapter->link_interrupt_count[2] = 0;
>-    nesadapter->link_interrupt_count[3] = 0;
>+	nesadapter->link_interrupt_count[0] = 0;
>+	nesadapter->link_interrupt_count[1] = 0;
>+	nesadapter->link_interrupt_count[2] = 0;
>+	nesadapter->link_interrupt_count[3] = 0;
> 	spin_unlock_irqrestore(&nesadapter->phy_lock, flags);
>
> 	nesadapter->lc_timer.expires = jiffies + 3600 * HZ;  /* 1 hour */ diff --git
>a/drivers/infiniband/hw/nes/nes_verbs.c
>b/drivers/infiniband/hw/nes/nes_verbs.c
>index f0dc5f4aa177..6abe90b58c91 100644
>--- a/drivers/infiniband/hw/nes/nes_verbs.c
>+++ b/drivers/infiniband/hw/nes/nes_verbs.c
>@@ -2865,11 +2865,11 @@ int nes_modify_qp(struct ib_qp *ibqp, struct
>ib_qp_attr *attr,
>
> 				next_iwarp_state =
>NES_CQP_QP_IWARP_STATE_ERROR;
> 				/* next_iwarp_state =
>(NES_CQP_QP_IWARP_STATE_TERMINATE | 0x02000000); */
>-					if (nesqp->hte_added) {
>-
>	nes_debug(NES_DBG_MOD_QP, "set CQP_QP_DEL_HTE\n");
>-						next_iwarp_state |=
>NES_CQP_QP_DEL_HTE;
>-						nesqp->hte_added = 0;
>-					}
>+				if (nesqp->hte_added) {
>+					nes_debug(NES_DBG_MOD_QP, "set
>CQP_QP_DEL_HTE\n");
>+					next_iwarp_state |=
>NES_CQP_QP_DEL_HTE;
>+					nesqp->hte_added = 0;
>+				}
> 				if ((nesqp->hw_tcp_state >
>NES_AEQE_TCP_STATE_CLOSED) &&
> 						(nesdev->iw_status) &&
> 						(nesqp->hw_tcp_state !=
>NES_AEQE_TCP_STATE_TIME_WAIT)) { @@ -3560,7 +3560,7 @@ static int
>nes_poll_cq(struct ib_cq *ibcq, int num_entries, struct ib_wc *entry)
> 				entry->byte_len =
>le32_to_cpu(cqe.cqe_words[NES_CQE_PAYLOAD_LENGTH_IDX]);
> 				wrid = ((u64)(le32_to_cpu(nesqp-
>>hwqp.rq_vbase[wqe_index].wqe_words[NES_IWARP_RQ_WQE_COMP_SCRA
>TCH_LOW_IDX]))) |
> 					((u64)(le32_to_cpu(nesqp-
>>hwqp.rq_vbase[wqe_index].wqe_words[NES_IWARP_RQ_WQE_COMP_SCRA
>TCH_HIGH_IDX]))<<32);
>-					entry->opcode = IB_WC_RECV;
>+				entry->opcode = IB_WC_RECV;
>
> 				nesqp->hwqp.rq_tail =
>(wqe_index+1)&(nesqp->hwqp.rq_size - 1);
> 				if ((entry->status != IB_WC_SUCCESS) &&
>(nesqp->hwqp.rq_tail != nesqp->hwqp.rq_head)) {
>--
>2.14.2
Acked-by: Faisal Latif <fasial.latif-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] 55+ messages in thread

* Re: [PATCH v2 19/45] IB/hns: Declare local functions 'static'
       [not found]     ` <20171011174927.25113-20-bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
@ 2017-10-12  1:12       ` Wei Hu (Xavier)
  0 siblings, 0 replies; 55+ messages in thread
From: Wei Hu (Xavier) @ 2017-10-12  1:12 UTC (permalink / raw)
  To: Bart Van Assche, Doug Ledford
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Lijun Ou, Shaobo Xu

Acked-by: Wei Hu (Xavier) <xavier.huwei-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>

On 2017/10/12 1:49, Bart Van Assche wrote:
> Signed-off-by: Bart Van Assche <bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
> Cc: Lijun Ou <oulijun-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
> Cc: Wei Hu (Xavier) <xavier.huwei-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
> Cc: Shaobo Xu <xushaobo2-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
> ---
>   drivers/infiniband/hw/hns/hns_roce_hw_v1.c | 64 ++++++++++++++++--------------
>   1 file changed, 35 insertions(+), 29 deletions(-)
>
> diff --git a/drivers/infiniband/hw/hns/hns_roce_hw_v1.c b/drivers/infiniband/hw/hns/hns_roce_hw_v1.c
> index 187241484fa1..658e3a7464b3 100644
> --- a/drivers/infiniband/hw/hns/hns_roce_hw_v1.c
> +++ b/drivers/infiniband/hw/hns/hns_roce_hw_v1.c
> @@ -57,8 +57,8 @@ static void set_raddr_seg(struct hns_roce_wqe_raddr_seg *rseg, u64 remote_addr,
>   	rseg->len   = 0;
>   }
>   
> -int hns_roce_v1_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr,
> -			  struct ib_send_wr **bad_wr)
> +static int hns_roce_v1_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr,
> +				 struct ib_send_wr **bad_wr)
>   {
>   	struct hns_roce_dev *hr_dev = to_hr_dev(ibqp->device);
>   	struct hns_roce_ah *ah = to_hr_ah(ud_wr(wr)->ah);
> @@ -317,8 +317,8 @@ int hns_roce_v1_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr,
>   	return ret;
>   }
>   
> -int hns_roce_v1_post_recv(struct ib_qp *ibqp, struct ib_recv_wr *wr,
> -			  struct ib_recv_wr **bad_wr)
> +static int hns_roce_v1_post_recv(struct ib_qp *ibqp, struct ib_recv_wr *wr,
> +				 struct ib_recv_wr **bad_wr)
>   {
>   	int ret = 0;
>   	int nreq = 0;
> @@ -877,7 +877,7 @@ static int hns_roce_db_init(struct hns_roce_dev *hr_dev)
>   	return 0;
>   }
>   
> -void hns_roce_v1_recreate_lp_qp_work_fn(struct work_struct *work)
> +static void hns_roce_v1_recreate_lp_qp_work_fn(struct work_struct *work)
>   {
>   	struct hns_roce_recreate_lp_qp_work *lp_qp_work;
>   	struct hns_roce_dev *hr_dev;
> @@ -1033,7 +1033,8 @@ static void hns_roce_v1_mr_free_work_fn(struct work_struct *work)
>   	kfree(mr_work);
>   }
>   
> -int hns_roce_v1_dereg_mr(struct hns_roce_dev *hr_dev, struct hns_roce_mr *mr)
> +static int hns_roce_v1_dereg_mr(struct hns_roce_dev *hr_dev,
> +				struct hns_roce_mr *mr)
>   {
>   	struct device *dev = &hr_dev->pdev->dev;
>   	struct hns_roce_mr_free_work *mr_work;
> @@ -1391,7 +1392,7 @@ static void hns_roce_free_mr_free(struct hns_roce_dev *hr_dev)
>    * @enable: true -- drop reset, false -- reset
>    * return 0 - success , negative --fail
>    */
> -int hns_roce_v1_reset(struct hns_roce_dev *hr_dev, bool dereset)
> +static int hns_roce_v1_reset(struct hns_roce_dev *hr_dev, bool dereset)
>   {
>   	struct device_node *dsaf_node;
>   	struct device *dev = &hr_dev->pdev->dev;
> @@ -1466,7 +1467,7 @@ static void hns_roce_des_qp_free(struct hns_roce_dev *hr_dev)
>   	destroy_workqueue(des_qp->qp_wq);
>   }
>   
> -int hns_roce_v1_profile(struct hns_roce_dev *hr_dev)
> +static int hns_roce_v1_profile(struct hns_roce_dev *hr_dev)
>   {
>   	int i = 0;
>   	struct hns_roce_caps *caps = &hr_dev->caps;
> @@ -1538,7 +1539,7 @@ int hns_roce_v1_profile(struct hns_roce_dev *hr_dev)
>   	return 0;
>   }
>   
> -int hns_roce_v1_init(struct hns_roce_dev *hr_dev)
> +static int hns_roce_v1_init(struct hns_roce_dev *hr_dev)
>   {
>   	int ret;
>   	u32 val;
> @@ -1617,7 +1618,7 @@ int hns_roce_v1_init(struct hns_roce_dev *hr_dev)
>   	return ret;
>   }
>   
> -void hns_roce_v1_exit(struct hns_roce_dev *hr_dev)
> +static void hns_roce_v1_exit(struct hns_roce_dev *hr_dev)
>   {
>   	hns_roce_port_enable(hr_dev, HNS_ROCE_PORT_DOWN);
>   	hns_roce_free_mr_free(hr_dev);
> @@ -1701,8 +1702,8 @@ static int hns_roce_v1_chk_mbox(struct hns_roce_dev *hr_dev,
>   	return 0;
>   }
>   
> -void hns_roce_v1_set_gid(struct hns_roce_dev *hr_dev, u8 port, int gid_index,
> -			 union ib_gid *gid)
> +static void hns_roce_v1_set_gid(struct hns_roce_dev *hr_dev, u8 port,
> +				int gid_index, union ib_gid *gid)
>   {
>   	u32 *p = NULL;
>   	u8 gid_idx = 0;
> @@ -1765,8 +1766,8 @@ static int hns_roce_v1_set_mac(struct hns_roce_dev *hr_dev, u8 phy_port,
>   	return 0;
>   }
>   
> -void hns_roce_v1_set_mtu(struct hns_roce_dev *hr_dev, u8 phy_port,
> -			 enum ib_mtu mtu)
> +static void hns_roce_v1_set_mtu(struct hns_roce_dev *hr_dev, u8 phy_port,
> +				enum ib_mtu mtu)
>   {
>   	u32 val;
>   
> @@ -1778,8 +1779,8 @@ void hns_roce_v1_set_mtu(struct hns_roce_dev *hr_dev, u8 phy_port,
>   		   val);
>   }
>   
> -int hns_roce_v1_write_mtpt(void *mb_buf, struct hns_roce_mr *mr,
> -			   unsigned long mtpt_idx)
> +static int hns_roce_v1_write_mtpt(void *mb_buf, struct hns_roce_mr *mr,
> +				  unsigned long mtpt_idx)
>   {
>   	struct hns_roce_v1_mpt_entry *mpt_entry;
>   	struct scatterlist *sg;
> @@ -1951,7 +1952,7 @@ static struct hns_roce_cqe *next_cqe_sw(struct hns_roce_cq *hr_cq)
>   	return get_sw_cqe(hr_cq, hr_cq->cons_index);
>   }
>   
> -void hns_roce_v1_cq_set_ci(struct hns_roce_cq *hr_cq, u32 cons_index)
> +static void hns_roce_v1_cq_set_ci(struct hns_roce_cq *hr_cq, u32 cons_index)
>   {
>   	u32 doorbell[2];
>   
> @@ -2024,9 +2025,10 @@ static void hns_roce_v1_cq_clean(struct hns_roce_cq *hr_cq, u32 qpn,
>   	spin_unlock_irq(&hr_cq->lock);
>   }
>   
> -void hns_roce_v1_write_cqc(struct hns_roce_dev *hr_dev,
> -			   struct hns_roce_cq *hr_cq, void *mb_buf, u64 *mtts,
> -			   dma_addr_t dma_handle, int nent, u32 vector)
> +static void hns_roce_v1_write_cqc(struct hns_roce_dev *hr_dev,
> +				  struct hns_roce_cq *hr_cq, void *mb_buf,
> +				  u64 *mtts, dma_addr_t dma_handle, int nent,
> +				  u32 vector)
>   {
>   	struct hns_roce_cq_context *cq_context = NULL;
>   	struct hns_roce_buf_list *tptr_buf;
> @@ -2111,7 +2113,8 @@ void hns_roce_v1_write_cqc(struct hns_roce_dev *hr_dev,
>   	cq_context->cqc_byte_32 = cpu_to_le32(cq_context->cqc_byte_32);
>   }
>   
> -int hns_roce_v1_req_notify_cq(struct ib_cq *ibcq, enum ib_cq_notify_flags flags)
> +static int hns_roce_v1_req_notify_cq(struct ib_cq *ibcq,
> +				     enum ib_cq_notify_flags flags)
>   {
>   	struct hns_roce_cq *hr_cq = to_hr_cq(ibcq);
>   	u32 notification_flag;
> @@ -2372,8 +2375,9 @@ int hns_roce_v1_poll_cq(struct ib_cq *ibcq, int num_entries, struct ib_wc *wc)
>   		return ret;
>   }
>   
> -int hns_roce_v1_clear_hem(struct hns_roce_dev *hr_dev,
> -		struct hns_roce_hem_table *table, int obj, int step_idx)
> +static int hns_roce_v1_clear_hem(struct hns_roce_dev *hr_dev,
> +				 struct hns_roce_hem_table *table, int obj,
> +				 int step_idx)
>   {
>   	struct device *dev = &hr_dev->pdev->dev;
>   	struct hns_roce_v1_priv *priv;
> @@ -3272,9 +3276,10 @@ static int hns_roce_v1_m_qp(struct ib_qp *ibqp, const struct ib_qp_attr *attr,
>   	return ret;
>   }
>   
> -int hns_roce_v1_modify_qp(struct ib_qp *ibqp, const struct ib_qp_attr *attr,
> -			  int attr_mask, enum ib_qp_state cur_state,
> -			  enum ib_qp_state new_state)
> +static int hns_roce_v1_modify_qp(struct ib_qp *ibqp,
> +				 const struct ib_qp_attr *attr, int attr_mask,
> +				 enum ib_qp_state cur_state,
> +				 enum ib_qp_state new_state)
>   {
>   
>   	if (ibqp->qp_type == IB_QPT_GSI || ibqp->qp_type == IB_QPT_SMI)
> @@ -3541,8 +3546,9 @@ static int hns_roce_v1_q_qp(struct ib_qp *ibqp, struct ib_qp_attr *qp_attr,
>   	return ret;
>   }
>   
> -int hns_roce_v1_query_qp(struct ib_qp *ibqp, struct ib_qp_attr *qp_attr,
> -			 int qp_attr_mask, struct ib_qp_init_attr *qp_init_attr)
> +static int hns_roce_v1_query_qp(struct ib_qp *ibqp, struct ib_qp_attr *qp_attr,
> +				int qp_attr_mask,
> +				struct ib_qp_init_attr *qp_init_attr)
>   {
>   	struct hns_roce_qp *hr_qp = to_hr_qp(ibqp);
>   
> @@ -3893,7 +3899,7 @@ int hns_roce_v1_destroy_qp(struct ib_qp *ibqp)
>   	return 0;
>   }
>   
> -int hns_roce_v1_destroy_cq(struct ib_cq *ibcq)
> +static int hns_roce_v1_destroy_cq(struct ib_cq *ibcq)
>   {
>   	struct hns_roce_dev *hr_dev = to_hr_dev(ibcq->device);
>   	struct hns_roce_cq *hr_cq = to_hr_cq(ibcq);


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

* Re: [PATCH v2 00/45] Address issues detected by static analysis tools
       [not found] ` <20171011174927.25113-1-bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
                     ` (44 preceding siblings ...)
  2017-10-11 17:49   ` [PATCH v2 45/45] RDMA/usnic: Instantiate data structures once Bart Van Assche
@ 2017-10-15  0:48   ` Doug Ledford
  45 siblings, 0 replies; 55+ messages in thread
From: Doug Ledford @ 2017-10-15  0:48 UTC (permalink / raw)
  To: Bart Van Assche; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA

On Wed, 2017-10-11 at 10:48 -0700, Bart Van Assche wrote:
> Hello Doug,
> 
> As we all know there are several static analysis tools available for
> the Linux
> kernel and these tools are valuable. I'm referring to increasing the
> gcc
> warning level (W=1), sparse and smatch. It is helpful to analyze new
> code with
> these tools before submitting a patch. These tools are most useful if
> existing
> code is clean. Hence this patch series that significantly reduces the
> number
> of complaints reported by static analysis tools. Please consider this
> patch
> series for kernel v4.15.
> 
> Thanks,
> 
> Bart.

Hi Bart, thanks for all the work here.  Series applied.

-- 
Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
    GPG KeyID: B826A3330E572FDD
    Key fingerprint = AE6B 1BDA 122B 23B4 265B  1274 B826 A333 0E57 2FDD

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

* RE: [PATCH v2 37/45] RDMA/qedr: Remove set-but-not-used variables
       [not found]     ` <20171011174927.25113-38-bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
@ 2017-10-15  7:52       ` Amrani, Ram
  0 siblings, 0 replies; 55+ messages in thread
From: Amrani, Ram @ 2017-10-15  7:52 UTC (permalink / raw)
  To: Bart Van Assche, Doug Ledford
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Kalderon, Michal, Elior, Ariel

Hi Bart,
I think There's no point in ACK-ing the patches now as Doug has already applied the series.
Thanks for this and the other ones too.
We were on long holidays here in Israel, but now we're back to routine.

Cheers,
Ram

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

* Re: [PATCH v2 42/45] RDMA/rxe: Suppress gcc 7 fall-through complaints
       [not found]     ` <20171011174927.25113-43-bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
@ 2017-10-29  7:23       ` Moni Shoua
  0 siblings, 0 replies; 55+ messages in thread
From: Moni Shoua @ 2017-10-29  7:23 UTC (permalink / raw)
  To: Bart Van Assche; +Cc: Doug Ledford, linux-rdma

On Wed, Oct 11, 2017 at 8:49 PM, Bart Van Assche <bart.vanassche-Sjgp3cTcYWE@public.gmane.org> wrote:
> Avoid that gcc 7 reports the following warning when building with W=1:
>
> warning: this statement may fall through [-Wimplicit-fallthrough=]
>
> Signed-off-by: Bart Van Assche <bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
> Reviewed-by: Leon Romanovsky <leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> Cc: Moni Shoua <monis-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Acked-by: Moni Shoua <monis-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] 55+ messages in thread

end of thread, other threads:[~2017-10-29  7:23 UTC | newest]

Thread overview: 55+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-11 17:48 [PATCH v2 00/45] Address issues detected by static analysis tools Bart Van Assche
     [not found] ` <20171011174927.25113-1-bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
2017-10-11 17:48   ` [PATCH v2 01/45] IB/core: Fix endianness annotation in rdma_is_multicast_addr() Bart Van Assche
2017-10-11 17:48   ` [PATCH v2 02/45] IB/cm: Suppress gcc 7 fall-through complaints Bart Van Assche
2017-10-11 17:48   ` [PATCH v2 03/45] RDMA/cma: Avoid triggering undefined behavior Bart Van Assche
2017-10-11 17:48   ` [PATCH v2 04/45] RDMA/iwcm: Remove a set-but-not-used variable Bart Van Assche
2017-10-11 17:48   ` [PATCH v2 05/45] RDMA/isert: Suppress gcc 7 fall-through complaints Bart Van Assche
2017-10-11 17:48   ` [PATCH v2 06/45] RDMA/bnxt_re: " Bart Van Assche
2017-10-11 17:48   ` [PATCH v2 07/45] RDMA/bnxt_re: Remove set-but-not-used variables Bart Van Assche
2017-10-11 17:48   ` [PATCH v2 08/45] RDMA/cxgb3: Annotate locking assumptions Bart Van Assche
2017-10-11 17:48   ` [PATCH v2 09/45] RDMA/cxgb3: Annotate an RCU pointer Bart Van Assche
2017-10-11 17:48   ` [PATCH v2 10/45] RDMA/cxgb3: Remove a set-but-not-used variable Bart Van Assche
2017-10-11 17:48   ` [PATCH v2 11/45] RDMA/cxgb4: Fix indentation Bart Van Assche
2017-10-11 17:48   ` [PATCH v2 12/45] RDMA/cxgb4: Remove the obsolete kernel module option 'c4iw_debug' Bart Van Assche
     [not found]     ` <20171011174927.25113-13-bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
2017-10-11 17:51       ` Steve Wise
2017-10-11 17:48   ` [PATCH v2 13/45] RDMA/cxgb4: Suppress gcc 7 fall-through complaints Bart Van Assche
2017-10-11 17:48   ` [PATCH v2 14/45] RDMA/cxgb4: Remove a set-but-not-used variable Bart Van Assche
2017-10-11 17:48   ` [PATCH v2 15/45] IB/hfi1: Suppress gcc 7 fall-through complaints Bart Van Assche
2017-10-11 17:48   ` [PATCH v2 16/45] IB/hfi1: Remove set-but-not-used variables Bart Van Assche
2017-10-11 17:48   ` [PATCH v2 17/45] IB/hfi1: Define hfi1_handle_cnp_tbl[] once Bart Van Assche
2017-10-11 17:49   ` [PATCH v2 18/45] IB/hns: Annotate iomem pointers correctly Bart Van Assche
2017-10-11 17:49   ` [PATCH v2 19/45] IB/hns: Declare local functions 'static' Bart Van Assche
     [not found]     ` <20171011174927.25113-20-bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
2017-10-12  1:12       ` Wei Hu (Xavier)
2017-10-11 17:49   ` [PATCH v2 20/45] RDMA/i40iw: Fix a race condition Bart Van Assche
2017-10-11 17:49   ` [PATCH v2 21/45] RDMA/i40iw: Suppress gcc 7 fall-through complaints Bart Van Assche
2017-10-11 17:49   ` [PATCH v2 22/45] RDMA/i40iw: Remove a set-but-not-used variable Bart Van Assche
2017-10-11 17:49   ` [PATCH v2 23/45] IB/mthca: Fix indentation Bart Van Assche
2017-10-11 17:49   ` [PATCH v2 24/45] IB/mlx4: Suppress gcc 7 fall-through complaints Bart Van Assche
2017-10-11 17:49   ` [PATCH v2 25/45] IB/mlx5: " Bart Van Assche
2017-10-11 17:49   ` [PATCH v2 26/45] IB/mlx5: Remove a set-but-not-used variable Bart Van Assche
2017-10-11 17:49   ` [PATCH v2 27/45] IB/nes: Fix indentation Bart Van Assche
     [not found]     ` <20171011174927.25113-28-bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
2017-10-11 18:14       ` Latif, Faisal
2017-10-11 17:49   ` [PATCH v2 28/45] IB/nes: Suppress gcc 7 fall-through complaints Bart Van Assche
     [not found]     ` <20171011174927.25113-29-bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
2017-10-11 18:11       ` Latif, Faisal
2017-10-11 17:49   ` [PATCH v2 29/45] IB/nes: Remove set-but-not-used variables Bart Van Assche
     [not found]     ` <20171011174927.25113-30-bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
2017-10-11 18:12       ` Latif, Faisal
2017-10-11 17:49   ` [PATCH v2 30/45] IB/nes: Fix a race condition in nes_inetaddr_event() Bart Van Assche
     [not found]     ` <20171011174927.25113-31-bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
2017-10-11 18:13       ` Latif, Faisal
2017-10-11 17:49   ` [PATCH v2 31/45] RDMA/ocrdma: Use NULL instead of 0 to represent a pointer Bart Van Assche
2017-10-11 17:49   ` [PATCH v2 32/45] RDMA/ocrdma: Suppress gcc 7 fall-through complaints Bart Van Assche
2017-10-11 17:49   ` [PATCH v2 33/45] RDMA/ocrdma: Remove set-but-not-used variables Bart Van Assche
2017-10-11 17:49   ` [PATCH v2 34/45] RDMA/qedr: Use NULL instead of 0 to represent a pointer Bart Van Assche
2017-10-11 17:49   ` [PATCH v2 35/45] RDMA/qedr: Declare local functions static Bart Van Assche
2017-10-11 17:49   ` [PATCH v2 36/45] RDMA/qedr: Annotate iomem pointers correctly Bart Van Assche
2017-10-11 17:49   ` [PATCH v2 37/45] RDMA/qedr: Remove set-but-not-used variables Bart Van Assche
     [not found]     ` <20171011174927.25113-38-bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
2017-10-15  7:52       ` Amrani, Ram
2017-10-11 17:49   ` [PATCH v2 38/45] IB/qib: Remove remaining code related to writing the EEPROM Bart Van Assche
2017-10-11 17:49   ` [PATCH v2 39/45] IB/qib: Suppress gcc 7 fall-through complaints Bart Van Assche
2017-10-11 17:49   ` [PATCH v2 40/45] IB/qib: Remove set-but-not-used variables Bart Van Assche
2017-10-11 17:49   ` [PATCH v2 41/45] RDMA/rdmavt: Suppress gcc 7 fall-through complaints Bart Van Assche
2017-10-11 17:49   ` [PATCH v2 42/45] RDMA/rxe: " Bart Van Assche
     [not found]     ` <20171011174927.25113-43-bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
2017-10-29  7:23       ` Moni Shoua
2017-10-11 17:49   ` [PATCH v2 43/45] RDMA/usnic: Make the compiler check declaration consistency during compilation Bart Van Assche
2017-10-11 17:49   ` [PATCH v2 44/45] RDMA/usnic: Remove a set-but-not-used variable Bart Van Assche
2017-10-11 17:49   ` [PATCH v2 45/45] RDMA/usnic: Instantiate data structures once Bart Van Assche
2017-10-15  0:48   ` [PATCH v2 00/45] Address issues detected by static analysis tools Doug Ledford

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.