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=1796390801; b=A1GFqZDJiaBwgHr76y+EEyeYfPKJFsRI7J49mQPJIhh1qaO6wjcDXkNjW4lsOXlfVL3j iDKsGxHmgkrUZ2BzivTe5K/zFU5LEHvtmn0nEIcrfV6cYKFsWpLfcsxAJ94Th0IxjIiK5 Oeli9JKQxvTgYnDPjfXouqsHTIZqafafti/6j9Q4RvN5jiN7AsGxPU+5PzOOHIjUU8o/8 80va9/5mNLmi9CSRKLETPY74I4JoC3BgW2nFmKund9vtVbV3hIpfVFJ58Jx9XMkzH4dvO eDlCZWh0a31nD7LMoiQz6tPRsk0mkQFr41zh9C3pXrLBfKq8CHM1Sx/0qSiBxTzNYRg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796390801; 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=rpiMATxDCy8L05P8ttqAXVgwvQ6Qd9lbeJZ2lu8T4LxwEOs9S+gHJp6rwlPNZ8TpzuE8 36LGBU2LkLcIw5uw8GrM7aEbqsDDMpqIdyFjQ71+SneRJW0IXd5Mkj58NymI6kt5RuasS 79X5O3zjhr13yQlYE6kpZa6Bh6nwf8ZfNIbCJ9qQJTIqlEyylAMHREsu88+TvledPRpl9 t3BvQiUxdivOWH24deeR8MP6YQZToQ7WqfMUlgRPQtIrDXgdOYeVc9hf7PIZygzQIGe54 3PTH7EA+l6Mz8nCAygSstjWLxManhn/kI7ERowxNu+++UxpBYo8ZCK/+kO8N7buCpbw== 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=TcCZ4UpB; 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 A6EA5606A33E for ; Fri, 4 Dec 2026 13:26:41 +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=TcCZ4UpB Received: by smtp.kernel.org (Postfix) with ESMTPSA id 67A761F00931; Fri, 4 Dec 2026 13:26:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796390801; bh=c9fKaf6GP2fd7ead3mF41zHJeebo90HTLn1KTIOf20g=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=TcCZ4UpBWBZMNakSDPxG6GRa1WB3i/gSzXXd2T9RjTylTjl4h1pP3i2YfsHBGWy1B G2c5YaQM4lF9VlfpD20u/8LpVWUY9sVw+8Y2fAwhtJW8sPVVse3PTrPyIt69g3kucF TJBxtdazn2a9wcTTyS5xTyig/X47EslL7plpX2bD+a61gmbdYRg3kX/yJCBiUXY7CU W5l5z97HkSDxFANMO7ww3FyJLIRzdW3lFMvsXrfGwjeJuFIWIj9piMloqALLzvLr// uKpyHuCMfC7nkDU0Yofr28cKLw+b/aUDHMgz2M8y4Fu/t2jTFRSmDZueR9KHNXdvg6 Rkzk94nI4sBZg== 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.6.y 5/6] KEYS: trusted: Make use of tee bus methods Date: Fri, 4 Dec 2026 08:26:32 -0500 Message-ID: <20261204132625.3155943-5-sashal@kernel.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20261204132625.3155943-1-sashal@kernel.org> References: <2026120350-catnip-lumpish-9043@gregkh> <20261204132625.3155943-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