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 22387C433FE for ; Thu, 3 Nov 2022 05:05:42 +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:References: 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: List-Owner; bh=k5ZbaO9JZpp0TXL8atrj9oSm8pAyTEXjN5OU9hexV6g=; b=0+D5eJy8Z6/MS9 YMvxj8n9TR0hmB5quMybEOc5RQcRuvU4TPKe/5LdwDdXfrlUB+QuzhN9uITZOwjK268m0zRyxZKkn 86+JXHK/TpqNUr39POfZ3tTYksnrB9+1szpPXbN6ce8j1o5rFPvZKwjvHpoi8uH1/7AK4Spq7Rb+j kY+JECyIaOrXgAHLtpb6kV0zrTjCgsAOjMcQJlyufdZ2bteUoWVDZU3SS8wW2I9rjWnEuLryYRrWD w2ymSYIr0kSzfrrRPNGBLv+A5Yyu9C8TeMUoTw7q85yC+PH9mqYCoREDglVbH3VaRqt2rETYIkuqo S6982QYqg9aDRPGPqo7Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oqSP9-00G632-H6; Thu, 03 Nov 2022 05:04:39 +0000 Received: from fllv0016.ext.ti.com ([198.47.19.142]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oqSP6-00G62f-SS for linux-arm-kernel@lists.infradead.org; Thu, 03 Nov 2022 05:04:38 +0000 Received: from fllv0035.itg.ti.com ([10.64.41.0]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 2A354Xm1121633; Thu, 3 Nov 2022 00:04:33 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1667451873; bh=iyDAmYDeroflNKLReuHpG9mB0WIknotKzeCIWGGdcQY=; h=Date:From:To:CC:Subject:References:In-Reply-To; b=qGcWLGYK7q/FIT1Y0vTvTiaVjczA2SoYm/2lEb/OgEWu2VNoFzRAJIZQtDksS70uU N56HTCD9kILZEqGUpxQEf5sTeHgs94xHiTIYmRcd55ALk7nNFqKQ9f/HL3MjRX7Eve AlzdehCDoy1NQ7VnYKAW/MbRrVjz8+rzGNwZ1E4E= Received: from DLEE114.ent.ti.com (dlee114.ent.ti.com [157.170.170.25]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 2A354XBY054071 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 3 Nov 2022 00:04:33 -0500 Received: from DLEE113.ent.ti.com (157.170.170.24) by DLEE114.ent.ti.com (157.170.170.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.6; Thu, 3 Nov 2022 00:04:33 -0500 Received: from fllv0040.itg.ti.com (10.64.41.20) by DLEE113.ent.ti.com (157.170.170.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.6 via Frontend Transport; Thu, 3 Nov 2022 00:04:33 -0500 Received: from localhost (ileaxei01-snat2.itg.ti.com [10.180.69.6]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id 2A354Xuf052085; Thu, 3 Nov 2022 00:04:33 -0500 Date: Thu, 3 Nov 2022 00:04:33 -0500 From: Nishanth Menon To: Christophe JAILLET CC: , , , , Subject: Re: [PATCH] firmware: ti_sci: Use devm_bitmap_zalloc when applicable Message-ID: <20221103050433.pp52c4goatd27gny@client> References: <1bd77909ff75f62a2228a39db208c4c6d1b3e0e2.1632659746.git.christophe.jaillet@wanadoo.fr> <20210927133807.rtkfjkxxlwpdqcnf@scouring> <788db74a-f3fd-4685-82b9-3257106c6260@wanadoo.fr> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <788db74a-f3fd-4685-82b9-3257106c6260@wanadoo.fr> User-Agent: NeoMutt/20171215 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221102_220437_018284_71B834C5 X-CRM114-Status: GOOD ( 22.84 ) 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="iso-8859-1" Content-Transfer-Encoding: quoted-printable Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 21:40-20221031, Christophe JAILLET wrote: > Le 27/09/2021 =E0 15:38, Nishanth Menon a =E9crit=A0: > > On 14:36-20210926, Christophe JAILLET wrote: > > > 'xfer_alloc_table' is a bitmap. So use 'devm_bitmap_zalloc()' to simp= lify > > > code and improve the semantic of the code. > > > = > > > While at it, remove a redundant 'bitmap_zero()' call. > > > = > > > Signed-off-by: Christophe JAILLET > > > --- > > > drivers/firmware/ti_sci.c | 8 +++----- > > > 1 file changed, 3 insertions(+), 5 deletions(-) > > > = > > > diff --git a/drivers/firmware/ti_sci.c b/drivers/firmware/ti_sci.c > > > index 235c7e7869aa..a33eb884102f 100644 > > > --- a/drivers/firmware/ti_sci.c > > > +++ b/drivers/firmware/ti_sci.c > > > @@ -3352,13 +3352,11 @@ static int ti_sci_probe(struct platform_devic= e *pdev) > > > if (!minfo->xfer_block) > > > return -ENOMEM; > > > - minfo->xfer_alloc_table =3D devm_kcalloc(dev, > > > - BITS_TO_LONGS(desc->max_msgs), > > > - sizeof(unsigned long), > > > - GFP_KERNEL); > > > + minfo->xfer_alloc_table =3D devm_bitmap_zalloc(dev, > > > + desc->max_msgs, > > > + GFP_KERNEL); > > > if (!minfo->xfer_alloc_table) > > > return -ENOMEM; > > > - bitmap_zero(minfo->xfer_alloc_table, desc->max_msgs); > > > /* Pre-initialize the buffer pointer to pre-allocated buffers */ > > > for (i =3D 0, xfer =3D minfo->xfer_block; i < desc->max_msgs; i++,= xfer++) { > > > -- = > > > 2.30.2 > > > = > > = > > Reviewed-by: Nishanth Menon > > = > = > Hi, > = > another similar patch has been merged against 'drivers/firmware/ti_sci.c' > just a few days ago, so this one could also be applied. > = > Let me know if I need to rebase and/or resend it. Yes please - please rebase and resend.. wow, [1] that is over an year old.. Sorry for letting it slip through the fingers [1] https://lore.kernel.org/all/1bd77909ff75f62a2228a39db208c4c6d1b3e0e2.16= 32659746.git.christophe.jaillet@wanadoo.fr/ -- = Regards, Nishanth Menon Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3 1A34 DDB5= 849D 1736 249D _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel