Commit 7d502071 authored by Johannes Thumshirn's avatar Johannes Thumshirn Committed by Linus Torvalds

drivers/infiniband/hw/qib/qib_init.c: use kmalloc_array_node()

Now that we have a NUMA-aware version of kmalloc_array() we can use it
instead of kmalloc_node() without an overflow check in the size

Link: default avatarJohannes Thumshirn <>
Reviewed-by: default avatarChristoph Lameter <>
Cc: Mike Marciniszyn <>
Cc: Doug Ledford <>
Cc: Sean Hefty <>
Cc: Hal Rosenstock <>
Cc: Christoph Hellwig <>
Cc: Damien Le Moal <>
Cc: David Rientjes <>
Cc: "David S. Miller" <>
Cc: Jens Axboe <>
Cc: Joonsoo Kim <>
Cc: Pekka Enberg <>
Cc: Santosh Shilimkar <>
Cc: Vlastimil Babka <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent d904bfa7
......@@ -1674,8 +1674,9 @@ int qib_setup_eagerbufs(struct qib_ctxtdata *rcd)
if (!rcd->rcvegrbuf_phys) {
rcd->rcvegrbuf_phys =
kmalloc_node(chunk * sizeof(rcd->rcvegrbuf_phys[0]),
GFP_KERNEL, rcd->node_id);
GFP_KERNEL, rcd->node_id);
if (!rcd->rcvegrbuf_phys)
goto bail_rcvegrbuf;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment