diff options
author | Markus Elfring <elfring@users.sourceforge.net> | 2015-12-26 12:18:18 -0500 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2016-03-03 13:31:59 -0500 |
commit | 0ca4c39f32cd3fad57c18cd8df49d6b4e7bc2411 (patch) | |
tree | 34e0691f6bc9f060ee112de5c133bc1005a08f58 | |
parent | 834d16d66ebc2b5faa06af0bda3bb6f9c71b3996 (diff) |
IB/ocrdma: Delete unnecessary variable initialisations in 11 functions
The variable "status" will be set to an appropriate value a bit later.
Thus let us omit the explicit initialisation at the beginning.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Doug Ledford <dledford@redhat.com>
-rw-r--r-- | drivers/infiniband/hw/ocrdma/ocrdma_ah.c | 2 | ||||
-rw-r--r-- | drivers/infiniband/hw/ocrdma/ocrdma_hw.c | 4 | ||||
-rw-r--r-- | drivers/infiniband/hw/ocrdma/ocrdma_stats.c | 4 | ||||
-rw-r--r-- | drivers/infiniband/hw/ocrdma/ocrdma_verbs.c | 12 |
4 files changed, 11 insertions, 11 deletions
diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_ah.c b/drivers/infiniband/hw/ocrdma/ocrdma_ah.c index e3c4f1784ce8..797362a297b2 100644 --- a/drivers/infiniband/hw/ocrdma/ocrdma_ah.c +++ b/drivers/infiniband/hw/ocrdma/ocrdma_ah.c | |||
@@ -74,7 +74,7 @@ static inline int set_av_attr(struct ocrdma_dev *dev, struct ocrdma_ah *ah, | |||
74 | struct ib_ah_attr *attr, union ib_gid *sgid, | 74 | struct ib_ah_attr *attr, union ib_gid *sgid, |
75 | int pdid, bool *isvlan, u16 vlan_tag) | 75 | int pdid, bool *isvlan, u16 vlan_tag) |
76 | { | 76 | { |
77 | int status = 0; | 77 | int status; |
78 | struct ocrdma_eth_vlan eth; | 78 | struct ocrdma_eth_vlan eth; |
79 | struct ocrdma_grh grh; | 79 | struct ocrdma_grh grh; |
80 | int eth_sz; | 80 | int eth_sz; |
diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_hw.c b/drivers/infiniband/hw/ocrdma/ocrdma_hw.c index 2cfbf15962c6..9b8ff26ada9e 100644 --- a/drivers/infiniband/hw/ocrdma/ocrdma_hw.c +++ b/drivers/infiniband/hw/ocrdma/ocrdma_hw.c | |||
@@ -1113,7 +1113,7 @@ mbx_err: | |||
1113 | static int ocrdma_nonemb_mbx_cmd(struct ocrdma_dev *dev, struct ocrdma_mqe *mqe, | 1113 | static int ocrdma_nonemb_mbx_cmd(struct ocrdma_dev *dev, struct ocrdma_mqe *mqe, |
1114 | void *payload_va) | 1114 | void *payload_va) |
1115 | { | 1115 | { |
1116 | int status = 0; | 1116 | int status; |
1117 | struct ocrdma_mbx_rsp *rsp = payload_va; | 1117 | struct ocrdma_mbx_rsp *rsp = payload_va; |
1118 | 1118 | ||
1119 | if ((mqe->hdr.spcl_sge_cnt_emb & OCRDMA_MQE_HDR_EMB_MASK) >> | 1119 | if ((mqe->hdr.spcl_sge_cnt_emb & OCRDMA_MQE_HDR_EMB_MASK) >> |
@@ -2893,7 +2893,7 @@ int ocrdma_mbx_destroy_srq(struct ocrdma_dev *dev, struct ocrdma_srq *srq) | |||
2893 | static int ocrdma_mbx_get_dcbx_config(struct ocrdma_dev *dev, u32 ptype, | 2893 | static int ocrdma_mbx_get_dcbx_config(struct ocrdma_dev *dev, u32 ptype, |
2894 | struct ocrdma_dcbx_cfg *dcbxcfg) | 2894 | struct ocrdma_dcbx_cfg *dcbxcfg) |
2895 | { | 2895 | { |
2896 | int status = 0; | 2896 | int status; |
2897 | dma_addr_t pa; | 2897 | dma_addr_t pa; |
2898 | struct ocrdma_mqe cmd; | 2898 | struct ocrdma_mqe cmd; |
2899 | 2899 | ||
diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_stats.c b/drivers/infiniband/hw/ocrdma/ocrdma_stats.c index 255f774080a4..8bef09a8c49f 100644 --- a/drivers/infiniband/hw/ocrdma/ocrdma_stats.c +++ b/drivers/infiniband/hw/ocrdma/ocrdma_stats.c | |||
@@ -610,7 +610,7 @@ static char *ocrdma_driver_dbg_stats(struct ocrdma_dev *dev) | |||
610 | static void ocrdma_update_stats(struct ocrdma_dev *dev) | 610 | static void ocrdma_update_stats(struct ocrdma_dev *dev) |
611 | { | 611 | { |
612 | ulong now = jiffies, secs; | 612 | ulong now = jiffies, secs; |
613 | int status = 0; | 613 | int status; |
614 | struct ocrdma_rdma_stats_resp *rdma_stats = | 614 | struct ocrdma_rdma_stats_resp *rdma_stats = |
615 | (struct ocrdma_rdma_stats_resp *)dev->stats_mem.va; | 615 | (struct ocrdma_rdma_stats_resp *)dev->stats_mem.va; |
616 | struct ocrdma_rsrc_stats *rsrc_stats = &rdma_stats->act_rsrc_stats; | 616 | struct ocrdma_rsrc_stats *rsrc_stats = &rdma_stats->act_rsrc_stats; |
@@ -641,7 +641,7 @@ static ssize_t ocrdma_dbgfs_ops_write(struct file *filp, | |||
641 | { | 641 | { |
642 | char tmp_str[32]; | 642 | char tmp_str[32]; |
643 | long reset; | 643 | long reset; |
644 | int status = 0; | 644 | int status; |
645 | struct ocrdma_stats *pstats = filp->private_data; | 645 | struct ocrdma_stats *pstats = filp->private_data; |
646 | struct ocrdma_dev *dev = pstats->dev; | 646 | struct ocrdma_dev *dev = pstats->dev; |
647 | 647 | ||
diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c b/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c index 4df3f132d607..4a4c8d6f71c8 100644 --- a/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c +++ b/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c | |||
@@ -419,7 +419,7 @@ static struct ocrdma_pd *_ocrdma_alloc_pd(struct ocrdma_dev *dev, | |||
419 | struct ib_udata *udata) | 419 | struct ib_udata *udata) |
420 | { | 420 | { |
421 | struct ocrdma_pd *pd = NULL; | 421 | struct ocrdma_pd *pd = NULL; |
422 | int status = 0; | 422 | int status; |
423 | 423 | ||
424 | pd = kzalloc(sizeof(*pd), GFP_KERNEL); | 424 | pd = kzalloc(sizeof(*pd), GFP_KERNEL); |
425 | if (!pd) | 425 | if (!pd) |
@@ -468,7 +468,7 @@ static inline int is_ucontext_pd(struct ocrdma_ucontext *uctx, | |||
468 | static int _ocrdma_dealloc_pd(struct ocrdma_dev *dev, | 468 | static int _ocrdma_dealloc_pd(struct ocrdma_dev *dev, |
469 | struct ocrdma_pd *pd) | 469 | struct ocrdma_pd *pd) |
470 | { | 470 | { |
471 | int status = 0; | 471 | int status; |
472 | 472 | ||
473 | if (dev->pd_mgr->pd_prealloc_valid) | 473 | if (dev->pd_mgr->pd_prealloc_valid) |
474 | status = ocrdma_put_pd_num(dev, pd->id, pd->dpp_enabled); | 474 | status = ocrdma_put_pd_num(dev, pd->id, pd->dpp_enabled); |
@@ -596,7 +596,7 @@ map_err: | |||
596 | 596 | ||
597 | int ocrdma_dealloc_ucontext(struct ib_ucontext *ibctx) | 597 | int ocrdma_dealloc_ucontext(struct ib_ucontext *ibctx) |
598 | { | 598 | { |
599 | int status = 0; | 599 | int status; |
600 | struct ocrdma_mm *mm, *tmp; | 600 | struct ocrdma_mm *mm, *tmp; |
601 | struct ocrdma_ucontext *uctx = get_ocrdma_ucontext(ibctx); | 601 | struct ocrdma_ucontext *uctx = get_ocrdma_ucontext(ibctx); |
602 | struct ocrdma_dev *dev = get_ocrdma_dev(ibctx->device); | 602 | struct ocrdma_dev *dev = get_ocrdma_dev(ibctx->device); |
@@ -623,7 +623,7 @@ int ocrdma_mmap(struct ib_ucontext *context, struct vm_area_struct *vma) | |||
623 | unsigned long vm_page = vma->vm_pgoff << PAGE_SHIFT; | 623 | unsigned long vm_page = vma->vm_pgoff << PAGE_SHIFT; |
624 | u64 unmapped_db = (u64) dev->nic_info.unmapped_db; | 624 | u64 unmapped_db = (u64) dev->nic_info.unmapped_db; |
625 | unsigned long len = (vma->vm_end - vma->vm_start); | 625 | unsigned long len = (vma->vm_end - vma->vm_start); |
626 | int status = 0; | 626 | int status; |
627 | bool found; | 627 | bool found; |
628 | 628 | ||
629 | if (vma->vm_start & (PAGE_SIZE - 1)) | 629 | if (vma->vm_start & (PAGE_SIZE - 1)) |
@@ -1285,7 +1285,7 @@ static int ocrdma_copy_qp_uresp(struct ocrdma_qp *qp, | |||
1285 | struct ib_udata *udata, int dpp_offset, | 1285 | struct ib_udata *udata, int dpp_offset, |
1286 | int dpp_credit_lmt, int srq) | 1286 | int dpp_credit_lmt, int srq) |
1287 | { | 1287 | { |
1288 | int status = 0; | 1288 | int status; |
1289 | u64 usr_db; | 1289 | u64 usr_db; |
1290 | struct ocrdma_create_qp_uresp uresp; | 1290 | struct ocrdma_create_qp_uresp uresp; |
1291 | struct ocrdma_pd *pd = qp->pd; | 1291 | struct ocrdma_pd *pd = qp->pd; |
@@ -1949,7 +1949,7 @@ int ocrdma_modify_srq(struct ib_srq *ibsrq, | |||
1949 | enum ib_srq_attr_mask srq_attr_mask, | 1949 | enum ib_srq_attr_mask srq_attr_mask, |
1950 | struct ib_udata *udata) | 1950 | struct ib_udata *udata) |
1951 | { | 1951 | { |
1952 | int status = 0; | 1952 | int status; |
1953 | struct ocrdma_srq *srq; | 1953 | struct ocrdma_srq *srq; |
1954 | 1954 | ||
1955 | srq = get_ocrdma_srq(ibsrq); | 1955 | srq = get_ocrdma_srq(ibsrq); |