diff options
author | Mike Marciniszyn <mike.marciniszyn@intel.com> | 2017-10-23 06:06:32 -0700 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2017-10-30 14:51:36 -0400 |
commit | 31acd18b61a48bf9225f106a6ff74774583ee375 (patch) | |
tree | 513d567bbd64c37ddaf9d8a476a92324b86a3771 /drivers/infiniband/hw/hfi1/sdma.c | |
parent | 45a041cce7c4b393e6ee242b7f090393dd1bf9ac (diff) | |
download | linux-stable-31acd18b61a48bf9225f106a6ff74774583ee375.tar.gz linux-stable-31acd18b61a48bf9225f106a6ff74774583ee375.tar.bz2 linux-stable-31acd18b61a48bf9225f106a6ff74774583ee375.zip |
IB/hfi1: Take advantage of kvzalloc_node in sdma initialization
The code that allocates the tx ring in the sdma code fails to take
advantage of kvzalloc variations.
Fix by converting to use kvzalloc_node.
Reported-by: Leon Romanovsky <leon@kernel.org>
Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/hw/hfi1/sdma.c')
-rw-r--r-- | drivers/infiniband/hw/hfi1/sdma.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/infiniband/hw/hfi1/sdma.c b/drivers/infiniband/hw/hfi1/sdma.c index 78716b829a28..6a1b8e479616 100644 --- a/drivers/infiniband/hw/hfi1/sdma.c +++ b/drivers/infiniband/hw/hfi1/sdma.c @@ -1465,13 +1465,8 @@ int sdma_init(struct hfi1_devdata *dd, u8 port) if (!sde->descq) goto bail; sde->tx_ring = - kcalloc(descq_cnt, sizeof(struct sdma_txreq *), - GFP_KERNEL); - if (!sde->tx_ring) - sde->tx_ring = - vzalloc( - sizeof(struct sdma_txreq *) * - descq_cnt); + kvzalloc_node(sizeof(struct sdma_txreq *) * descq_cnt, + GFP_KERNEL, dd->node); if (!sde->tx_ring) goto bail; } |