From patchwork Wed Nov 1 09:39:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe JAILLET X-Patchwork-Id: 160492 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:abcd:0:b0:403:3b70:6f57 with SMTP id f13csp290095vqx; Wed, 1 Nov 2023 02:40:02 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFcllOxjf0iwnaMNO4LxpBp5ZnOx3DsR7+A7cfhX1MMmAE4Fk0tgjgo0H19qDdjPCMnVACS X-Received: by 2002:a05:6808:6383:b0:3ae:21d1:8040 with SMTP id ec3-20020a056808638300b003ae21d18040mr15290573oib.36.1698831602334; Wed, 01 Nov 2023 02:40:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698831602; cv=none; d=google.com; s=arc-20160816; b=G1oMuUJ9whUrwjx0Ypc/UHiOlpGQIPvXvdsq0TuW4iIGXzwlCtKtJnQjGCthb4CGzq 6agr7NWqrn46Wp2eHM24sM4oRu5dlKu6nqivWo5cpB63oK2zyi0bpmwz3lSf47/aQv+A 6N+lDoRYbc2ydKdANaiQbfV8Q91pZczwkMjW+bb0vygUyXdkReB4lkChD98VwFtLgPlJ UidyIW4ASG3StJGzZuCYGHeqUw/LMKPMMsGeZp4WfMVwDvC+QO4s1sleaj89t4FwhAUd 5UCj85W1GTdZ0ZkUGN5ALm5Za4U6tEu0ZQW3C+f8I7Aot9QU8PRuQl7GOyA500wXPxjW soDw== 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:dkim-signature; bh=Agd+7JRg0SYMOgT8/FQFavX9NvEOiLdyeBNbj4j9/Wk=; fh=sIc/rw8uWO9iJ4ua3V9B14X9ko9GSYnDTIxJUcs2Gxc=; b=ee/NVqBicLagGFk1ip4PQ1ALqL6Ia8MREC0mHRF49UTscML+wQjID2gw3nXkGyoO8j TFx8YJ4bGFEkoWxqW927clxxEHUhMTMTdnzVufPfoHjVY3RE6cnJMpNl3sDfRxOzBDY4 VffWFKTHvoZ2MDM6j2ebvoN3kMvOEos3hKhhdeE+4hBuGY2zbn4v5dyMe/n6WklCnS8o fXbB66hs5JXakMOjbu9eZoHhpBJUYEM/FetBPKOqFZBlxAlnY0yCeDyMnQpMiO8Xv0Vy r5GVSK3BxKWyTBV1ryqjP+f6pSZ7ansGTHNnrAtN89ENw0fru+atuho2lJg2v3NL1ap9 HRjA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@wanadoo.fr header.s=t20230301 header.b=iO35WINf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=wanadoo.fr Received: from pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id s127-20020a637785000000b005b95fbd816esi2584616pgc.677.2023.11.01.02.40.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Nov 2023 02:40:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; dkim=pass header.i=@wanadoo.fr header.s=t20230301 header.b=iO35WINf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=wanadoo.fr Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 3E31180562EE; Wed, 1 Nov 2023 02:40:00 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231225AbjKAJjs (ORCPT + 35 others); Wed, 1 Nov 2023 05:39:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36996 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229490AbjKAJjq (ORCPT ); Wed, 1 Nov 2023 05:39:46 -0400 Received: from smtp.smtpout.orange.fr (smtp-21.smtpout.orange.fr [80.12.242.21]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0DF8FF3 for ; Wed, 1 Nov 2023 02:39:43 -0700 (PDT) Received: from pop-os.home ([86.243.2.178]) by smtp.orange.fr with ESMTPA id y7hOqJVASdj4Iy7hOqNV22; Wed, 01 Nov 2023 10:39:42 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wanadoo.fr; s=t20230301; t=1698831582; bh=Agd+7JRg0SYMOgT8/FQFavX9NvEOiLdyeBNbj4j9/Wk=; h=From:To:Cc:Subject:Date; b=iO35WINfQ9dNQH3zjqcQwXjwqASluxQOhG4v2UpWNHVAR8x8S3E/KocaHeDrAYdrx LltCP6l+BqS+2/90Hwt8df7OzjTZEJThWtn+l2oQntfg4JsdeczILqergFVROElnP8 1up+F3NbCSaPfNwgeNoGz12/kkaElTwLyMqX85SAa0Air+3bVVqmnAkbG2nXwUrBVT Q+J+dfmWuDU2hoOAIkKtcBT2TYDhw2W5Fg12+Vz2yw9aZznYernLvrnoL52uCqfati Zr2fKFjH4qNWxMZB+A0tbK+XLMIRt1+d2ez3Esd8Z6PbRpW+KBBDO5/4LdlH85geCU sFOF8fvhCb6XQ== X-ME-Helo: pop-os.home X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Wed, 01 Nov 2023 10:39:42 +0100 X-ME-IP: 86.243.2.178 From: Christophe JAILLET To: Sebastian Reichel Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET Subject: [PATCH] HSI: omap_ssi: Remove usage of the deprecated ida_simple_xx() API Date: Wed, 1 Nov 2023 10:39:39 +0100 Message-Id: X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, 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 pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Wed, 01 Nov 2023 02:40:00 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1781354046617866280 X-GMAIL-MSGID: 1781354046617866280 ida_alloc() and ida_free() should be preferred to the deprecated ida_simple_get() and ida_simple_remove(). This is less verbose. Signed-off-by: Christophe JAILLET --- drivers/hsi/controllers/omap_ssi_core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/hsi/controllers/omap_ssi_core.c b/drivers/hsi/controllers/omap_ssi_core.c index 4c1a00f9929e..6802efb4d6cd 100644 --- a/drivers/hsi/controllers/omap_ssi_core.c +++ b/drivers/hsi/controllers/omap_ssi_core.c @@ -355,7 +355,7 @@ static int ssi_add_controller(struct hsi_controller *ssi, if (!omap_ssi) return -ENOMEM; - err = ida_simple_get(&platform_omap_ssi_ida, 0, 0, GFP_KERNEL); + err = ida_alloc(&platform_omap_ssi_ida, GFP_KERNEL); if (err < 0) return err; ssi->id = err; @@ -417,7 +417,7 @@ static int ssi_add_controller(struct hsi_controller *ssi, return 0; out_err: - ida_simple_remove(&platform_omap_ssi_ida, ssi->id); + ida_free(&platform_omap_ssi_ida, ssi->id); return err; } @@ -451,7 +451,7 @@ static void ssi_remove_controller(struct hsi_controller *ssi) tasklet_kill(&omap_ssi->gdd_tasklet); hsi_unregister_controller(ssi); clk_notifier_unregister(omap_ssi->fck, &omap_ssi->fck_nb); - ida_simple_remove(&platform_omap_ssi_ida, id); + ida_free(&platform_omap_ssi_ida, id); } static inline int ssi_of_get_available_ports_count(const struct device_node *np)