IB/ocrdma: Delete unnecessary variable initialisations in 11 functions
authorMarkus Elfring <elfring@users.sourceforge.net>
Sat, 26 Dec 2015 17:18:18 +0000 (18:18 +0100)
committerDoug Ledford <dledford@redhat.com>
Thu, 3 Mar 2016 18:31:59 +0000 (13:31 -0500)
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>
drivers/infiniband/hw/ocrdma/ocrdma_ah.c
drivers/infiniband/hw/ocrdma/ocrdma_hw.c
drivers/infiniband/hw/ocrdma/ocrdma_stats.c
drivers/infiniband/hw/ocrdma/ocrdma_verbs.c

index e3c4f1784ce84edbc68d4de9646296f6f2d43bfe..797362a297b23aba74e1eac2ea0349a1ed57d023 100644 (file)
@@ -74,7 +74,7 @@ static inline int set_av_attr(struct ocrdma_dev *dev, struct ocrdma_ah *ah,
                        struct ib_ah_attr *attr, union ib_gid *sgid,
                        int pdid, bool *isvlan, u16 vlan_tag)
 {
-       int status = 0;
+       int status;
        struct ocrdma_eth_vlan eth;
        struct ocrdma_grh grh;
        int eth_sz;
index 2cfbf15962c6ae5a874d456e52afcb859699b00e..9b8ff26ada9e8a1990d1ec095eb754a10149c60e 100644 (file)
@@ -1113,7 +1113,7 @@ mbx_err:
 static int ocrdma_nonemb_mbx_cmd(struct ocrdma_dev *dev, struct ocrdma_mqe *mqe,
                                 void *payload_va)
 {
-       int status = 0;
+       int status;
        struct ocrdma_mbx_rsp *rsp = payload_va;
 
        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)
 static int ocrdma_mbx_get_dcbx_config(struct ocrdma_dev *dev, u32 ptype,
                                      struct ocrdma_dcbx_cfg *dcbxcfg)
 {
-       int status = 0;
+       int status;
        dma_addr_t pa;
        struct ocrdma_mqe cmd;
 
index 255f774080a4aae08952df0374cdcb5a4063c8d1..8bef09a8c49ff3195ac8c9df9dd01a100a93c6ac 100644 (file)
@@ -610,7 +610,7 @@ static char *ocrdma_driver_dbg_stats(struct ocrdma_dev *dev)
 static void ocrdma_update_stats(struct ocrdma_dev *dev)
 {
        ulong now = jiffies, secs;
-       int status = 0;
+       int status;
        struct ocrdma_rdma_stats_resp *rdma_stats =
                      (struct ocrdma_rdma_stats_resp *)dev->stats_mem.va;
        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,
 {
        char tmp_str[32];
        long reset;
-       int status = 0;
+       int status;
        struct ocrdma_stats *pstats = filp->private_data;
        struct ocrdma_dev *dev = pstats->dev;
 
index 4df3f132d607bbc2b8324ed4c6c9dcaa97787070..4a4c8d6f71c8c0ede4727f0478c1e0f7461abcf2 100644 (file)
@@ -419,7 +419,7 @@ static struct ocrdma_pd *_ocrdma_alloc_pd(struct ocrdma_dev *dev,
                                          struct ib_udata *udata)
 {
        struct ocrdma_pd *pd = NULL;
-       int status = 0;
+       int status;
 
        pd = kzalloc(sizeof(*pd), GFP_KERNEL);
        if (!pd)
@@ -468,7 +468,7 @@ static inline int is_ucontext_pd(struct ocrdma_ucontext *uctx,
 static int _ocrdma_dealloc_pd(struct ocrdma_dev *dev,
                              struct ocrdma_pd *pd)
 {
-       int status = 0;
+       int status;
 
        if (dev->pd_mgr->pd_prealloc_valid)
                status = ocrdma_put_pd_num(dev, pd->id, pd->dpp_enabled);
@@ -596,7 +596,7 @@ map_err:
 
 int ocrdma_dealloc_ucontext(struct ib_ucontext *ibctx)
 {
-       int status = 0;
+       int status;
        struct ocrdma_mm *mm, *tmp;
        struct ocrdma_ucontext *uctx = get_ocrdma_ucontext(ibctx);
        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)
        unsigned long vm_page = vma->vm_pgoff << PAGE_SHIFT;
        u64 unmapped_db = (u64) dev->nic_info.unmapped_db;
        unsigned long len = (vma->vm_end - vma->vm_start);
-       int status = 0;
+       int status;
        bool found;
 
        if (vma->vm_start & (PAGE_SIZE - 1))
@@ -1285,7 +1285,7 @@ static int ocrdma_copy_qp_uresp(struct ocrdma_qp *qp,
                                struct ib_udata *udata, int dpp_offset,
                                int dpp_credit_lmt, int srq)
 {
-       int status = 0;
+       int status;
        u64 usr_db;
        struct ocrdma_create_qp_uresp uresp;
        struct ocrdma_pd *pd = qp->pd;
@@ -1949,7 +1949,7 @@ int ocrdma_modify_srq(struct ib_srq *ibsrq,
                      enum ib_srq_attr_mask srq_attr_mask,
                      struct ib_udata *udata)
 {
-       int status = 0;
+       int status;
        struct ocrdma_srq *srq;
 
        srq = get_ocrdma_srq(ibsrq);