Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752535AbdI0IVy (ORCPT ); Wed, 27 Sep 2017 04:21:54 -0400 Received: from mx2.suse.de ([195.135.220.15]:37585 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752163AbdI0IVI (ORCPT ); Wed, 27 Sep 2017 04:21:08 -0400 From: Johannes Thumshirn To: Christoph Lameter , Pekka Enberg , David Rientjes , Joonsoo Kim , Andrew Morton Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Damien Le Moal , Christoph Hellwig , Johannes Thumshirn Subject: [PATCH 4/6] IB/rdmavt: use kmalloc_array_node Date: Wed, 27 Sep 2017 10:20:36 +0200 Message-Id: <20170927082038.3782-5-jthumshirn@suse.de> X-Mailer: git-send-email 2.13.5 In-Reply-To: <20170927082038.3782-1-jthumshirn@suse.de> References: <20170927082038.3782-1-jthumshirn@suse.de> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 936 Lines: 24 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 calculation. Signed-off-by: Johannes Thumshirn --- drivers/infiniband/sw/rdmavt/qp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/infiniband/sw/rdmavt/qp.c b/drivers/infiniband/sw/rdmavt/qp.c index 22df09ae809e..b8e904905f47 100644 --- a/drivers/infiniband/sw/rdmavt/qp.c +++ b/drivers/infiniband/sw/rdmavt/qp.c @@ -238,7 +238,7 @@ int rvt_driver_qp_init(struct rvt_dev_info *rdi) rdi->qp_dev->qp_table_size = rdi->dparms.qp_table_size; rdi->qp_dev->qp_table_bits = ilog2(rdi->dparms.qp_table_size); rdi->qp_dev->qp_table = - kmalloc_node(rdi->qp_dev->qp_table_size * + kmalloc_array_node(rdi->qp_dev->qp_table_size, sizeof(*rdi->qp_dev->qp_table), GFP_KERNEL, rdi->dparms.node); if (!rdi->qp_dev->qp_table) -- 2.13.5