Received: by 2002:a05:7412:8598:b0:f9:33c2:5753 with SMTP id n24csp305280rdh; Mon, 18 Dec 2023 22:10:25 -0800 (PST) X-Google-Smtp-Source: AGHT+IEa4Zvs1tuVrLuCwmnuZsnrKBs6/OKqKhRaVJgAd+zlSNRjPMQku/FHHfAWSvqY7o+2RB+R X-Received: by 2002:a17:902:6e02:b0:1d3:2e0d:cd98 with SMTP id u2-20020a1709026e0200b001d32e0dcd98mr6988328plk.105.1702966225129; Mon, 18 Dec 2023 22:10:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702966225; cv=none; d=google.com; s=arc-20160816; b=RpO4JGIXvl1iLYGd76WQh426friO9q6oZIURj6ko4IsI2oon+lVjZpl9PvdHhesaV/ rWUgXZXhYNfUe0q3rcJjzIBOsuUaXZUW5w7RoYBRBjXeEPfe9EbFy+dFrzwfjJ+7ZFhR jspUjmudknHBOfLiQsMsG1kujhOLP+Nb+RXAjirruHyIHRBQIfxcFkpS6jxns7u+wvxr IY+fcDeLUoaxqThD556/i4XU6uKvMJXfu/1jmRWEu3LMHDIXv+ekEGDpo8qxIulavppv oLXNQjdPRGB4vmyqMM4nLQ5CD5phCX33vrx3aO/apujgnvSy/2d0SfddPm9n//mjK/3F eyEA== 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=KTpDymoJN4gJQumbzCdvVykjTutbaVEe/yWH87l7ENk=; fh=kx7FKyxiFoC7JR5hpmJpGmgSlG+p7AJBKV6ZCtIBUVo=; b=PNt9ZEZJlPddnsarhszk/jXgBeh+Nv2AdjQHvy5/THk58QFyDBDggny3xhNbtsgK8U bv0GEMMNAtAHfwn+VJfjoM8bSTVs/wywDlRODrh23UTk+0uRG89rwl07CX9jjOoHQFyJ hBLyZBqF7VYj/ZH6jih0x+OIX8QiZAWPH6n43gEERVrR/egtCwKmSH2mrNkWXW+Zx3sV ntkQZMvVpIYAvb9ynn1NBiU4R+Zd9jATD8rjE5Ie9+z+NYfuf33J6uclW24GeI9Ie7Kq R6ksWZaPcrpID2G5kOg6rRwC9BcQlcIi6VQcwx96k6fitICAfOSJYX16MM8CReTvm86J /bxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@wanadoo.fr header.s=t20230301 header.b=l4sNEkA+; spf=pass (google.com: domain of linux-kernel+bounces-4736-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-4736-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=wanadoo.fr Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id iw9-20020a170903044900b001d3a67ed545si4432955plb.84.2023.12.18.22.10.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Dec 2023 22:10:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-4736-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@wanadoo.fr header.s=t20230301 header.b=l4sNEkA+; spf=pass (google.com: domain of linux-kernel+bounces-4736-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-4736-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 159DEB23F8D for ; Tue, 19 Dec 2023 06:10:24 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 57FB38475; Tue, 19 Dec 2023 06:10:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=wanadoo.fr header.i=@wanadoo.fr header.b="l4sNEkA+" X-Original-To: linux-kernel@vger.kernel.org Received: from smtp.smtpout.orange.fr (smtp-14.smtpout.orange.fr [80.12.242.14]) (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 B2837C120 for ; Tue, 19 Dec 2023 06:10:05 +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 FTIhr2VyFBU01FTIirj4Uz; Tue, 19 Dec 2023 07:09:58 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wanadoo.fr; s=t20230301; t=1702966198; bh=KTpDymoJN4gJQumbzCdvVykjTutbaVEe/yWH87l7ENk=; h=From:To:Cc:Subject:Date; b=l4sNEkA+xYvOVabsBHk5M0V29A4uXKj/0Sg02aRcWKjiQPusnJVoVkEQnl31zJhC1 1kuD5X4u/bdZgbo3J/2l+b2n2FIV25CUYmI2Mg7gyf3MYVUWRz/nHOlXmh16IneGE1 woS7spuhSBnaRrQF1/L85iKji1QV6Ohsw//Mx3Y/TNE7s2ZCCYIEaAHmfbC4zVTBe/ MpyyG9ivIqPulDzIUiAR2cL0+/2wXqUrrOxUFnbaZa75PvGxsT71I5ZIdlfS1FT4rt mXG9GWNvnUQQiX/3pmrjmTX7dItovt2Tfr95ZIKGflzxJlFEHNizqOX5BkTIuCKzlf 0gaHpwJ69r0uA== X-ME-Helo: pop-os.home X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Tue, 19 Dec 2023 07:09:58 +0100 X-ME-IP: 92.140.202.140 From: Christophe JAILLET To: Gustavo Pimentel , 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] dw-xdata: Remove usage of the deprecated ida_simple_xx() API Date: Tue, 19 Dec 2023 07:09:54 +0100 Message-Id: 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/dw-xdata-pcie.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/misc/dw-xdata-pcie.c b/drivers/misc/dw-xdata-pcie.c index 257c25da5199..efd0ca8cc925 100644 --- a/drivers/misc/dw-xdata-pcie.c +++ b/drivers/misc/dw-xdata-pcie.c @@ -333,7 +333,7 @@ static int dw_xdata_pcie_probe(struct pci_dev *pdev, dw->pdev = pdev; - id = ida_simple_get(&xdata_ida, 0, 0, GFP_KERNEL); + id = ida_alloc(&xdata_ida, GFP_KERNEL); if (id < 0) { dev_err(dev, "xData: unable to get id\n"); return id; @@ -377,7 +377,7 @@ static int dw_xdata_pcie_probe(struct pci_dev *pdev, kfree(dw->misc_dev.name); err_ida_remove: - ida_simple_remove(&xdata_ida, id); + ida_free(&xdata_ida, id); return err; } @@ -396,7 +396,7 @@ static void dw_xdata_pcie_remove(struct pci_dev *pdev) dw_xdata_stop(dw); misc_deregister(&dw->misc_dev); kfree(dw->misc_dev.name); - ida_simple_remove(&xdata_ida, id); + ida_free(&xdata_ida, id); } static const struct pci_device_id dw_xdata_pcie_id_table[] = { -- 2.34.1