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 C19A9C43334 for ; Mon, 27 Jun 2022 11:55:47 +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=TpN7HPcvT9MVf5CEw9Rob8w8FH7mt4nPWt3RIfM+KYI=; b=KAS2rduiGen/nJ g6FwLEjPBQecpCVKJ10ZCJ4XuLBwRxFhosBKHO0+zfpwwf7BKGtll49WX23yW+b/ufFilNuKJdQ3+ kLuN8McyzbFhrQYDHGJBh7L5FXMlsWr4s4XRow+PH9pf5jsuPDBtUH6KifBOOLIWrEwv4V8DIn5wT 2IQcVOTD3nBwyUmEuKojzXF+oQ/og216FM8E0vT1HlyzCe4UQu5zyuCgm5WsW1zlCZIfJpciB594B ujLmcnUxceoAOpJ/HmLliiVq8WW5oMKJQTtAVqQyIeYUN9+wJK1fOBLc2WiCM3nJ40x6zqgi40zJ6 IZozKRO2HrL0GwoePpWw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o5nKE-000iAi-By; Mon, 27 Jun 2022 11:54:42 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o5nKA-000i4k-Mb for linux-arm-kernel@lists.infradead.org; Mon, 27 Jun 2022 11:54:40 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id D170B2B; Mon, 27 Jun 2022 04:54:30 -0700 (PDT) Received: from e120937-lin (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id EBE503F792; Mon, 27 Jun 2022 04:54:29 -0700 (PDT) Date: Mon, 27 Jun 2022 12:54:23 +0100 From: Cristian Marussi To: Bo Liu Cc: sudeep.holla@arm.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] firmware: arm_scmi: Remove usage of the deprecated ida_simple_xxx API Message-ID: References: <20220616055052.4559-1-liubo03@inspur.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20220616055052.4559-1-liubo03@inspur.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220627_045438_839787_21054A58 X-CRM114-Status: GOOD ( 17.02 ) 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 Thu, Jun 16, 2022 at 01:50:52AM -0400, Bo Liu wrote: > Use ida_alloc_xxx()/ida_free() instead of > ida_simple_get()/ida_simple_remove(). > The latter is deprecated and more verbose. > > Signed-off-by: Bo Liu > --- Hi Bo, I've missed this patch of yours and I recently posted something similar using a bare ida_alloc() (so starting with id 0 instead). Anyway AFAIU, Sudeep will pick up your patch with a small change to use ida_alloc. Thanks for this, Cristian > drivers/firmware/arm_scmi/bus.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/drivers/firmware/arm_scmi/bus.c b/drivers/firmware/arm_scmi/bus.c > index f6fe723ab869..d4e23101448a 100644 > --- a/drivers/firmware/arm_scmi/bus.c > +++ b/drivers/firmware/arm_scmi/bus.c > @@ -181,7 +181,7 @@ scmi_device_create(struct device_node *np, struct device *parent, int protocol, > return NULL; > } > > - id = ida_simple_get(&scmi_bus_id, 1, 0, GFP_KERNEL); > + id = ida_alloc_min(&scmi_bus_id, 1, GFP_KERNEL); > if (id < 0) { > kfree_const(scmi_dev->name); > kfree(scmi_dev); > @@ -204,7 +204,7 @@ scmi_device_create(struct device_node *np, struct device *parent, int protocol, > put_dev: > kfree_const(scmi_dev->name); > put_device(&scmi_dev->dev); > - ida_simple_remove(&scmi_bus_id, id); > + ida_free(&scmi_bus_id, id); > return NULL; > } > > @@ -212,7 +212,7 @@ void scmi_device_destroy(struct scmi_device *scmi_dev) > { > kfree_const(scmi_dev->name); > scmi_handle_put(scmi_dev->handle); > - ida_simple_remove(&scmi_bus_id, scmi_dev->id); > + ida_free(&scmi_bus_id, scmi_dev->id); > device_unregister(&scmi_dev->dev); > } > > -- > 2.27.0 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel