Received: by 2002:a05:7412:f589:b0:e2:908c:2ebd with SMTP id eh9csp1011120rdb; Wed, 1 Nov 2023 08:56:36 -0700 (PDT) X-Google-Smtp-Source: AGHT+IENOwJyQgmRS5LLP9P9mMnDCxNGhbrUBJ0y8ELsZODQEUo+uTW9sRFC76oXVBa2Th2kdYUF X-Received: by 2002:a05:6870:1004:b0:1d5:b1c7:3617 with SMTP id 4-20020a056870100400b001d5b1c73617mr12680458oai.13.1698854196599; Wed, 01 Nov 2023 08:56:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698854196; cv=none; d=google.com; s=arc-20160816; b=PTlZoGgWsAd729vXHo3LOJ8LDTaz1pTZiwKZszyyDPHYbks7hskOcPlJ2D34i4bbQ2 WBnALc1WcCNfoDBJjHfHtrRj1smszk4ucHwcbObdWDY5eZ6LCf5ND72Zvv5kR6US6E+F fFihpVALoI6MFLlQyyC0goTbvvBSP6NR1/V1Zyjpg8EGZNGvPeyOc/pyy8mRHZQIw7Da uYadbzy7Bo1+mlWNOfeT213M7OALlo8RKsLZqpr7P7VneEqBTVAN3hIvBksY7ZL4iCou /MZitNLs+HycqAh1+Fx5JQ42X46DUQdI7fnh7IJvHq1bCL/Xe5qVO98pBIQ51K7l6d29 ct2g== 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.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=wanadoo.fr Return-Path: Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id a2-20020a656042000000b005b8fb1e0312si181677pgp.248.2023.11.01.08.56.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Nov 2023 08:56:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; 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.38 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 fry.vger.email (Postfix) with ESMTP id E33A7809728C; Wed, 1 Nov 2023 08:56:02 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232306AbjKAPzy (ORCPT + 99 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 Content-Transfer-Encoding: 8bit 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 fry.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 (fry.vger.email [0.0.0.0]); Wed, 01 Nov 2023 08:56:03 -0700 (PDT) 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); -- 2.34.1