Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp1191671iog; Thu, 16 Jun 2022 00:32:02 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sk+U1Pe7Wmlof4BYa81OPZMI5EeiTRSUFxr2nKJm+a/0SNIa5N74esQs1Hf7hJDgcnmIFG X-Received: by 2002:a05:6a00:8d3:b0:51e:740f:8d60 with SMTP id s19-20020a056a0008d300b0051e740f8d60mr3359541pfu.55.1655364722136; Thu, 16 Jun 2022 00:32:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655364722; cv=none; d=google.com; s=arc-20160816; b=xa7w4u9eyVQ4pCrwpF7m+UOuuJgRFsO23ORCVZn6yfKI9A1NMRVkQEjInEXz843/xd wEhLT0HAastuA4FYt58m+5qkuYbltuDpq+UziNclDcZh82TPWRPfMJTuErTlkwsgGNLo oVQ4H7kYG/aiPAxhwDciCC320zlyxyUOh4z9E1k9aqLOBgtzDXN2nVqcgbd1vGk8LsfG 3KnMtZcGliZY0Vrh4dFzV2FuFtxIGOimJsyG8H5vNyNec0qKw3K5kUf/RxD3m2485KaE GyzhJJ/YZ4ivTww3vMi8NgbOm2ARJTrm4xt1fkkbLmcuJdSw2HxxiZ2o3mdTB05afey7 z92Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:abuse-reports-to:tuid:mime-version:message-id :date:subject:cc:to:from; bh=MjaPcq4+bAZLEaAUY+1wLlheFw/SWg3qbOby2yY3cbI=; b=I7SBX+daszKolnEz9yGKoksPJYyydWpIYn5WcwndpMBSjPyUz1F/16hvSPnQS3EUh7 lcgXmhsFwFwrD5ExvZCo6wcoKQhbHA4wXiySFSwfk2dH1UCyWIwvZEf4SRCW7ChmjwB0 1dZveYwgX1u0QvEOOGDYj966NAx9hvHwdSkoe0IfRpNC8DtTq6VY7zdU/Xh1VgEXPXqY +sSZY7WR57xIQxleERI49obXoPsaHxNB0YCaeHDvp29hm7AEvX+A11Nn0fbWT9Yg8vfd iu1uvpz7wJvmPRAgFnL56BTxmNEBnE7BsGpyQvjpxmGYeC9+Gklm8/JX0fukfNxNnEsx cOow== 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 s20-20020a056a00195400b004fa3a8e003fsi1804350pfk.246.2022.06.16.00.31.49; Thu, 16 Jun 2022 00:32:02 -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 S1358797AbiFPHMZ (ORCPT + 99 others); Thu, 16 Jun 2022 03:12:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57632 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229718AbiFPHMY (ORCPT ); Thu, 16 Jun 2022 03:12:24 -0400 Received: from unicom145.biz-email.net (unicom145.biz-email.net [210.51.26.145]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 415135BD34 for ; Thu, 16 Jun 2022 00:12:19 -0700 (PDT) Received: from ([60.208.111.195]) by unicom145.biz-email.net ((D)) with ASMTP (SSL) id KDC00116; Thu, 16 Jun 2022 15:12:16 +0800 Received: from localhost.localdomain (10.200.104.97) by jtjnmail201601.home.langchao.com (10.100.2.1) with Microsoft SMTP Server id 15.1.2308.27; Thu, 16 Jun 2022 15:12:16 +0800 From: Bo Liu To: , CC: , , Bo Liu Subject: [PATCH] firmware: arm_scmi: Remove usage of the deprecated ida_simple_xxx API Date: Thu, 16 Jun 2022 01:50:52 -0400 Message-ID: <20220616055052.4559-1-liubo03@inspur.com> X-Mailer: git-send-email 2.18.2 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.200.104.97] tUid: 202261615121680575a135cc1fb6a44243d32fd659860 X-Abuse-Reports-To: service@corp-email.com Abuse-Reports-To: service@corp-email.com X-Complaints-To: service@corp-email.com X-Report-Abuse-To: service@corp-email.com X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 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 --- 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