From nobody Wed Jul 1 17:42:01 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3C826C433FE for ; Fri, 17 Dec 2021 21:37:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229804AbhLQVhU (ORCPT ); Fri, 17 Dec 2021 16:37:20 -0500 Received: from smtp03.smtpout.orange.fr ([80.12.242.125]:61057 "EHLO smtp.smtpout.orange.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229772AbhLQVhT (ORCPT ); Fri, 17 Dec 2021 16:37:19 -0500 Received: from pop-os.home ([86.243.171.122]) by smtp.orange.fr with ESMTPA id yKuhmDixnUGqlyKuhmEejY; Fri, 17 Dec 2021 22:37:16 +0100 X-ME-Helo: pop-os.home X-ME-Auth: YWZlNiIxYWMyZDliZWIzOTcwYTEyYzlhMmU3ZiQ1M2U2MzfzZDfyZTMxZTBkMTYyNDBjNDJlZmQ3ZQ== X-ME-Date: Fri, 17 Dec 2021 22:37:16 +0100 X-ME-IP: 86.243.171.122 From: Christophe JAILLET To: vneethv@linux.ibm.com, oberpar@linux.ibm.com, hca@linux.ibm.com, gor@linux.ibm.com, borntraeger@linux.ibm.com, agordeev@linux.ibm.com Cc: linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET Subject: [PATCH] powerpc/mpic: Use bitmap_zalloc() when applicable Date: Fri, 17 Dec 2021 22:37:13 +0100 Message-Id: X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" 'mpic->protected' is a bitmap. So use 'bitmap_zalloc()' to simplify code and improve the semantic, instead of hand writing it. Signed-off-by: Christophe JAILLET --- drivers/s390/cio/idset.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/s390/cio/idset.c b/drivers/s390/cio/idset.c index 45f9c0736be4..7e5550230c0f 100644 --- a/drivers/s390/cio/idset.c +++ b/drivers/s390/cio/idset.c @@ -25,11 +25,10 @@ static struct idset *idset_new(int num_ssid, int num_id) { struct idset *set; =20 - set =3D vmalloc(sizeof(struct idset) + bitmap_size(num_ssid, num_id)); + set =3D vzalloc(sizeof(struct idset) + bitmap_size(num_ssid, num_id)); if (set) { set->num_ssid =3D num_ssid; set->num_id =3D num_id; - memset(set->bitmap, 0, bitmap_size(num_ssid, num_id)); } return set; } --=20 2.30.2