diff options
author | Prarit Bhargava <prarit@redhat.com> | 2014-02-19 15:05:16 -0500 |
---|---|---|
committer | Roland Dreier <roland@purestorage.com> | 2014-03-17 19:34:13 -0400 |
commit | bc1b04ab34a1485339571242cb0fbad823835685 (patch) | |
tree | 0e76d3e9a17128430317af7313b481596a85e61a /drivers/infiniband/hw | |
parent | cfbf8d4857c26a8a307fb7cd258074c9dcd8c691 (diff) |
RDMA/ocrdma: Fix compiler warning
drivers/infiniband/hw/ocrdma/ocrdma_verbs.c: In function ‘_ocrdma_modify_qp’:
drivers/infiniband/hw/ocrdma/ocrdma_verbs.c:1299:31: error: ‘old_qps’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
status = ocrdma_mbx_modify_qp(dev, qp, attr, attr_mask, old_qps);
ocrdma_mbx_modify_qp() (and subsequent calls) doesn't appear to use old_qps
so it doesn't need to be passed on. Removing the variable results in the
warning going away.
Signed-off-by: Prarit Bhargava <prarit@redhat.com>
Acked-by: Devesh Sharma (Devesh.sharma@emulex.com)
Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'drivers/infiniband/hw')
-rw-r--r-- | drivers/infiniband/hw/ocrdma/ocrdma_hw.c | 8 | ||||
-rw-r--r-- | drivers/infiniband/hw/ocrdma/ocrdma_hw.h | 3 | ||||
-rw-r--r-- | drivers/infiniband/hw/ocrdma/ocrdma_verbs.c | 2 |
3 files changed, 5 insertions, 8 deletions
diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_hw.c b/drivers/infiniband/hw/ocrdma/ocrdma_hw.c index 1664d648cbfc..ac3fbf2db00a 100644 --- a/drivers/infiniband/hw/ocrdma/ocrdma_hw.c +++ b/drivers/infiniband/hw/ocrdma/ocrdma_hw.c | |||
@@ -2127,8 +2127,7 @@ static int ocrdma_set_av_params(struct ocrdma_qp *qp, | |||
2127 | 2127 | ||
2128 | static int ocrdma_set_qp_params(struct ocrdma_qp *qp, | 2128 | static int ocrdma_set_qp_params(struct ocrdma_qp *qp, |
2129 | struct ocrdma_modify_qp *cmd, | 2129 | struct ocrdma_modify_qp *cmd, |
2130 | struct ib_qp_attr *attrs, int attr_mask, | 2130 | struct ib_qp_attr *attrs, int attr_mask) |
2131 | enum ib_qp_state old_qps) | ||
2132 | { | 2131 | { |
2133 | int status = 0; | 2132 | int status = 0; |
2134 | 2133 | ||
@@ -2233,8 +2232,7 @@ pmtu_err: | |||
2233 | } | 2232 | } |
2234 | 2233 | ||
2235 | int ocrdma_mbx_modify_qp(struct ocrdma_dev *dev, struct ocrdma_qp *qp, | 2234 | int ocrdma_mbx_modify_qp(struct ocrdma_dev *dev, struct ocrdma_qp *qp, |
2236 | struct ib_qp_attr *attrs, int attr_mask, | 2235 | struct ib_qp_attr *attrs, int attr_mask) |
2237 | enum ib_qp_state old_qps) | ||
2238 | { | 2236 | { |
2239 | int status = -ENOMEM; | 2237 | int status = -ENOMEM; |
2240 | struct ocrdma_modify_qp *cmd; | 2238 | struct ocrdma_modify_qp *cmd; |
@@ -2257,7 +2255,7 @@ int ocrdma_mbx_modify_qp(struct ocrdma_dev *dev, struct ocrdma_qp *qp, | |||
2257 | OCRDMA_QP_PARAMS_STATE_MASK; | 2255 | OCRDMA_QP_PARAMS_STATE_MASK; |
2258 | } | 2256 | } |
2259 | 2257 | ||
2260 | status = ocrdma_set_qp_params(qp, cmd, attrs, attr_mask, old_qps); | 2258 | status = ocrdma_set_qp_params(qp, cmd, attrs, attr_mask); |
2261 | if (status) | 2259 | if (status) |
2262 | goto mbx_err; | 2260 | goto mbx_err; |
2263 | status = ocrdma_mbx_cmd(dev, (struct ocrdma_mqe *)cmd); | 2261 | status = ocrdma_mbx_cmd(dev, (struct ocrdma_mqe *)cmd); |
diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_hw.h b/drivers/infiniband/hw/ocrdma/ocrdma_hw.h index 82fe332ae6c6..db3d55f368bf 100644 --- a/drivers/infiniband/hw/ocrdma/ocrdma_hw.h +++ b/drivers/infiniband/hw/ocrdma/ocrdma_hw.h | |||
@@ -112,8 +112,7 @@ int ocrdma_mbx_create_qp(struct ocrdma_qp *, struct ib_qp_init_attr *attrs, | |||
112 | u8 enable_dpp_cq, u16 dpp_cq_id, u16 *dpp_offset, | 112 | u8 enable_dpp_cq, u16 dpp_cq_id, u16 *dpp_offset, |
113 | u16 *dpp_credit_lmt); | 113 | u16 *dpp_credit_lmt); |
114 | int ocrdma_mbx_modify_qp(struct ocrdma_dev *, struct ocrdma_qp *, | 114 | int ocrdma_mbx_modify_qp(struct ocrdma_dev *, struct ocrdma_qp *, |
115 | struct ib_qp_attr *attrs, int attr_mask, | 115 | struct ib_qp_attr *attrs, int attr_mask); |
116 | enum ib_qp_state old_qps); | ||
117 | int ocrdma_mbx_query_qp(struct ocrdma_dev *, struct ocrdma_qp *, | 116 | int ocrdma_mbx_query_qp(struct ocrdma_dev *, struct ocrdma_qp *, |
118 | struct ocrdma_qp_params *param); | 117 | struct ocrdma_qp_params *param); |
119 | int ocrdma_mbx_destroy_qp(struct ocrdma_dev *, struct ocrdma_qp *); | 118 | int ocrdma_mbx_destroy_qp(struct ocrdma_dev *, struct ocrdma_qp *); |
diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c b/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c index e0cc201be41a..f1108ebae83a 100644 --- a/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c +++ b/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c | |||
@@ -1296,7 +1296,7 @@ int _ocrdma_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr, | |||
1296 | */ | 1296 | */ |
1297 | if (status < 0) | 1297 | if (status < 0) |
1298 | return status; | 1298 | return status; |
1299 | status = ocrdma_mbx_modify_qp(dev, qp, attr, attr_mask, old_qps); | 1299 | status = ocrdma_mbx_modify_qp(dev, qp, attr, attr_mask); |
1300 | if (!status && attr_mask & IB_QP_STATE && attr->qp_state == IB_QPS_RTR) | 1300 | if (!status && attr_mask & IB_QP_STATE && attr->qp_state == IB_QPS_RTR) |
1301 | ocrdma_flush_rq_db(qp); | 1301 | ocrdma_flush_rq_db(qp); |
1302 | 1302 | ||