From mboxrd@z Thu Jan 1 00:00:00 1970 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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 5C236C433EF for ; Tue, 5 Jul 2022 20:05:00 +0000 (UTC) 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:In-Reply-To:MIME-Version:Message-ID: Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:References: List-Owner; bh=T7v+HpFL3ggV8e5+39aTLQufsx4AbEQBrPyM9vHsdsY=; b=eWn4H1OPzfY7r2 XmljUL0qxZAe5HSHDTtG1880NBzWmaDnFRLZJtGZn/IF14YsliIRu7YyO5Ex3aGmZHJWzxBGFQJv4 UnY545/NL8ZPlEAiLmtd2IqgNGKsvNvIimQGpZsBvCJRqqBM66qrJ1m/KEvXrazmSIqYBURWRDeLT GWHcrlVGLXs/cbLAK+ZxqaL6FpYe8f8wQEwTeo6t50MneDLNOWQuDhWuWeB2pb56CyTuK0IRBfaxX lgQMrHqoHmHGW8mGmU+GRegVCS6EJK0/yBF/kJLayFtwH4bS8vTo22XUU7zs/UVmR+Wp3RTiX/rnu tf907tvn0aCRptErkTIA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o8om0-002Wau-IB; Tue, 05 Jul 2022 20:03:52 +0000 Received: from sin.source.kernel.org ([2604:1380:40e1:4800::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1o8olw-002WY9-7e for linux-arm-kernel@lists.infradead.org; Tue, 05 Jul 2022 20:03:50 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id 9C742CE1CDE; Tue, 5 Jul 2022 20:03:44 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A01E8C341C7; Tue, 5 Jul 2022 20:03:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1657051422; bh=z+VSOPZHJdUGcIPzt3HH3vim1AKYQpXZNPySuOqur1c=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=CzGjJ6s+WAWlKor2phjuf7ooM/Vupuguc09eReuXWoPLeN4ANOmN38Bt7+GaaUuuY vTjkp+Xl37VN2DXwTigD++pVNzozDZpHfGrUKdyNlDX4hC61PaETI31VPXle93gjsH vQPEuY9y4aLonw3G560bNngRJ6YdG5lWcIvyndrf7zBKWh+he8dRq7YVEjuABE1Qy8 gHw6zKb1OS6jec1P+yxCglegfhkHdNwQlF8MrQgSeEt0DlTvR7gdVVsatUM6yJ9V4C VL194AOgBWCYMj+V+9uFVBKj6y8Mf0uY9XNScPbx7sYdQaRatOoesNGbI9dq2rzXXQ tjTFuxtNwEZMQ== Date: Tue, 5 Jul 2022 15:03:41 -0500 From: Bjorn Helgaas To: Christophe JAILLET Cc: Lorenzo Pieralisi , Rob Herring , Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= , Bjorn Helgaas , Ray Jui , Scott Branden , Broadcom internal kernel review list , linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH] PCI: iproc: Use the bitmap API to allocate bitmaps Message-ID: <20220705200341.GA80171@bhelgaas> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220705_130348_505707_AE818339 X-CRM114-Status: GOOD ( 17.91 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Jul 04, 2022 at 03:15:03PM +0200, Christophe JAILLET wrote: > Use bitmap_zalloc()/bitmap_free() instead of hand-writing them. > > It is less verbose and it improves the semantic. > > Signed-off-by: Christophe JAILLET Applied with Ray's ack to pci/ctrl/iproc for v5.20, thanks! > --- > drivers/pci/controller/pcie-iproc-msi.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/pci/controller/pcie-iproc-msi.c b/drivers/pci/controller/pcie-iproc-msi.c > index 757b7fbcdc59..fee036b07cd4 100644 > --- a/drivers/pci/controller/pcie-iproc-msi.c > +++ b/drivers/pci/controller/pcie-iproc-msi.c > @@ -589,8 +589,8 @@ int iproc_msi_init(struct iproc_pcie *pcie, struct device_node *node) > msi->has_inten_reg = true; > > msi->nr_msi_vecs = msi->nr_irqs * EQ_LEN; > - msi->bitmap = devm_kcalloc(pcie->dev, BITS_TO_LONGS(msi->nr_msi_vecs), > - sizeof(*msi->bitmap), GFP_KERNEL); > + msi->bitmap = devm_bitmap_zalloc(pcie->dev, msi->nr_msi_vecs, > + GFP_KERNEL); > if (!msi->bitmap) > return -ENOMEM; > > -- > 2.34.1 > > > _______________________________________________ > linux-arm-kernel mailing list > linux-arm-kernel@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel