From mboxrd@z Thu Jan 1 00:00:00 1970 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 52F201D89F5; Tue, 15 Oct 2024 11:54:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728993263; cv=none; b=JlofqTFANjzwcDPRsXoMkWuubYGUFINlFJnA3DCSCXwZ+syq8Ppjum1S7vpdTmNgG4pLYZwy5Lmug0d8oijWVJJKy6stKV0fLRPlPviyBhBRqXtiHp9De+Dex7igH3WjibC9PwEGSF/a1KiQc7K+xfDF/Zmkg9KZGUe0nJgbo7Y= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728993263; c=relaxed/simple; bh=73L7oVVFita8HlPQhWtBUAZpYQ1/rcj0ahaD5Er1wNU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=lvCLk+7jOOpQDjUrST2g0+/W866Z3MAY7dq2eNhBGZPgF+xP9h+YRXcn6r3Pl/SQqp1ClF+s3a52WiCGMVg878kbUliwoG4pBHynIVwhe8ek5X2W6wMYiVXb2klCORxCbP8F0ucRNv6asVvwMAfnbHAgGdJRL06f8DEkB9NaVWs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=fHcYSRNP; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="fHcYSRNP" Received: by smtp.kernel.org (Postfix) with ESMTPSA id BD594C4CEC6; Tue, 15 Oct 2024 11:54:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1728993263; bh=73L7oVVFita8HlPQhWtBUAZpYQ1/rcj0ahaD5Er1wNU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fHcYSRNPwZWNhqKGbJrhJhG4Ll4xyjXOWw+aadf1mPADBotT9RexxbntMVZkXCxOj vFoUXgxRq7qjYcQYzM5ljU4m/Fp/Tj7vXYj1VR9AqFLe+JhFcAz2hdsvErPMrGkjmj qIHuWv7c0CjarzY9IvkYGFuJs1gMrpe/kBinGk08= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Christophe JAILLET , Rodolfo Giometti , Andrew Morton , Sasha Levin Subject: [PATCH 5.15 360/691] pps: remove usage of the deprecated ida_simple_xx() API Date: Tue, 15 Oct 2024 13:25:08 +0200 Message-ID: <20241015112454.633596351@linuxfoundation.org> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241015112440.309539031@linuxfoundation.org> References: <20241015112440.309539031@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 5.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Christophe JAILLET [ Upstream commit 55dbc5b5174d0e7d1fa397d05aa4cb145e8b887e ] ida_alloc() and ida_free() should be preferred to the deprecated ida_simple_get() and ida_simple_remove(). This is less verbose. Link: https://lkml.kernel.org/r/9f681747d446b874952a892491387d79ffe565a9.1713089394.git.christophe.jaillet@wanadoo.fr Signed-off-by: Christophe JAILLET Cc: Rodolfo Giometti Cc: Greg Kroah-Hartman Signed-off-by: Andrew Morton Stable-dep-of: 62c5a01a5711 ("pps: add an error check in parport_attach") Signed-off-by: Sasha Levin --- drivers/pps/clients/pps_parport.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/pps/clients/pps_parport.c b/drivers/pps/clients/pps_parport.c index 42f93d4c6ee32..af972cdc04b53 100644 --- a/drivers/pps/clients/pps_parport.c +++ b/drivers/pps/clients/pps_parport.c @@ -148,7 +148,7 @@ static void parport_attach(struct parport *port) return; } - index = ida_simple_get(&pps_client_index, 0, 0, GFP_KERNEL); + index = ida_alloc(&pps_client_index, GFP_KERNEL); memset(&pps_client_cb, 0, sizeof(pps_client_cb)); pps_client_cb.private = device; pps_client_cb.irq_func = parport_irq; @@ -188,7 +188,7 @@ static void parport_attach(struct parport *port) err_unregister_dev: parport_unregister_device(device->pardev); err_free: - ida_simple_remove(&pps_client_index, index); + ida_free(&pps_client_index, index); kfree(device); } @@ -208,7 +208,7 @@ static void parport_detach(struct parport *port) pps_unregister_source(device->pps); parport_release(pardev); parport_unregister_device(pardev); - ida_simple_remove(&pps_client_index, device->index); + ida_free(&pps_client_index, device->index); kfree(device); } -- 2.43.0