Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp2950207imm; Thu, 24 May 2018 19:43:59 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpiySlSImfgS9m41ToHRNBYn0/mP51AiKrnp5cmELk13lPpIDp+omGF0vSI8Zbzk8n19au/ X-Received: by 2002:a17:902:a716:: with SMTP id w22-v6mr586956plq.215.1527216239300; Thu, 24 May 2018 19:43:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527216239; cv=none; d=google.com; s=arc-20160816; b=g86Bu0ocXar/5Ec8KxEJteSpnc/Vi33CyBMixpLSsmsl/IZZkCjEkXhgkK1aoTTwa8 ZltWzH2ayQASGuOqpIz2SawUySj9kDSkIvTKU3zRi6OXi+k5absRo/6MHZ7B/oR/iS0W FY4dlXFNvAyWhSpCDUR3iEUSoRRKEE7w9c7Cl/cZQgKstAftRDv4CEoKDjaXkhBC2k4K a5Gem32IQAzyAbC9PwE2pjij1IAPA3/L3nv9rfMP2nJH2zYgiBJy1FH5htuSc/k7385+ MC+r8coGxQeeFQm7nsE04LWLT5v5DTDAkCZb0TajWKCD4HJTK/FZQzUlFbsBi7jCJOMn ak4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=NzQZS6hHDxwHsKil+Qac3Ac/TGVojm/zkMXvGacwzxI=; b=lKnzLrpNubG5IYyn1HDpXK7ujD4OgzxfQ+2qhD3YRw0LPfl7ORe2gXedlmj8ToGtMs 3116/TTajhpLee5WjFyjzatvirW1XYbaOuuLuk8C1FfAhyai0fkIc3+oSrOcLKMJIOtG 4yleZ8FutezQOUuRBfeFkunqlVEkmLnd0I+sWtR2QZEhkdLDDmGcS8Bj10oEondzMd16 h1/WcRHcIaFPhglIk6gxCDtpV/UMCcb/N/A3xjFtfgMUAgfuqIUURY56+uCNL9TPapAr VuTyUOSbYub6yMwjeyKgrH5WvbY7Q5woWplcEOzYxCY7dFYt/Mp48OLTJrTzcMFLdNfG l21Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e26-v6si22064835pfn.244.2018.05.24.19.43.45; Thu, 24 May 2018 19:43:59 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1161371AbeEXV2h (ORCPT + 99 others); Thu, 24 May 2018 17:28:37 -0400 Received: from smtp2.provo.novell.com ([137.65.250.81]:55055 "EHLO smtp2.provo.novell.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1161324AbeEXV2e (ORCPT ); Thu, 24 May 2018 17:28:34 -0400 Received: from linux-n805.suse.de (prv-ext-foundry1int.gns.novell.com [137.65.251.240]) by smtp2.provo.novell.com with ESMTP (TLS encrypted); Thu, 24 May 2018 15:28:21 -0600 From: Davidlohr Bueso To: akpm@linux-foundation.org, torvalds@linux-foundation.org Cc: tgraf@suug.ch, herbert@gondor.apana.org.au, manfred@colorfullife.com, guillaume.knispel@supersonicimagine.com, linux-api@vger.kernel.org, linux-kernel@vger.kernel.org, Davidlohr Bueso , Davidlohr Bueso Subject: [PATCH 3/6] lib/bucket_locks: use kvmalloc_array() Date: Thu, 24 May 2018 14:11:32 -0700 Message-Id: <20180524211135.27760-4-dave@stgolabs.net> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20180524211135.27760-1-dave@stgolabs.net> References: <20180524211135.27760-1-dave@stgolabs.net> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org For some reason we don't use this call, but we rely just fine on kmalloc_array(). Make both consistent. Signed-off-by: Davidlohr Bueso --- lib/bucket_locks.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/bucket_locks.c b/lib/bucket_locks.c index 266a97c5708b..75fe7386756f 100644 --- a/lib/bucket_locks.c +++ b/lib/bucket_locks.c @@ -31,7 +31,7 @@ int alloc_bucket_spinlocks(spinlock_t **locks, unsigned int *locks_mask, if (sizeof(spinlock_t) != 0) { if (gfpflags_allow_blocking(gfp)) - tlocks = kvmalloc(size * sizeof(spinlock_t), gfp); + tlocks = kvmalloc_array(size, sizeof(spinlock_t), gfp); else tlocks = kmalloc_array(size, sizeof(spinlock_t), gfp); if (!tlocks) -- 2.13.6