From patchwork Fri Jun 18 15:16:51 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 12331621 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 565D8C48BDF for ; Fri, 18 Jun 2021 15:20:07 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2CC7B613E9 for ; Fri, 18 Jun 2021 15:20:07 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2CC7B613E9 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=NzPss2/rGTIvREVJm9xPIK2tnw4KqvG6Bx0VkuqgUIE=; b=coFQVgEV7SBBqb e0G1afyto9FIC2UuQ499Adyka7BLmshMA8jzMyUMA4LkscsWk0Mmid+I/0TqJr6eSEnh+I0l2NldX gOz0F/2MERIppu6uncqf3Ow3aBgcnRrR3zkSe277eRURFG9WtLTTKObwjjSUNtCX8T+AYPX01kLGa dImg6RE8XSl7jt0WmIgikaMT8PmOJFzEjPZsiFxHEntYrQabFkNZ9top0q3acYMZBCyAqK8tmb4eR +E7qL4SFuCCKXNfwOeBxH9dKVcgsLDdFLtF04lrSmBSRdJg1KJN0r9VmsWn3ZaZC/s7tJ5jKrmh1r w6DXT7UGeJlR/vxwDLyg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1luGFy-00EfPn-Eq; Fri, 18 Jun 2021 15:18:06 +0000 Received: from mga02.intel.com ([134.134.136.20]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1luGEu-00Ef7Z-P9 for linux-arm-kernel@lists.infradead.org; Fri, 18 Jun 2021 15:17:02 +0000 IronPort-SDR: lEt5T9N2wDMZhl2NLbABtbz4qrXl2pHrNkgYo0M+FinqhXkE0QnUAxZsjUvbGXPykkX6S+umqY jvl4nrOK6EHw== X-IronPort-AV: E=McAfee;i="6200,9189,10019"; a="193699525" X-IronPort-AV: E=Sophos;i="5.83,284,1616482800"; d="scan'208";a="193699525" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jun 2021 08:16:45 -0700 IronPort-SDR: MnDAIQ1s5CO6BrbYYxwt4okj6XfWmoA+g4scyFsxt8SUxSr57N/HIlASk6B9MiTcq7Txyg6yFX F2HLK5/PTqig== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.83,284,1616482800"; d="scan'208";a="453180745" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga008.fm.intel.com with ESMTP; 18 Jun 2021 08:16:43 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id C5A9C2AA; Fri, 18 Jun 2021 18:17:07 +0300 (EEST) From: Andy Shevchenko To: Marc Zyngier , Andy Shevchenko , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Tsahee Zidenberg , Antoine Tenart , Thomas Gleixner , Andrew Lunn , Gregory Clement , Sebastian Hesselbarth Subject: [PATCH v1 1/7] irqchip: Switch to bitmap_zalloc() Date: Fri, 18 Jun 2021 18:16:51 +0300 Message-Id: <20210618151657.65305-1-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210618_081700_904408_03FF2517 X-CRM114-Status: GOOD ( 11.22 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Switch to bitmap_zalloc() to show clearly what we are allocating. Besides that it returns pointer of bitmap type instead of opaque void *. Signed-off-by: Andy Shevchenko --- drivers/irqchip/irq-partition-percpu.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/irqchip/irq-partition-percpu.c b/drivers/irqchip/irq-partition-percpu.c index 89c23a1566dc..8e76d2913e6b 100644 --- a/drivers/irqchip/irq-partition-percpu.c +++ b/drivers/irqchip/irq-partition-percpu.c @@ -215,8 +215,7 @@ struct partition_desc *partition_create_desc(struct fwnode_handle *fwnode, goto out; desc->domain = d; - desc->bitmap = kcalloc(BITS_TO_LONGS(nr_parts), sizeof(long), - GFP_KERNEL); + desc->bitmap = bitmap_zalloc(nr_parts, GFP_KERNEL); if (WARN_ON(!desc->bitmap)) goto out;