Received: by 2002:ab2:69cc:0:b0:1f4:be93:e15a with SMTP id n12csp850724lqp; Sun, 14 Apr 2024 02:28:33 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV6qo+J30etYHsDZYFh2JTT3SAZbGCB7TZAYm7vCZtOD6TjinZcQWaCI4xoSquhmHL0Ou0vNO/ax881uw2XFuZVl+7f9gISnjlQrs+Edw== X-Google-Smtp-Source: AGHT+IHDTa+D+3D8aC0bTQ0UVm99TBuMMAbP2ImRTCmaOxI6lk+W1WWwfRkBurBXKP1fZm18sleL X-Received: by 2002:a17:906:5fc2:b0:a51:ae51:5206 with SMTP id k2-20020a1709065fc200b00a51ae515206mr3772266ejv.42.1713086913121; Sun, 14 Apr 2024 02:28:33 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713086913; cv=pass; d=google.com; s=arc-20160816; b=rvSfuaYabP98R97B5n7leYh2zKXVacAYTNTOCtR67Dz00kdfoYou04fJ620T3v+gN9 1ErtHPY2BCqVOsYfzOG3lbKC+3W7LLt/I9hHlrGFZCx0IhAklOjUMSDgyhVOddkfBTOa 9LtgAxrbxsfirB1arY5adc/UajlIeIIczFyyo5eXJ1ey0bk/OGN2kr2G9cXd5kv7qn2p smhEk+86VpyxtsN0DTUXWyp8jOKEhHRdTBHYzCDW4lo7J3KLqnuu09uUvLQXIFT3EKLg NeCoOAHND3QOuYyYwlvMiLH8MqeqZDWMoD3eDAtt/96LFALPJLuH/g7uHYzVHdXrhN0T mmwg== ARC-Message-Signature: i=2; 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=br64ne69Nk3JhZZXN1tyM5lQFY4iCsNufrWPd+JT82E=; fh=Kllrk5TYnlNpOcdOquYwtuaF4SrwueSwZnTwaZb2oc4=; b=c5IUWp00kr1t0BWn0uy1+TiE/DklOhauzlDgWpagVlKU4ktCTdnaIrAhMrwNgCoANk lbxV8hekoKRTqoMPsza5S0PJs12YRLnqjnOBv90yrXXebnV+bbheoeJzbISTanIzgzEP 4OTsvQVrqejWNgbP8z6h3N3Tw+qQjH2TCiULlK8/D6t9iPb7E9AtGat5xJquVS1QpTcZ ZmC0HGnkKK7hKg6g0OU0hpRCR5Z1ac6XQoQwG6zwY+uHW/b2Yu/yFYQNjSbVEsyerkKX S219iXHlP1Z3TzH6NC7mSKEzupCa3mU5dgsipSLrZwsZYqxwMC2piIjQf2KBM+iQa+A1 f8/w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@wanadoo.fr header.s=t20230301 header.b=p2J3HcOQ; arc=pass (i=1 spf=pass spfdomain=wanadoo.fr dkim=pass dkdomain=wanadoo.fr dmarc=pass fromdomain=wanadoo.fr); spf=pass (google.com: domain of linux-kernel+bounces-144073-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-144073-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=wanadoo.fr Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id cs19-20020a170906dc9300b00a523a9237basi2409507ejc.191.2024.04.14.02.28.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 14 Apr 2024 02:28:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-144073-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@wanadoo.fr header.s=t20230301 header.b=p2J3HcOQ; arc=pass (i=1 spf=pass spfdomain=wanadoo.fr dkim=pass dkdomain=wanadoo.fr dmarc=pass fromdomain=wanadoo.fr); spf=pass (google.com: domain of linux-kernel+bounces-144073-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-144073-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE 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 am.mirrors.kernel.org (Postfix) with ESMTPS id B0E451F215B9 for ; Sun, 14 Apr 2024 09:28:32 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id ED10D2374C; Sun, 14 Apr 2024 09:28:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=wanadoo.fr header.i=@wanadoo.fr header.b="p2J3HcOQ" Received: from msa.smtpout.orange.fr (out-68.smtpout.orange.fr [193.252.22.68]) (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 6273D1AACB; Sun, 14 Apr 2024 09:28:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.252.22.68 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713086903; cv=none; b=rY6/RZ2YGO7vrM5ye+kgkUFPGeNXEa1eQegYy+coSImHHdu2ZZNKvh0rAO7W9KpE/8dWTPPIdMQyTdwkouKVXBZgvbpWxrsPAz3cvDccnosfwK1LT6umNGavxq6qN40dUMJF3oLPwt+cuyZ6iY67ps9N94BZe+yKwga1+3+kauQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713086903; c=relaxed/simple; bh=SwFno6/zyg5+YPfqO27044qCoN7mde7l5fHl3+x/0MQ=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=Zb0D9NSm1m7azgOsZxgUc3vn+A0h4JQdlcdXJrxKqIt0T7Ljx5h34IoUCK3WvzKwrgt422N9KuYfh+OOjqFgQUFzv9eWNRqopQkbpmLzN1Sh+pDSLTZamfTThVXtC9Q+G/+Uyt1Ky8+RN1jEKfv4N6htZVMhizp0U6HxY3t16Cc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=wanadoo.fr; spf=pass smtp.mailfrom=wanadoo.fr; dkim=pass (2048-bit key) header.d=wanadoo.fr header.i=@wanadoo.fr header.b=p2J3HcOQ; arc=none smtp.client-ip=193.252.22.68 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=wanadoo.fr Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=wanadoo.fr Received: from fedora.home ([86.243.17.157]) by smtp.orange.fr with ESMTPA id vw9nrfdj8tTfTvw9orcZic; Sun, 14 Apr 2024 11:28:17 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wanadoo.fr; s=t20230301; t=1713086897; bh=br64ne69Nk3JhZZXN1tyM5lQFY4iCsNufrWPd+JT82E=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=p2J3HcOQKImDyRyHCZqjWt5sZ1rfQObiAPANSd8CpT5QnEm29YQEtFJy6X2a21nxP DCzIeSqld4PWTB+gk41ttlC1RDOevMPW1ZosyfrH2vCxQF5GdAGrHn7OHDSGSAbkRX W6xNZesbTZPptSX6Q0aLkQTjmz1gSbOZuSlKXj0VO6xLX554Sh8aeX7HJacEE16zA4 CXYmRW6SUnCbrftDr0o8Q/Ra6SRV6/yuCSTKe1OKpvzYRRVaCmz0gZ57cEXMu0gATG o5o+Xsr3FxTh5sXxCl+WPHquhykfUMDfzYWw1yEDndwvo4+NfMiNhttI1qgpvFztyP Gn290icfctTJg== X-ME-Helo: fedora.home X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Sun, 14 Apr 2024 11:28:17 +0200 X-ME-IP: 86.243.17.157 From: Christophe JAILLET To: akpm@linux-foundation.org, Alexander Shishkin Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET Subject: [PATCH RESEND] intel_th: Remove usage of the deprecated ida_simple_xx() API Date: Sun, 14 Apr 2024 11:28:13 +0200 Message-ID: <2aca50a9d061faecfd4ded80b5874cd3be9b855d.1713086613.git.christophe.jaillet@wanadoo.fr> X-Mailer: git-send-email 2.44.0 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 --- This patch has been sent about 3 months ago [1]. A gentle reminder has been sent 1 month later [2]. Neither one got any reply. So, I'm adding Andrew Morton in To:, in order to help in the merge process. Context: ======= All patches to remove the ida_simple API have been sent. Matthew Wilcox seems happy with the on going work. (see [3]) Based on next-20240412 $git grep ida_simple_get | wc -l 25 Based on next-20240220 $git grep ida_simple_get | wc -l 36 https://elixir.bootlin.com/linux/v6.8-rc3/A/ident/ida_simple_get 50 https://elixir.bootlin.com/linux/v6.7.4/A/ident/ida_simple_get 81 Thanks CJ [1]: https://lore.kernel.org/all/9c092dc6db15984d98732510bb052bb00683489b.1705005258.git.christophe.jaillet@wanadoo.fr/ [2]: https://lore.kernel.org/all/994d0c38-6307-4da0-8e9d-c70972372149@wanadoo.fr/ [3]: https://lore.kernel.org/all/ZaqruGVz734zjxrZ@casper.infradead.org/ --- drivers/hwtracing/intel_th/core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/hwtracing/intel_th/core.c b/drivers/hwtracing/intel_th/core.c index cc7f879bb175..86c8efecd7c2 100644 --- a/drivers/hwtracing/intel_th/core.c +++ b/drivers/hwtracing/intel_th/core.c @@ -871,7 +871,7 @@ intel_th_alloc(struct device *dev, const struct intel_th_drvdata *drvdata, if (!th) return ERR_PTR(-ENOMEM); - th->id = ida_simple_get(&intel_th_ida, 0, 0, GFP_KERNEL); + th->id = ida_alloc(&intel_th_ida, GFP_KERNEL); if (th->id < 0) { err = th->id; goto err_alloc; @@ -931,7 +931,7 @@ intel_th_alloc(struct device *dev, const struct intel_th_drvdata *drvdata, "intel_th/output"); err_ida: - ida_simple_remove(&intel_th_ida, th->id); + ida_free(&intel_th_ida, th->id); err_alloc: kfree(th); @@ -964,7 +964,7 @@ void intel_th_free(struct intel_th *th) __unregister_chrdev(th->major, 0, TH_POSSIBLE_OUTPUTS, "intel_th/output"); - ida_simple_remove(&intel_th_ida, th->id); + ida_free(&intel_th_ida, th->id); kfree(th); } -- 2.44.0