Received: by 2002:a05:7412:d002:b0:f9:9049:d2ea with SMTP id bd2csp49045rdb; Wed, 20 Dec 2023 03:45:37 -0800 (PST) X-Google-Smtp-Source: AGHT+IE7x4xwcF+N6iOtRhMsJj/6LvhABMO04jhAWFVH11x4eG4wOAfXm5su1WJmVXZDGBep7kme X-Received: by 2002:a50:cb8b:0:b0:54c:4837:9035 with SMTP id k11-20020a50cb8b000000b0054c48379035mr12059582edi.45.1703072737115; Wed, 20 Dec 2023 03:45:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703072737; cv=none; d=google.com; s=arc-20160816; b=M/tQ9BOHRYShkqlmSz953sImNxI//l0t2Ohf1hPkM3pErBCvMIGNvzP/EaOZmWA9lb 59A2ymjk6dsaRbxit9/WJptuoTAF7HGxI1T8XhMwLKXuxvPLSqXXH0SKUlW5lBS+Ip8X GmKsnngPEAqV+tGpmyOO2o2vEpJKRn8YzNrklvgr7OG+RLytoQWNXGeXFofLS4Ha2KYK 8/nLSmePm8NK+I5kTWT4gfkvMrNpzZaoa9GmrgeXBTMDUILdJ1dU5cPoRRLjWMD5MVP+ XVSDmTNmZwk1o+7Kds5uuwOto5icwymul2VKOwAgU+/XJmAiIGWkdYntYv1ixmpsfEWc 1n9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=z0csABo+V5nOFUHPPJlGx2BWQYNazjd4jEGKwriGMh8=; fh=9qFbngNzpH4xW9Rh+fPuVAyWOaOudzj399xx9Gz9Cs4=; b=G9SwR1wBkAFiA7qPVaI9H6i7FmBuT1Exv9NiP4CHuSMmD/F7O2U7kCJI0rlOzxzBTm wz44h4Qh9nGorf3CvaUQRPZoYA3yYDGvl6pxTW2wSjNR9JylhykzupgvyJvQ6xErFLzR JlZ4Uzv8AVAeUZj1FHz8i5X8rkhkzwWe7Z5O6so9x2URXPhWuBLuMRDAeLwZOjLUTu3v 4yUTnUvq7RpjZN8tfMeeVRtEODvN3K8+xp/DXGDD0Qs+i78XS4T7JYGVLv8r3hjRBWLM t105Ncsv8FM3fh0qWqGKmKdvhho4kstI32ZoXs+iOPlg+UiEaTQQ33PGGuTVFNW5skRQ P70A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=smh6+6fU; spf=pass (google.com: domain of linux-kernel+bounces-6843-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-6843-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id r27-20020a50d69b000000b005533b5821b8si3042588edi.686.2023.12.20.03.45.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Dec 2023 03:45:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-6843-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=smh6+6fU; spf=pass (google.com: domain of linux-kernel+bounces-6843-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-6843-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id D90A21F232CD for ; Wed, 20 Dec 2023 11:45:36 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 61BA121A10; Wed, 20 Dec 2023 11:45:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="smh6+6fU" X-Original-To: linux-kernel@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8FBD01DFCD; Wed, 20 Dec 2023 11:45:25 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 713ECC433C7; Wed, 20 Dec 2023 11:45:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1703072725; bh=e3V0eBbLWUL0Jag3MGgZ63p7pyhYoE/YfY9WainlOKg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=smh6+6fUXOQRA4Bkc3O4XtMXmddsTQI9Xx6mCa/miE0KLttTucJTd1cY8Tcjloh0c F7Bl8dnjSrIuDifCn5ESWO6sbvFsJkmkwnLutRnnHVrNU3x2W8TDlFyN6coK478a35 BrC0SkbUQcrv5IhoJvcj1WoabuYf9RZyAwa1a3i2H24WEeRUYbYpQp43BNKKuQ2juz ULhbf9PMP9SZg4mWs0+auuZBTBz8U4xU5ZElo/22JFOvNTGHl/0VfZdlkD5HYYXiax zcyYH8v8+dvE114sJls6JG0Q5IEY2Y22SoF1f6AcFg8wqNEGn5SntqdNvhh7M+AUcI P3/dXGmGNKtsg== Date: Wed, 20 Dec 2023 17:15:10 +0530 From: Manivannan Sadhasivam To: Christophe JAILLET Cc: Lorenzo Pieralisi , Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= , Kishon Vijay Abraham I , Arnd Bergmann , Greg Kroah-Hartman , linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, linux-pci@vger.kernel.org Subject: Re: [PATCH] misc: pci_endpoint_test: Remove usage of the deprecated ida_simple_xx() API Message-ID: <20231220114510.GD3544@thinkpad> References: <47a30441242c4d5f0e00555cbddd7783350ff1b2.1702966523.git.christophe.jaillet@wanadoo.fr> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <47a30441242c4d5f0e00555cbddd7783350ff1b2.1702966523.git.christophe.jaillet@wanadoo.fr> On Tue, Dec 19, 2023 at 07:15:37AM +0100, Christophe JAILLET wrote: > 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 Reviewed-by: Manivannan Sadhasivam - Mani > --- > drivers/misc/pci_endpoint_test.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/drivers/misc/pci_endpoint_test.c b/drivers/misc/pci_endpoint_test.c > index af519088732d..34124bdce68c 100644 > --- a/drivers/misc/pci_endpoint_test.c > +++ b/drivers/misc/pci_endpoint_test.c > @@ -860,7 +860,7 @@ static int pci_endpoint_test_probe(struct pci_dev *pdev, > > pci_set_drvdata(pdev, test); > > - id = ida_simple_get(&pci_endpoint_test_ida, 0, 0, GFP_KERNEL); > + id = ida_alloc(&pci_endpoint_test_ida, GFP_KERNEL); > if (id < 0) { > err = id; > dev_err(dev, "Unable to get id\n"); > @@ -907,7 +907,7 @@ static int pci_endpoint_test_probe(struct pci_dev *pdev, > kfree(test->name); > > err_ida_remove: > - ida_simple_remove(&pci_endpoint_test_ida, id); > + ida_free(&pci_endpoint_test_ida, id); > > err_iounmap: > for (bar = 0; bar < PCI_STD_NUM_BARS; bar++) { > @@ -943,7 +943,7 @@ static void pci_endpoint_test_remove(struct pci_dev *pdev) > misc_deregister(&test->miscdev); > kfree(misc_device->name); > kfree(test->name); > - ida_simple_remove(&pci_endpoint_test_ida, id); > + ida_free(&pci_endpoint_test_ida, id); > for (bar = 0; bar < PCI_STD_NUM_BARS; bar++) { > if (test->bar[bar]) > pci_iounmap(pdev, test->bar[bar]); > -- > 2.34.1 > -- மணிவண்ணன் சதாசிவம்