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=1796390175; b=e99/x4jHnud5b1Qila9HUBzquztPdgQdUGmQbfUBdZmTyE7fqu0DjyWGboDuozo+5fdI 24WGrQvrEcrQrQnnTys2nvv2Ogevsk8+3CDEPOYRV6dmXtSXm6GwmFOBhHXoDahxhrSHp KcvFghR8sSYMwzCb+Ovkg79xLmin3D1vh1VlpnMNZansaP0OXIuRMUOZPQb+p3Cg3hgV+ nzGZOJV4wELA/QfQC64NcmF45ep+7ip/KJHdCOj/w7f3tHCRfvtJ2FFTOmTP6TQhGJ3I9 PQLtq4+vhNfCyBiZPGeWfe/bKFuLcoYn93WSqaWJ3sfYb9QjGo7gZjNpHDiadsLKlpQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796390175; 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=Nu21qXZTl53rfOxMyHd2u6ucqvZg95yKk6FQDxDPqqk5oVSf0WKK39RIaxY5PG/wzpOR HMT/JkyxveD/hS71koEKHhQknbx9b8K3UtL8wnknHJPPlu8FcemiasNTQnwQdeLy4Twwg i6/AnUo7gxhK1FBYxEBhtQ3wQwRO27ThfHw1hEdnhB2/XZwAfgUgIta5j/2o1+f6EH5Vg d9WoLJIk7fJZAakuQ7JJlGD+ZR2z8CRzqxJb4Gbjje9ffrsM1u+mLHNxcNobe2ilyCSvf +H8erA9mVnre79JXYsPNfwvkXiPcDU3g3QsnYqWkSCosmmHbFWnoyBGqh6BtGrvGiSw== 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=R3NeUjAk; 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 A7C5F606A337 for ; Fri, 4 Dec 2026 13:16:15 +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=R3NeUjAk Received: by smtp.kernel.org (Postfix) with ESMTPSA id C459E1F0092C; Fri, 4 Dec 2026 13:16:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796390175; bh=c9fKaf6GP2fd7ead3mF41zHJeebo90HTLn1KTIOf20g=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=R3NeUjAkawM5tlcdh8s1LLB5JiK4PgkXZlYDaYgn7eQO5ULLtVfcWBg5GyCBATSvo PZNNSBeUWRIM2oGXXYQSJ7vOhQWBGr3ki9UgilGP8RBaapvdcMRFWO8PnOPuLuNm31 rzgKGasY656IYn4NwSuEDhho9AiSCFyVuiXZB3epO74LQMSkG0PFZ6HW2y/FBEUqB0 DAOkNppSBUmi5RWrozIQItTk/gRMa3//PdHqddNQGptX9KSaI0tFIWtW4EN746BAp1 8xaeq/IA1h3YgLrihPHT/PeeUI+PuJSeE9ME/WDCxGtdgmnozl7dF/apt1OKkvsaI+ uLxo4pHUStzAA== 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.18.y 4/5] KEYS: trusted: Make use of tee bus methods Date: Fri, 4 Dec 2026 08:16:09 -0500 Message-ID: <20261204131603.3126555-4-sashal@kernel.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20261204131603.3126555-1-sashal@kernel.org> References: <2026120349-ivy-angling-cb79@gregkh> <20261204131603.3126555-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