]> git.karo-electronics.de Git - linux-beck.git/commitdiff
staging/rdma/hfi1: Remove unnecessary duplicated variable
authorMitko Haralanov <mitko.haralanov@intel.com>
Wed, 3 Feb 2016 22:33:31 +0000 (14:33 -0800)
committerDoug Ledford <dledford@redhat.com>
Fri, 11 Mar 2016 01:37:51 +0000 (20:37 -0500)
struct hfi1_devdata contained 2 variables which represented the numa
node the device is attached to.  Remove the duplicated one.

Reviewed-by: Ira Weiny <ira.weiny@intel.com>
Signed-off-by: Mitko Haralanov <mitko.haralanov@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/staging/rdma/hfi1/hfi.h
drivers/staging/rdma/hfi1/init.c
drivers/staging/rdma/hfi1/qp.h
drivers/staging/rdma/hfi1/verbs.c

index cb2f90a0033cb5aef1ed56965f081ecdf29f40cb..897046cd8fa5a4a0634909a32219b66d702616eb 100644 (file)
@@ -1128,7 +1128,6 @@ struct hfi1_devdata {
        struct timer_list rcverr_timer;
        u32 rcv_ovfl_cnt;
 
-       int assigned_node_id;
        wait_queue_head_t event_queue;
 
        /* Save the enabled LCB error bits */
index 1680808d0b7c364e88ad4a71fdcd8e987fa56e89..17b876d77037842653c43aea1e748967cbc87a25 100644 (file)
@@ -130,15 +130,10 @@ int hfi1_create_ctxts(struct hfi1_devdata *dd)
 {
        unsigned i;
        int ret;
-       int local_node_id = pcibus_to_node(dd->pcidev->bus);
 
        /* Control context has to be always 0 */
        BUILD_BUG_ON(HFI1_CTRL_CTXT != 0);
 
-       if (local_node_id < 0)
-               local_node_id = numa_node_id();
-       dd->assigned_node_id = local_node_id;
-
        dd->rcd = kcalloc(dd->num_rcv_contexts, sizeof(*dd->rcd), GFP_KERNEL);
        if (!dd->rcd)
                goto nomem;
index 36be54771205491c07d5e527165404bfcdcad899..973c14b5268a573b4fc5215aaf978311c3081612 100644 (file)
@@ -157,7 +157,7 @@ static inline void _hfi1_schedule_send(struct rvt_qp *qp)
        iowait_schedule(&priv->s_iowait, ppd->hfi1_wq,
                        priv->s_sde ?
                        priv->s_sde->cpu :
-                       cpumask_first(cpumask_of_node(dd->assigned_node_id)));
+                       cpumask_first(cpumask_of_node(dd->node)));
 }
 
 /**
index 6d541caf4a5138643d9078fe84343b1e8bc31975..d617324e3c48e77034fc2aa63aa1d094c34d7547 100644 (file)
@@ -1567,7 +1567,7 @@ int hfi1_register_ib_device(struct hfi1_devdata *dd)
        snprintf(dd->verbs_dev.rdi.dparms.cq_name,
                 sizeof(dd->verbs_dev.rdi.dparms.cq_name),
                 "hfi1_cq%d", dd->unit);
-       dd->verbs_dev.rdi.dparms.node = dd->assigned_node_id;
+       dd->verbs_dev.rdi.dparms.node = dd->node;
 
        /* misc settings */
        dd->verbs_dev.rdi.flags = 0; /* Let rdmavt handle it all */