From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751956AbaLRQxD (ORCPT ); Thu, 18 Dec 2014 11:53:03 -0500 Received: from faui40.informatik.uni-erlangen.de ([131.188.34.40]:41562 "EHLO faui40.informatik.uni-erlangen.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751710AbaLRQvs (ORCPT ); Thu, 18 Dec 2014 11:51:48 -0500 From: Julian Brost To: Julian Brost , Fabian Hofmann Cc: linux-kernel@i4.cs.fau.de, Peter Zijlstra , Paul Mackerras , Ingo Molnar , Arnaldo Carvalho de Melo , Thomas Gleixner , "H. Peter Anvin" , x86@kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 2/5] perf/x86/intel/uncore: checkpatch: Replace kzalloc with kcalloc Date: Thu, 18 Dec 2014 17:51:37 +0100 Message-Id: <1418921500-5630-3-git-send-email-linux-kernel@0x4a42.net> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1418921500-5630-1-git-send-email-linux-kernel@0x4a42.net> References: <1418751050-11725-1-git-send-email-linux-kernel@0x4a42.net> <1418921500-5630-1-git-send-email-linux-kernel@0x4a42.net> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org kzalloc was used for an array allocation where kcalloc should be used. Cc: Peter Zijlstra Cc: Paul Mackerras Cc: Ingo Molnar Cc: Arnaldo Carvalho de Melo Cc: Thomas Gleixner Cc: "H. Peter Anvin" Cc: x86@kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Julian Brost Signed-off-by: Fabian Hofmann --- arch/x86/kernel/cpu/perf_event_intel_uncore.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kernel/cpu/perf_event_intel_uncore.c b/arch/x86/kernel/cpu/perf_event_intel_uncore.c index 9762dbd..161655f 100644 --- a/arch/x86/kernel/cpu/perf_event_intel_uncore.c +++ b/arch/x86/kernel/cpu/perf_event_intel_uncore.c @@ -725,7 +725,7 @@ static int __init uncore_type_init(struct intel_uncore_type *type) struct attribute **attrs; int i, j; - pmus = kzalloc(sizeof(*pmus) * type->num_boxes, GFP_KERNEL); + pmus = kcalloc(type->num_boxes, sizeof(*pmus), GFP_KERNEL); if (!pmus) return -ENOMEM; -- 1.9.1