Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp841738imw; Fri, 8 Jul 2022 12:47:01 -0700 (PDT) X-Google-Smtp-Source: AGRyM1t034Ql7R7fJywBxGfWuIckozdXfM70bdKtGrFizESmA8NRzt6ml0m7uwvg7u4S81mfgr0v X-Received: by 2002:a17:906:8463:b0:72a:477a:55bf with SMTP id hx3-20020a170906846300b0072a477a55bfmr5223959ejc.267.1657309621313; Fri, 08 Jul 2022 12:47:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657309621; cv=none; d=google.com; s=arc-20160816; b=A6MUZfZrTJeRsA5Uj+1kbKrrqZSJDLhGYxrKoZC7VzvNtjQ+INtRFrcbK3OjcBTrhY OsJ48aZWcC2WX0+cuNxDifH+9dZ0YPwEt9ql/GTCc2aukUIvJFPosT5cc3XYgGYR6vlL 8b7kDqKcBeqYDJUtUI3DTPA6fkseubrf3t+E/xdc76wr4XUv6rR5VvMVmeCeXPVCcTlZ acb7m1lJW9/pt8talVhSI94bijl8sLZydw772P7x9HECxciC8D9YhWecP/uUPbyPDq0o a8UQx2ntyi9VTW23qRQ8DA6oO0j2pZp5IcnXt75Mdcy8phOAJURlrNKMihUEgSR8tvq6 qd5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=b4dB0QboxPslaJKDv4axspHdZK8ENL72YeCgP42T+z8=; b=bdo+267+FOLIHbxYd4RuNPP/0+Ad5y5tIXUQRpoqCqxrwvx/X88HAnLVjd24Llzie0 qdILYiaRPO00itLpuLUu7JkH7IP/K3T9FAelOp3RAjVRHqgVDiTmboDp10/Rp5nmfbc2 Wgkvc7emArZdM7on1p1yhgzTYwKp1nhM/n7Yg4c1LJlkFZ1jW7Y8msjU7I/0dXPrnvlq BcIiNdOONTfrVyRM871O+qbtEHRituVY1OHhf4ubu8ZVHQCYIt0fQNgm2EP4N9/XKm4I 8zJiuhfmw5R9B0gU4VacqWWemKg7zodAIaN/EcNZs07kzleOUqXnBTYfT7dX2Hu6FLvz BM3A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z10-20020a056402274a00b00435c21a3a80si10084505edd.15.2022.07.08.12.46.34; Fri, 08 Jul 2022 12:47:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239577AbiGHTXz (ORCPT + 99 others); Fri, 8 Jul 2022 15:23:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35560 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239565AbiGHTXx (ORCPT ); Fri, 8 Jul 2022 15:23:53 -0400 Received: from smtp.smtpout.orange.fr (smtp04.smtpout.orange.fr [80.12.242.126]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CF02924953 for ; Fri, 8 Jul 2022 12:23:50 -0700 (PDT) Received: from pop-os.home ([90.11.190.129]) by smtp.orange.fr with ESMTPA id 9tZroHmKEEhCQ9tZrokYfy; Fri, 08 Jul 2022 21:23:48 +0200 X-ME-Helo: pop-os.home X-ME-Auth: YWZlNiIxYWMyZDliZWIzOTcwYTEyYzlhMmU3ZiQ1M2U2MzfzZDfyZTMxZTBkMTYyNDBjNDJlZmQ3ZQ== X-ME-Date: Fri, 08 Jul 2022 21:23:48 +0200 X-ME-IP: 90.11.190.129 From: Christophe JAILLET To: Nishanth Menon , Tero Kristo , Santosh Shilimkar Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET , linux-arm-kernel@lists.infradead.org Subject: [PATCH 1/2] firmware: ti_sci: Use the bitmap API to allocate bitmaps Date: Fri, 8 Jul 2022 21:23:46 +0200 Message-Id: <3ee11e9e83f7c1552d237f5c28f554319fcbbf1f.1657308216.git.christophe.jaillet@wanadoo.fr> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use devm_bitmap_zalloc() instead of hand-writing them. It is less verbose and it improves the semantic. Signed-off-by: Christophe JAILLET --- drivers/firmware/ti_sci.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/firmware/ti_sci.c b/drivers/firmware/ti_sci.c index ebc32bbd9b83..522be2b75ce1 100644 --- a/drivers/firmware/ti_sci.c +++ b/drivers/firmware/ti_sci.c @@ -3201,9 +3201,8 @@ devm_ti_sci_get_resource_sets(const struct ti_sci_handle *handle, valid_set = true; res_count = res->desc[i].num + res->desc[i].num_sec; - res->desc[i].res_map = - devm_kzalloc(dev, BITS_TO_LONGS(res_count) * - sizeof(*res->desc[i].res_map), GFP_KERNEL); + res->desc[i].res_map = devm_bitmap_zalloc(dev, res_count, + GFP_KERNEL); if (!res->desc[i].res_map) return ERR_PTR(-ENOMEM); } -- 2.34.1