From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796390479; b=s1fReEyRwI3K7j1U+TWzzMF+WIHG2V40STjwuAjb6MyTw0zuXsrp1Avc+T7pS3+yEPvk umEwMHR1rlLYMbM1IppluKO5pq4SuUqFKE0MZac5uFQcUU24jxJyFG6k20eh0EdB25vS5 VIOAhKmQZl3bK2vYQEy7cAHRWa3k0RfZbqsa5TT2HGF2A3RQnU2GiNb2bJBMsZlxyC2YK 89JK/voVnn66xqY+hNnVG5BPRG2x01PPcpBF2RwjnqTygKLuJsgTO3wEF00L9D3TtbgMx 8+fslWvGwEd99yRbwxvOOJPnNrSJ/aS1mOYWP7K6Vtyli6i5eFt1HgBIwJ09wSrRxaw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796390479; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:MIME-Version:Content-Type: Content-Transfer-Encoding; bh=c9fKaf6GP2fd7ead3mF41zHJeebo90HTLn1KTIOf20g=; b=SF/LIlcg3coFE+0QlstcN87N6bGfrND+jEezWSHzl/cgskxketG0ex6jooAhTT7JE1Ts ZkCju2IBhliLVw7z34ti4fONVblpPDHjm/2Hv0i9H1QAeAmIPlZna2LBgg3I+j9RZbSMD RGQXA7A0PIparHmzYCjYHn39R439NfrvJWboZtYoSTQh5cBlu2lk5V8BB0AtypcgPfJsO 4jTYat09IfScAN6DoVOQkqUqAq9uEON6ea2hA7WAm+rgHYWQLL21TmLt4xi2uTbxXipnW ncbiAB+kZloj+Xhf1FUcqnQvwjCO6XxWgnyJtEnAZH0i173CgaHkXnB37pUiEUZdbnA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=AubMEixC; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2F82D606A339 for ; Fri, 4 Dec 2026 13:21:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=AubMEixC Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0FB621F000C2; Fri, 4 Dec 2026 13:21:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796390478; bh=c9fKaf6GP2fd7ead3mF41zHJeebo90HTLn1KTIOf20g=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=AubMEixC9zPJ8055ytknPvD2IwezVVCsxoGa3pFI5sO56zUqybVOzkCqQVm6YG2yR jm3TxuTRsJbAY5B16uzpv8rTatH64olUNvdZfA7C7rs2WpPAeTvTKZW5Ey8cj3eR4I NvLpD+j9cgu+YrP8UWkS730AvHIWqV46JuzkRqlKt6e9YvnDVOWbKBxXvi0N77Odi6 z36299dDkIKFXusJKpioESbWSr+ShbZW+greVS/Ejd3z0upIxNNoNq3jRcuYf2DqEQ 3txVRfJIzv3osDNQKhKUmK/tvG7gI3xIGO+6xdP4KfaBzDEW8OVnNVBeEb0y0UhuXG vUvxjeE/Cns9w== From: Sasha Levin To: stable@vger.kernel.org Cc: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , Sumit Garg , Jarkko Sakkinen , Jens Wiklander , Sasha Levin Subject: [PATCH 6.12.y 4/5] KEYS: trusted: Make use of tee bus methods Date: Fri, 4 Dec 2026 08:21:11 -0500 Message-ID: <20261204132104.3150260-4-sashal@kernel.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20261204132104.3150260-1-sashal@kernel.org> References: <2026120350-nape-five-95c1@gregkh> <20261204132104.3150260-1-sashal@kernel.org> X-Mailing-List: stable@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Uwe Kleine-König [ Upstream commit c6ef3e90575b727bf711c93a3e3168d88a6c9479 ] The tee bus got dedicated callbacks for probe and remove. Make use of these. This fixes a runtime warning about the driver needing to be converted to the bus methods. Reviewed-by: Sumit Garg Signed-off-by: Uwe Kleine-König Reviewed-by: Jarkko Sakkinen Signed-off-by: Jens Wiklander Stable-dep-of: b8d381d5ed79 ("KEYS: trusted: TEE: Synchronize session lifetime") Signed-off-by: Sasha Levin --- security/keys/trusted-keys/trusted_tee.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/security/keys/trusted-keys/trusted_tee.c b/security/keys/trusted-keys/trusted_tee.c index 3cea9a3779558..6e465c8bef5e5 100644 --- a/security/keys/trusted-keys/trusted_tee.c +++ b/security/keys/trusted-keys/trusted_tee.c @@ -202,9 +202,9 @@ static int optee_ctx_match(struct tee_ioctl_version_data *ver, const void *data) return 0; } -static int trusted_key_probe(struct device *dev) +static int trusted_key_probe(struct tee_client_device *rng_device) { - struct tee_client_device *rng_device = to_tee_client_device(dev); + struct device *dev = &rng_device->dev; int ret; struct tee_ioctl_open_session_arg sess_arg; @@ -244,13 +244,11 @@ static int trusted_key_probe(struct device *dev) return ret; } -static int trusted_key_remove(struct device *dev) +static void trusted_key_remove(struct tee_client_device *dev) { unregister_key_type(&key_type_trusted); tee_client_close_session(pvt_data.ctx, pvt_data.session_id); tee_client_close_context(pvt_data.ctx); - - return 0; } static const struct tee_client_device_id trusted_key_id_table[] = { @@ -261,11 +259,11 @@ static const struct tee_client_device_id trusted_key_id_table[] = { MODULE_DEVICE_TABLE(tee, trusted_key_id_table); static struct tee_client_driver trusted_key_driver = { + .probe = trusted_key_probe, + .remove = trusted_key_remove, .id_table = trusted_key_id_table, .driver = { .name = DRIVER_NAME, - .probe = trusted_key_probe, - .remove = trusted_key_remove, }, }; -- 2.53.0