Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp434945rdb; Thu, 8 Feb 2024 09:58:27 -0800 (PST) X-Google-Smtp-Source: AGHT+IHK05tldNVtsLuNAfpzvUfRnQg664DC3qU+Skq+g10+css3KCDQBY7QQHiLm3Jf2cgnz40B X-Received: by 2002:a05:620a:22b1:b0:785:43d8:c166 with SMTP id p17-20020a05620a22b100b0078543d8c166mr226265qkh.31.1707415106776; Thu, 08 Feb 2024 09:58:26 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707415106; cv=pass; d=google.com; s=arc-20160816; b=GCI7ldmrqFLunksjZxJnkyZzz1hiNEv0SNfQI3throJoMJddwovUyr4vNX70rwb/am 8KUtFXrYVMw35NFRJC8eudBko9fjbeS+TaTzTQ8p7dKOKU23EylTBCHgog7vVAWTpClV jzoDwMS4Ff2w52PZmUlox9NhBk8QcPGXPvc7NRuxx5UflkPUrmO3lMoyzG7Wygo49v0+ 7V+65QiqVZtdVqxUtU7DzfMR3fuAIcV+7CdHsSs49T81ivJYuPS7Okzvp6RHD6ez0hm9 KmfVB/34P8HWJQa/FtbfPKhrTE3LmmMjxx2naKOJEpquY0oG12Gz7SWnOYI+AwusBE1S KyRw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=SUiKKH4tpPPUKGCw9wCMBwYqXT0j4dANGt0PyM91ApQ=; fh=yrOsB2RmQid/isy6lbXOjQ8F467yHW1DPbQx2fgNLrE=; b=AVupN1b+WOwYAmvwTR7tLBHEEaQ3QYxn5qdustnuXM3EfIjiItyFSfQo5ZFRn0gSxJ BeybKlazojTnmC+euIpFG366Gg8nbUN8Lg1RE7P0fnZh9se3mPRs8MDGLsY22DBPrryb bEboI0WYqvvYyP++5rj7ajhpSG0Ob0Eaj1FHiCsNP3ltN8YkPgl2unr+VOCmK2pfmJU+ FAnQMcr4uA+YeAcigLMo0KfgNt9/BkKLbAnLtk9E18K/FesYirSLlpVVp5FFmpJGRfgD HtUCH+pys1+TRsREDiGAG2z6B8RUY9xhCtd6NKVaWFej13ehnHB5c8PrPFWg0sAWisEp iwAA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@wanadoo.fr header.s=t20230301 header.b="A8vOG/KP"; 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-58500-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-58500-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=wanadoo.fr X-Forwarded-Encrypted: i=2; AJvYcCVI6aM8sTRAYblCxKgF77BUZqLC73JomKKrghG52SHMLGMVdJsuCXwpRzgz3R1x+n/qcta4PWMV4PY3zCcFyUg05lwI/yBFs7eFunIL9A== Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id br37-20020a05620a462500b00784087c7c5bsi122915qkb.141.2024.02.08.09.58.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Feb 2024 09:58:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-58500-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@wanadoo.fr header.s=t20230301 header.b="A8vOG/KP"; 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-58500-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-58500-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 8519A1C23DFF for ; Thu, 8 Feb 2024 17:58:26 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 42A2C85C56; Thu, 8 Feb 2024 17:58:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=wanadoo.fr header.i=@wanadoo.fr header.b="A8vOG/KP" Received: from smtp.smtpout.orange.fr (smtp-17.smtpout.orange.fr [80.12.242.17]) (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 4DB1A7EF0C for ; Thu, 8 Feb 2024 17:58:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=80.12.242.17 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707415091; cv=none; b=XXqow1q8MhF06Iv9OuK9EO3oIWflCqK36k1y5EKZS48ZKlHovRlR67GxVEFR0kUX/m+6223udgFTd5haH9MIhsCt6a0XCuu0p9SroxJgqeOhhMNW8fngJhfH17D5C09WRFGMas4/SWbkwd7Xw1gAl3bwFVcDAxdgkaB+/waoXEM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707415091; c=relaxed/simple; bh=BljVYhmqzxYmEca+envNVs4ji1R3FjdjRhTbfglmoDc=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=GltWPML+6v1n33d+9ToKsf99WwHLZ0/8l7LF7EjBfNgRoMQLIcaB4xwCC85CLgMH9RmbTkrv46srue5IkY4PnNySKzNW6wMS6udRqJrtyc+x4uvMaqziu9KR63F1bUIAT7398OpGmKROKDQyWec0LNVloYU9jYPes2TLGWMA+uQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none 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=A8vOG/KP; arc=none smtp.client-ip=80.12.242.17 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 [192.168.1.18] ([92.140.202.140]) by smtp.orange.fr with ESMTPA id Y8eLrzbSOF1QfY8f1rnOlk; Thu, 08 Feb 2024 18:58:07 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wanadoo.fr; s=t20230301; t=1707415087; bh=SUiKKH4tpPPUKGCw9wCMBwYqXT0j4dANGt0PyM91ApQ=; h=Date:Subject:To:Cc:References:From:In-Reply-To; b=A8vOG/KPXwBErCe2/79QYD6IL+R75SPpC3y2enYgYQH2g9bw+W5D2sDUU68ETkVXX LUC9roH5U6WSkwUPkvNTkUccAR9M6uzzYD9L5V3dG1opYlJqpFtkPCt7Tg1mFO2lXw m140D9+lL+BG83qOJOu9h3rtiXZOmrka7uKOLWpsfR4ce/YrXrwjK8/h5S9XrXEKmn dVu7SUpwH++T31AREuMfFurZ6wmwSQthcsjSLcxMwrJ2Dn7u/qmoZiNdvD7fRpHrlB xf0C8ZQ4VdEgPnyYjQWjNw4LrvO1LLc6i1fnQdlVfsZprVq3vIVUkZVqbWw4apCoZs p9aDl5JvOY9bw== X-ME-Helo: [192.168.1.18] X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Thu, 08 Feb 2024 18:58:07 +0100 X-ME-IP: 92.140.202.140 Message-ID: Date: Thu, 8 Feb 2024 18:58:07 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] HID: sony: Remove usage of the deprecated ida_simple_xx() API Content-Language: en-MW To: Jiri Kosina , Benjamin Tissoires Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, linux-input@vger.kernel.org References: <19b538bc05c11747a3dd9fa204fde91942063d52.1698831460.git.christophe.jaillet@wanadoo.fr> From: Christophe JAILLET In-Reply-To: <19b538bc05c11747a3dd9fa204fde91942063d52.1698831460.git.christophe.jaillet@wanadoo.fr> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Le 01/11/2023 à 10:38, Christophe JAILLET a écrit : > 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/hid/hid-sony.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff --git a/drivers/hid/hid-sony.c b/drivers/hid/hid-sony.c > index ebc0aa4e4345..55c0ad61d524 100644 > --- a/drivers/hid/hid-sony.c > +++ b/drivers/hid/hid-sony.c > @@ -1844,8 +1844,7 @@ static int sony_set_device_id(struct sony_sc *sc) > * All others are set to -1. > */ > if (sc->quirks & SIXAXIS_CONTROLLER) { > - ret = ida_simple_get(&sony_device_id_allocator, 0, 0, > - GFP_KERNEL); > + ret = ida_alloc(&sony_device_id_allocator, GFP_KERNEL); > if (ret < 0) { > sc->device_id = -1; > return ret; > @@ -1861,7 +1860,7 @@ static int sony_set_device_id(struct sony_sc *sc) > static void sony_release_device_id(struct sony_sc *sc) > { > if (sc->device_id >= 0) { > - ida_simple_remove(&sony_device_id_allocator, sc->device_id); > + ida_free(&sony_device_id_allocator, sc->device_id); > sc->device_id = -1; > } > } Hi, gentle reminder. All patches to remove the ida_simple API have been sent. And Matthew Wilcox seems happy with the on going work. (see [1]) Based on next-20240207 $git grep ida_simple_get | wc -l 38 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/ZaqruGVz734zjxrZ@casper.infradead.org/