staging: rdma: hfi1: remove unnecessary out of memory messages
Out of memory messages are unnecssary in the drivers as they are reported by memory management. Addresses checkpatch.pl: WARNING: Possible unnecessary 'out of memory' message Signed-off-by: Alison Schofield <amsfield22@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
be036bbe2c
commit
806e6e1bec
@ -8991,7 +8991,6 @@ static int set_up_interrupts(struct hfi1_devdata *dd)
|
|||||||
|
|
||||||
entries = kcalloc(total, sizeof(*entries), GFP_KERNEL);
|
entries = kcalloc(total, sizeof(*entries), GFP_KERNEL);
|
||||||
if (!entries) {
|
if (!entries) {
|
||||||
dd_dev_err(dd, "cannot allocate msix table\n");
|
|
||||||
ret = -ENOMEM;
|
ret = -ENOMEM;
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
|
@ -134,11 +134,8 @@ int hfi1_create_ctxts(struct hfi1_devdata *dd)
|
|||||||
dd->assigned_node_id = local_node_id;
|
dd->assigned_node_id = local_node_id;
|
||||||
|
|
||||||
dd->rcd = kcalloc(dd->num_rcv_contexts, sizeof(*dd->rcd), GFP_KERNEL);
|
dd->rcd = kcalloc(dd->num_rcv_contexts, sizeof(*dd->rcd), GFP_KERNEL);
|
||||||
if (!dd->rcd) {
|
if (!dd->rcd)
|
||||||
dd_dev_err(dd,
|
|
||||||
"Unable to allocate receive context array, failing\n");
|
|
||||||
goto nomem;
|
goto nomem;
|
||||||
}
|
|
||||||
|
|
||||||
/* create one or more kernel contexts */
|
/* create one or more kernel contexts */
|
||||||
for (i = 0; i < dd->first_user_ctxt; ++i) {
|
for (i = 0; i < dd->first_user_ctxt; ++i) {
|
||||||
@ -320,12 +317,8 @@ struct hfi1_ctxtdata *hfi1_create_ctxtdata(struct hfi1_pportdata *ppd, u32 ctxt)
|
|||||||
if (ctxt < dd->first_user_ctxt) { /* N/A for PSM contexts */
|
if (ctxt < dd->first_user_ctxt) { /* N/A for PSM contexts */
|
||||||
rcd->opstats = kzalloc(sizeof(*rcd->opstats),
|
rcd->opstats = kzalloc(sizeof(*rcd->opstats),
|
||||||
GFP_KERNEL);
|
GFP_KERNEL);
|
||||||
if (!rcd->opstats) {
|
if (!rcd->opstats)
|
||||||
dd_dev_err(dd,
|
|
||||||
"ctxt%u: Unable to allocate per ctxt stats buffer\n",
|
|
||||||
rcd->ctxt);
|
|
||||||
goto bail;
|
goto bail;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return rcd;
|
return rcd;
|
||||||
|
@ -435,7 +435,6 @@ int init_send_contexts(struct hfi1_devdata *dd)
|
|||||||
sizeof(struct send_context_info),
|
sizeof(struct send_context_info),
|
||||||
GFP_KERNEL);
|
GFP_KERNEL);
|
||||||
if (!dd->send_contexts || !dd->hw_to_sw) {
|
if (!dd->send_contexts || !dd->hw_to_sw) {
|
||||||
dd_dev_err(dd, "Unable to allocate send context arrays\n");
|
|
||||||
kfree(dd->hw_to_sw);
|
kfree(dd->hw_to_sw);
|
||||||
kfree(dd->send_contexts);
|
kfree(dd->send_contexts);
|
||||||
free_credit_return(dd);
|
free_credit_return(dd);
|
||||||
@ -684,10 +683,8 @@ struct send_context *sc_alloc(struct hfi1_devdata *dd, int type,
|
|||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
sc = kzalloc_node(sizeof(struct send_context), GFP_KERNEL, numa);
|
sc = kzalloc_node(sizeof(struct send_context), GFP_KERNEL, numa);
|
||||||
if (!sc) {
|
if (!sc)
|
||||||
dd_dev_err(dd, "Cannot allocate send context structure\n");
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
|
||||||
|
|
||||||
spin_lock_irqsave(&dd->sc_lock, flags);
|
spin_lock_irqsave(&dd->sc_lock, flags);
|
||||||
ret = sc_hw_alloc(dd, type, &sw_index, &hw_context);
|
ret = sc_hw_alloc(dd, type, &sw_index, &hw_context);
|
||||||
@ -813,8 +810,6 @@ struct send_context *sc_alloc(struct hfi1_devdata *dd, int type,
|
|||||||
sc->sr = kzalloc_node(sizeof(union pio_shadow_ring) *
|
sc->sr = kzalloc_node(sizeof(union pio_shadow_ring) *
|
||||||
sc->sr_size, GFP_KERNEL, numa);
|
sc->sr_size, GFP_KERNEL, numa);
|
||||||
if (!sc->sr) {
|
if (!sc->sr) {
|
||||||
dd_dev_err(dd,
|
|
||||||
"Cannot allocate send context shadow ring structure\n");
|
|
||||||
sc_free(sc);
|
sc_free(sc);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@ -378,20 +378,14 @@ int hfi1_user_sdma_alloc_queues(struct hfi1_ctxtdata *uctxt, struct file *fp)
|
|||||||
dd = uctxt->dd;
|
dd = uctxt->dd;
|
||||||
|
|
||||||
pq = kzalloc(sizeof(*pq), GFP_KERNEL);
|
pq = kzalloc(sizeof(*pq), GFP_KERNEL);
|
||||||
if (!pq) {
|
if (!pq)
|
||||||
dd_dev_err(dd,
|
|
||||||
"[%u:%u] Failed to allocate SDMA request struct\n",
|
|
||||||
uctxt->ctxt, subctxt_fp(fp));
|
|
||||||
goto pq_nomem;
|
goto pq_nomem;
|
||||||
}
|
|
||||||
memsize = sizeof(*pq->reqs) * hfi1_sdma_comp_ring_size;
|
memsize = sizeof(*pq->reqs) * hfi1_sdma_comp_ring_size;
|
||||||
pq->reqs = kmalloc(memsize, GFP_KERNEL);
|
pq->reqs = kmalloc(memsize, GFP_KERNEL);
|
||||||
if (!pq->reqs) {
|
if (!pq->reqs)
|
||||||
dd_dev_err(dd,
|
|
||||||
"[%u:%u] Failed to allocate SDMA request queue (%u)\n",
|
|
||||||
uctxt->ctxt, subctxt_fp(fp), memsize);
|
|
||||||
goto pq_reqs_nomem;
|
goto pq_reqs_nomem;
|
||||||
}
|
|
||||||
INIT_LIST_HEAD(&pq->list);
|
INIT_LIST_HEAD(&pq->list);
|
||||||
pq->dd = dd;
|
pq->dd = dd;
|
||||||
pq->ctxt = uctxt->ctxt;
|
pq->ctxt = uctxt->ctxt;
|
||||||
@ -417,22 +411,15 @@ int hfi1_user_sdma_alloc_queues(struct hfi1_ctxtdata *uctxt, struct file *fp)
|
|||||||
}
|
}
|
||||||
user_sdma_pkt_fp(fp) = pq;
|
user_sdma_pkt_fp(fp) = pq;
|
||||||
cq = kzalloc(sizeof(*cq), GFP_KERNEL);
|
cq = kzalloc(sizeof(*cq), GFP_KERNEL);
|
||||||
if (!cq) {
|
if (!cq)
|
||||||
dd_dev_err(dd,
|
|
||||||
"[%u:%u] Failed to allocate SDMA completion queue\n",
|
|
||||||
uctxt->ctxt, subctxt_fp(fp));
|
|
||||||
goto cq_nomem;
|
goto cq_nomem;
|
||||||
}
|
|
||||||
|
|
||||||
memsize = ALIGN(sizeof(*cq->comps) * hfi1_sdma_comp_ring_size,
|
memsize = ALIGN(sizeof(*cq->comps) * hfi1_sdma_comp_ring_size,
|
||||||
PAGE_SIZE);
|
PAGE_SIZE);
|
||||||
cq->comps = vmalloc_user(memsize);
|
cq->comps = vmalloc_user(memsize);
|
||||||
if (!cq->comps) {
|
if (!cq->comps)
|
||||||
dd_dev_err(dd,
|
|
||||||
"[%u:%u] Failed to allocate SDMA completion queue entries\n",
|
|
||||||
uctxt->ctxt, subctxt_fp(fp));
|
|
||||||
goto cq_comps_nomem;
|
goto cq_comps_nomem;
|
||||||
}
|
|
||||||
cq->nentries = hfi1_sdma_comp_ring_size;
|
cq->nentries = hfi1_sdma_comp_ring_size;
|
||||||
user_sdma_comp_fp(fp) = cq;
|
user_sdma_comp_fp(fp) = cq;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user