From patchwork Wed Nov 1 15:55:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe JAILLET X-Patchwork-Id: 160593 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:abcd:0:b0:403:3b70:6f57 with SMTP id f13csp519513vqx; Wed, 1 Nov 2023 08:56:10 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFo9F1QyvYwxzIFn+ZR/J6tZONYcdqa3Q6kpmkLnVqcSspSv8fsOhsb5bhltqX4eNW9en5V X-Received: by 2002:a05:6a00:178e:b0:6b8:f7ed:4deb with SMTP id s14-20020a056a00178e00b006b8f7ed4debmr19897597pfg.13.1698854170377; Wed, 01 Nov 2023 08:56:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698854170; cv=none; d=google.com; s=arc-20160816; b=cqwdhSOYkaTK8aE0kFH3X2xsQf/you+PUTv4l1G+8XWbvS/LY2+9F+6doanh5zwof0 DFmdbXGZMFeNOYJtWbblpAdVGhM6IOFx2NHR/QSsiAKjqjwy2JwDFN/8leALdH8FBLe+ wI0WKoJrpu7pT4m50tiM6AwoNmvvO0bPb/5fCnnyp/ZoRoFZeHnBPt+FoyhSpZvbvb/5 upMDKXOyShL4w8lU1bmxjc0z0gD87yDYWlfU7I4HxMf4rtVC1N3S9CEja+eJhppPRlSG 8SaakfIBNxCzUqK+g1bhWiPb1M1IkgxxdS4j/QBmYDsRPHe/3/Vt2cyRq2ZwtHUHv5nA I3yg== 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=ufZ6eZhZNmydg60KYGYUmr72dJOjnFUCCdCp0lk2s4g=; fh=O7M2SWHTpVbagzstRm/nlFHgosif50glrejdF8p0BXE=; b=K2slP6Chs4RsaGOfN+dV0hiCoBOqn9Hk5ggc9Iu8TtImGdXu3NTcC6ntudGK+mCJu9 dAgtRdojUpyOQoRFRlHZnaZjCWt2V450iBnfNPMfG1/Xavt4PEVyWob7P9kcJ52/Tuer XnKvBvvBCAmlrsmWj9KT+8Ha7LJm7q1myDO6B3l1IW8cKTN+77oMrQqptdTPbyTemh6r 06aLbKPeqxIFXTrlwtlU9RrFdT657nRjSe9CMqE5NgEom6R+v0IDW19XyR/MsjY9SeVG +wo91kGtNaamRopuiba+Mo2M/NuQx3Rev62se4GHEaVG3MyzJ8wOyk0xZX79EHQx+L5E 2WKw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@wanadoo.fr header.s=t20230301 header.b=HIfwAvNr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 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 agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id k16-20020a635610000000b00585a454179fsi162877pgb.162.2023.11.01.08.56.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Nov 2023 08:56:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@wanadoo.fr header.s=t20230301 header.b=HIfwAvNr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 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 agentk.vger.email (Postfix) with ESMTP id D8C3380A431C; Wed, 1 Nov 2023 08:56:07 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232482AbjKAPzy (ORCPT + 35 others); Wed, 1 Nov 2023 11:55:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55144 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230505AbjKAPzw (ORCPT ); Wed, 1 Nov 2023 11:55:52 -0400 Received: from smtp.smtpout.orange.fr (smtp-21.smtpout.orange.fr [80.12.242.21]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D4AB3102 for ; Wed, 1 Nov 2023 08:55:48 -0700 (PDT) Received: from pop-os.home ([86.243.2.178]) by smtp.orange.fr with ESMTPA id yDZKqJ4wOLilFyDZKqui3f; Wed, 01 Nov 2023 16:55:47 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wanadoo.fr; s=t20230301; t=1698854147; bh=ufZ6eZhZNmydg60KYGYUmr72dJOjnFUCCdCp0lk2s4g=; h=From:To:Cc:Subject:Date; b=HIfwAvNr4Wr/ZqZITN+UDDI6Sr+OP0ffSXr6wMVGL42Io4gtcI2JevZbjrzSmRSHb sPI5r2tTON9FAGdFrWEhkWCVHArvlw/pkjUzyIm/E0CWmrpmALHSCdoslU/7LDArhu 0yLkai4iY4mIAZ9dver1cur852e+lofck18LtFau0yGJdoz3mrgW4p4V2gEI8WsGdk UN5FhiWAH587QA/dCkXrmVLHHApBfoGkV5CjuyieGtowAiWgtocibWW/aBXtKsf3ZF TtgcauYzH7yQz8UUKLZF8RFYqnZTTggBadf9g+V55FohN6L9Myy3hAER7walH0IX+X vn32+War5/CGQ== X-ME-Helo: pop-os.home X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Wed, 01 Nov 2023 16:55:47 +0100 X-ME-IP: 86.243.2.178 From: Christophe JAILLET To: Lee Jones Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET Subject: [PATCH] mfd: intel-lpss: Remove usage of the deprecated ida_simple_xx() API Date: Wed, 1 Nov 2023 16:55:38 +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 agentk.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 (agentk.vger.email [0.0.0.0]); Wed, 01 Nov 2023 08:56:07 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1781377710733141589 X-GMAIL-MSGID: 1781377710733141589 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/mfd/intel-lpss.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/mfd/intel-lpss.c b/drivers/mfd/intel-lpss.c index 9591b354072a..9115ba4c768f 100644 --- a/drivers/mfd/intel-lpss.c +++ b/drivers/mfd/intel-lpss.c @@ -405,7 +405,7 @@ int intel_lpss_probe(struct device *dev, intel_lpss_init_dev(lpss); - lpss->devid = ida_simple_get(&intel_lpss_devid_ida, 0, 0, GFP_KERNEL); + lpss->devid = ida_alloc(&intel_lpss_devid_ida, GFP_KERNEL); if (lpss->devid < 0) return lpss->devid; @@ -442,7 +442,7 @@ int intel_lpss_probe(struct device *dev, intel_lpss_unregister_clock(lpss); err_clk_register: - ida_simple_remove(&intel_lpss_devid_ida, lpss->devid); + ida_free(&intel_lpss_devid_ida, lpss->devid); return ret; } @@ -456,7 +456,7 @@ void intel_lpss_remove(struct device *dev) intel_lpss_debugfs_remove(lpss); intel_lpss_ltr_hide(lpss); intel_lpss_unregister_clock(lpss); - ida_simple_remove(&intel_lpss_devid_ida, lpss->devid); + ida_free(&intel_lpss_devid_ida, lpss->devid); } EXPORT_SYMBOL_GPL(intel_lpss_remove);