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 2D6DD45C1C; Mon, 14 Oct 2024 15:09:12 +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=1728918552; cv=none; b=sOQPGtwxyjBQDTHJHZVhvTQcs6TerI/ASTlvgC7paiUFeTXoye78lejgu89gBZiAvBNK2XaPVapnGxotv5siX7yp4SydsPg5RXBdK5uF5WO8Na4QfsG3U7PvedS6WbhkzPNwIVn6mVMG6DMU964l95umrUP9vXLsYPbsd6Kfszc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728918552; c=relaxed/simple; bh=7Rw6IMi12e5fnVUSAp21MOa5FGLnqrNus7+Fdq4pMsE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=tOMfUwQl1SGx4QkqppyiGrCKE4XCRx3OiBBjTk/MyKR/PoW3blyRQZWMZOOTKl2eVum+iB5HmEgR9bDkaHlPfg0V8kRZiIRX86eyWrXldv2H6JyNa4ZrJfOz1uRkqJwmh3AstjRlJG1E7HvC/flNnNGRUEPx+2hN6olP+xV466g= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=SBgJ6bwR; 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="SBgJ6bwR" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8AD26C4CEC3; Mon, 14 Oct 2024 15:09:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1728918552; bh=7Rw6IMi12e5fnVUSAp21MOa5FGLnqrNus7+Fdq4pMsE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SBgJ6bwR/rzo5mAhpvjcklzjTS5saS4OqtKxaSwT2b2SKQIfgEvqPIrQvrJQJ8d3O S6pu2qjAlZ0hh/B2VN5z1b2j0Ty8Rx6wQrPc39mHSJDQsRMg/DHazxRo0pvV9o2asr u+/flZyDhlIFADrdUYhQlkg14rA+lxP5cjvX7X6w= 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 6.1 354/798] pps: remove usage of the deprecated ida_simple_xx() API Date: Mon, 14 Oct 2024 16:15:08 +0200 Message-ID: <20241014141231.851464377@linuxfoundation.org> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241014141217.941104064@linuxfoundation.org> References: <20241014141217.941104064@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 6.1-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