Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp841418imw; Fri, 8 Jul 2022 12:46:34 -0700 (PDT) X-Google-Smtp-Source: AGRyM1slZMz6bHDD4eFkGQqt5m/nNESJBwedru7o7dz5ngQukdZU/4znvlyrHev30TfJKZqK1Jb2 X-Received: by 2002:a05:6402:3326:b0:43a:902b:d335 with SMTP id e38-20020a056402332600b0043a902bd335mr6965869eda.412.1657309593925; Fri, 08 Jul 2022 12:46:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657309593; cv=none; d=google.com; s=arc-20160816; b=Got71dp7WDBnGpJlgSJMjMf4BB8Uq/Kqyz85CVaXHEdXIyady5MuSJsI59hNfVFlKF 0kvsukNiLBJbjqhIa3hqj6963ZN5eusWvEcmRCwgwUWKrCWFRIVznUW1y/5uPfKa4AfD HEwGJMd6DD4at5v5PWs1YGvlGxHB+sn+hb6v611uiP6yrj10rGT+Kqc/HFBnvXOHckIr jQuhXKJJZ2uNWx21+5eRkT4YbQzasNcNEiMi6kRItvtWa63lfxrxoNPMgC0UpfpINIUn j9ju0bmlBk9S3BWIMQD7y+lYsr8YJqHENLUmVv81/53KPiNDifKeyKwP/rv2MQnPHo9R GsxQ== 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=r8j8fgh5AldSRlNbB2BABOo+Ntp6IT5t2dq1qTQRV6Y=; b=bx50RDhw72ta3W4PWeaEhVQB0OSTGPVmx7c3cf1keMBx4a/+XXi07dyOyAAkbR5e4k F3oN0jQhBcfxJAPXn7eW47xcjtPYBdn2oz4QeYyNzPYm56JKgVmA2FImd6PLGR61PemJ qYxBQTV1+KbmIooPg6EwZGbZhoaJHhG1MgOzC5ej3amczd/zHL3SYUAAJbbITNUbPwHH tdE8I+clfHJVPU+VF1wbyclxIswVhUFBA7uvD56E8wU2vG+AdDnwldYWOdpBYhGyu2p1 hFoyYNRx608lYK4WSGy6968OYE5U2/45x0b7akBGA4aXJBRUst5ScSmF0NV9Hpo68/9K VPYw== 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 z6-20020a170906240600b007262d20ea75si1852415eja.261.2022.07.08.12.46.08; Fri, 08 Jul 2022 12:46:33 -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 S239854AbiGHTbF (ORCPT + 99 others); Fri, 8 Jul 2022 15:31:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40646 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239918AbiGHTaw (ORCPT ); Fri, 8 Jul 2022 15:30:52 -0400 Received: from smtp.smtpout.orange.fr (smtp03.smtpout.orange.fr [80.12.242.125]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DE29A796B4 for ; Fri, 8 Jul 2022 12:30:08 -0700 (PDT) Received: from pop-os.home ([90.11.190.129]) by smtp.orange.fr with ESMTPA id 9tfuo7mRnJXxR9tfvojggV; Fri, 08 Jul 2022 21:30:07 +0200 X-ME-Helo: pop-os.home X-ME-Auth: YWZlNiIxYWMyZDliZWIzOTcwYTEyYzlhMmU3ZiQ1M2U2MzfzZDfyZTMxZTBkMTYyNDBjNDJlZmQ3ZQ== X-ME-Date: Fri, 08 Jul 2022 21:30:07 +0200 X-ME-IP: 90.11.190.129 From: Christophe JAILLET To: Sudeep Holla , Cristian Marussi Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET , linux-arm-kernel@lists.infradead.org Subject: [PATCH] firmware: arm_scmi: Use the bitmap API to allocate bitmaps Date: Fri, 8 Jul 2022 21:30:01 +0200 Message-Id: X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.6 required=5.0 tests=BAYES_00, RCVD_IN_BL_SPAMCOP_NET,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no 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/arm_scmi/driver.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/firmware/arm_scmi/driver.c b/drivers/firmware/arm_scmi/driver.c index 609ebedee9cb..b1265732d83a 100644 --- a/drivers/firmware/arm_scmi/driver.c +++ b/drivers/firmware/arm_scmi/driver.c @@ -1911,8 +1911,8 @@ static int __scmi_xfer_info_init(struct scmi_info *sinfo, hash_init(info->pending_xfers); /* Allocate a bitmask sized to hold MSG_TOKEN_MAX tokens */ - info->xfer_alloc_table = devm_kcalloc(dev, BITS_TO_LONGS(MSG_TOKEN_MAX), - sizeof(long), GFP_KERNEL); + info->xfer_alloc_table = devm_bitmap_zalloc(dev, MSG_TOKEN_MAX, + GFP_KERNEL); if (!info->xfer_alloc_table) return -ENOMEM; -- 2.34.1