Received: by 2002:a05:7412:8598:b0:f9:33c2:5753 with SMTP id n24csp307179rdh; Mon, 18 Dec 2023 22:16:07 -0800 (PST) X-Google-Smtp-Source: AGHT+IGe7lqldM5A6hfMMtdCycjh9c+VnW7oYp0ua3X3a7PCJS0MJmigGPBT2136AtsPgnSnvo3U X-Received: by 2002:a17:90a:d3d6:b0:28a:c616:ff1c with SMTP id d22-20020a17090ad3d600b0028ac616ff1cmr4532785pjw.97.1702966567027; Mon, 18 Dec 2023 22:16:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702966567; cv=none; d=google.com; s=arc-20160816; b=A2O4YsEELFuedaqXg44dxc6kPkPdEf+B1+HewfvErYTdevSbnSmVCtZ9fmyTiToOKJ ZVCEWgnmlmISFjYM1sGSLBYGtEc8qO7EsyYL1t200IwmxLmjYos5kGkEVA7MTW20pvro iZeQHOkfYvZBE8JJfvnX+eXsoTFRZbYh0wo2WVQP92GhLzfIpzUYT6lURIxBMLPgWZL9 8TY83KwnB22mfnV8Cwxf8QjCGNVyoswDahT3eMaNBCzsPKyMLI0PsyC898YMRxEhYuY2 6u861pOgzK+oPqHJWyjeYNWsOvNTnG73m/7W50IdPFXu+hGsRQXPEVFzxUjId6wXXy3H kUoQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=hZ/ES4F8KlXsJDilo3/jjs0U5UzZt61FLBeAEIKEj20=; fh=AzekWRmG71peP9VhsHnsReFGXGOsmOcJ6b2gkderROQ=; b=vqbNzEUF8+d6BE08kvbUVHqaCwNWKvny9KT1eWekaiawrncuHYHiD4vxL14Kd+SdXx HAxDRj47HPK/in/svSv/wvrW1mXLh2yL/zA31KlDdkusaZ9eVS1KpsdIlfUA7cEHwdxX QWaG52pjATH0lPSOTkN7m6AjrjJASUWS+tFFu4evsjpqjtfGpxo+v9+5L3k/5dHxgfA+ 9KsfPss5gCMrPR8VAUVWhXLNLxilfif92a+yPkUdJDHJmMxuq72ni4iq8/r8QL4HMLz+ 3PYhHtR1zURj55lhCg/WMvGtG9uMk7kKSsqlXwjtJqfS4nVQOJv9L+bGo0vcgUvZFkJ2 CcAQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@wanadoo.fr header.s=t20230301 header.b=sneycZ7o; spf=pass (google.com: domain of linux-kernel+bounces-4739-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-4739-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=wanadoo.fr Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id f3-20020a17090ab94300b00286bfcdbe85si637065pjw.49.2023.12.18.22.16.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Dec 2023 22:16:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-4739-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@wanadoo.fr header.s=t20230301 header.b=sneycZ7o; spf=pass (google.com: domain of linux-kernel+bounces-4739-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-4739-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=wanadoo.fr 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id ABDA22853F2 for ; Tue, 19 Dec 2023 06:16:06 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CF93B746C; Tue, 19 Dec 2023 06:15:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=wanadoo.fr header.i=@wanadoo.fr header.b="sneycZ7o" X-Original-To: linux-kernel@vger.kernel.org Received: from smtp.smtpout.orange.fr (smtp-21.smtpout.orange.fr [80.12.242.21]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8690811736 for ; Tue, 19 Dec 2023 06:15:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=wanadoo.fr Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=wanadoo.fr Received: from pop-os.home ([92.140.202.140]) by smtp.orange.fr with ESMTPA id FTOErgdxyaFNCFTOEr8Mcu; Tue, 19 Dec 2023 07:15:40 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wanadoo.fr; s=t20230301; t=1702966540; bh=hZ/ES4F8KlXsJDilo3/jjs0U5UzZt61FLBeAEIKEj20=; h=From:To:Cc:Subject:Date; b=sneycZ7o9WnonV42dK78Ae0TmwxUy/D7s6X1rtjZ+xnrFB+Ei3pau/1gu/jJP+AnH JVMzR5+8h7QjbyAq2pPvmINJBh23C16O/yJKVswCw6XwkjieZ9ePfDS4BnAhxYYXER RGC69CTXnsGJWy4k7iBA2u9YoYbQc3StWoCklQ9fkAoiwrbIcDpDlnNWTxbNKKoFGK E/ZikTPxjPpOtGih3G20VCmgYLiqrTnMr4csN1V3uptr8isdJ2kEkOFwtbKq7wp2Nl DYMNxhmCRpHIdSegqcAJOsUNXJ/NDkzM9a7ToECEyPWZoofe4dE0WMIr8Qtj3Kp8GM HLjuiP0vsk0zw== X-ME-Helo: pop-os.home X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Tue, 19 Dec 2023 07:15:40 +0100 X-ME-IP: 92.140.202.140 From: Christophe JAILLET To: Lorenzo Pieralisi , =?UTF-8?q?Krzysztof=20Wilczy=C5=84ski?= , Manivannan Sadhasivam , Kishon Vijay Abraham I , Arnd Bergmann , Greg Kroah-Hartman Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET , linux-pci@vger.kernel.org Subject: [PATCH] misc: pci_endpoint_test: Remove usage of the deprecated ida_simple_xx() API Date: Tue, 19 Dec 2023 07:15:37 +0100 Message-Id: <47a30441242c4d5f0e00555cbddd7783350ff1b2.1702966523.git.christophe.jaillet@wanadoo.fr> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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/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