Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3481542imu; Mon, 7 Jan 2019 04:17:33 -0800 (PST) X-Google-Smtp-Source: ALg8bN4hUPfybTJMTzjrFvVzgtbFfxb/njRdjwWnTxRFelHdUoSWs5q8r/XILektAq9WhQ0TxCWn X-Received: by 2002:a17:902:4464:: with SMTP id k91mr61819868pld.13.1546863452951; Mon, 07 Jan 2019 04:17:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546863452; cv=none; d=google.com; s=arc-20160816; b=E902TBZzWajT0mCX08G/mO9SRzd/ng4KqQ4kaLe9bbN8kBuDpwPiYpIscP2em/SMyH dO2nUGWxWAxDULELd/kP9wRmU0X0fex53/W4x8pSB7m/vaSazYFqDM51zpRLd7VyJ5LX 5wiLiw6BNcWbWvHR7QTWtCUzBfJwM7fv7aeW6BtBfGST5/NKeUr7oXk+ZpJPneNR9uvK NSfD/I8jDFCyPK8mVfEhMsBpngU707TTRVfIEuN0i+tASLD6ZhTLsfJZPQ9ees0Juq78 qsNk8BgfLkEInWf3MJmdcWLnHtdS8Ib1RK4j1MHUNrIBzM3EHW8P9WIrtNsqgVOtkW6T XozQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=jH9CrNlPsBPLHLYuKVj6SGrxbNmxvMkMnuI07USSvJc=; b=o2rhKAaqL9l7OttAVGJm2uS+c8zKBZKPqgyuHGY22EhU1DMJKUTJRTT7JcjJqfTuLx m8rbYJtqrvbzY8rGFLL0ADycKABKrnKYuV0N8OWpHp6KUta1roYUNHb2B2cF92OOrUej qGmpu+NesCsQdbvgLHDLp9gKfSyc1kI1ZegG2/C+N5ftZMR1OF3+esODEZa9yaldGCle xpCoKWfS7KnAnZn13ClhxcGgNDA4snp/SgkJ3AXw9DuQeDFEg/8yldK241onplXb9eoG x0qVRpDwTrvdZOHkEHxsTNyjc4W42VfBW6NB+qRWdKI9HjNu3H/tFK1sd1XzmSUfH0dn yABg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@163.com header.s=s110527 header.b=HCcLlEvh; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=163.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 21si25276603pge.374.2019.01.07.04.17.17; Mon, 07 Jan 2019 04:17:32 -0800 (PST) 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; dkim=pass header.i=@163.com header.s=s110527 header.b=HCcLlEvh; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=163.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726741AbfAGMQN (ORCPT + 99 others); Mon, 7 Jan 2019 07:16:13 -0500 Received: from m12-12.163.com ([220.181.12.12]:38265 "EHLO m12-12.163.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726511AbfAGMQM (ORCPT ); Mon, 7 Jan 2019 07:16:12 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-Id; bh=jH9CrNlPsBPLHLYuKV j6SGrxbNmxvMkMnuI07USSvJc=; b=HCcLlEvhIoO2mLJ++VnN0SytI7GGSi/r0/ ooKcREvSjLoIkKLJgRyUOg0CXZ1Pp5T/uDbY5EvehbASXyjFXF9CJTiSqNWc93HY IG3Xb4MKUun8QOgZhWaat07Ta+dhL5iMbN2RFsLsJHCyzm0GbZqjL0bMe3kT/+5e Dkf0bBkLc= Received: from localhost.localdomain (unknown [110.185.70.228]) by smtp8 (Coremail) with SMTP id DMCowAAHV7H7QjNccZCsIw--.48418S2; Mon, 07 Jan 2019 20:15:56 +0800 (CST) From: wangbo To: linux-kernel@vger.kernel.org Cc: paulus@ozlabs.org, kvm-ppc@vger.kernel.org, wang.bo116@zte.com.cn Subject: [PATCH] KVM: PPC: Book3S: Replace kmalloc_node+memset with kzalloc_node Date: Mon, 7 Jan 2019 20:15:52 +0800 Message-Id: <1546863352-23593-1-git-send-email-wdjjwb@163.com> X-Mailer: git-send-email 2.7.4 X-CM-TRANSID: DMCowAAHV7H7QjNccZCsIw--.48418S2 X-Coremail-Antispam: 1Uf129KBjvdXoWrtrWDtr15ZF17uw4xXr1fZwb_yoWfJrb_Zw 4xZr47W348Ar4fWr1DXr47XFZ5Jw47Ary09r1jva17Aws0yrWrJ392vF1Dur97WrWxZrZY kFWqgwnFv3W0kjkaLaAFLSUrUUUUbb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7IU0F4iUUUUUU== X-Originating-IP: [110.185.70.228] X-CM-SenderInfo: xzgmy4re6rljoofrz/1tbiEBw1GVWBjOsOBAAAsZ Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Replace kmalloc_node and memset with kzalloc_node Signed-off-by: wangbo --- arch/powerpc/kvm/book3s_hv.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/arch/powerpc/kvm/book3s_hv.c b/arch/powerpc/kvm/book3s_hv.c index 5a066fc..27112b7 100644 --- a/arch/powerpc/kvm/book3s_hv.c +++ b/arch/powerpc/kvm/book3s_hv.c @@ -5342,13 +5342,11 @@ static int kvm_init_subcore_bitmap(void) continue; sibling_subcore_state = - kmalloc_node(sizeof(struct sibling_subcore_state), + kzalloc_node(sizeof(struct sibling_subcore_state), GFP_KERNEL, node); if (!sibling_subcore_state) return -ENOMEM; - memset(sibling_subcore_state, 0, - sizeof(struct sibling_subcore_state)); for (j = 0; j < threads_per_core; j++) { int cpu = first_cpu + j; -- 2.7.4