From: Sumit Garg <sumit.garg@kernel.org>
To: "Uwe Kleine-König" <u.kleine-koenig@baylibre.com>
Cc: Jens Wiklander <jens.wiklander@linaro.org>,
Sudeep Holla <sudeep.holla@arm.com>,
Christophe JAILLET <christophe.jaillet@wanadoo.fr>,
Cristian Marussi <cristian.marussi@arm.com>,
op-tee@lists.trustedfirmware.org, arm-scmi@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1 11/17] firmware: arm_scmi: Make use of tee bus methods
Date: Mon, 15 Dec 2025 16:32:55 +0900 [thread overview]
Message-ID: <aT-5p7FTvNU8jcLU@sumit-X1> (raw)
In-Reply-To: <46dae3cada663b3a5ae1989881d9e74ef40acce5.1765472125.git.u.kleine-koenig@baylibre.com>
On Thu, Dec 11, 2025 at 06:15:05PM +0100, Uwe Kleine-König wrote:
> 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. Note that the return value of .remove()
> was already ignored before, so there is no problem introduced by dropping
> the error returns.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
> ---
> drivers/firmware/arm_scmi/transports/optee.c | 19 +++++++++----------
> 1 file changed, 9 insertions(+), 10 deletions(-)
Reviewed-by: Sumit Garg <sumit.garg@oss.qualcomm.com>
-Sumit
>
> diff --git a/drivers/firmware/arm_scmi/transports/optee.c b/drivers/firmware/arm_scmi/transports/optee.c
> index 8fdb80d3fabd..07ae18d5279d 100644
> --- a/drivers/firmware/arm_scmi/transports/optee.c
> +++ b/drivers/firmware/arm_scmi/transports/optee.c
> @@ -529,8 +529,9 @@ static const struct of_device_id scmi_of_match[] = {
> DEFINE_SCMI_TRANSPORT_DRIVER(scmi_optee, scmi_optee_driver, scmi_optee_desc,
> scmi_of_match, core);
>
> -static int scmi_optee_service_probe(struct device *dev)
> +static int scmi_optee_service_probe(struct tee_client_device *scmi_pta)
> {
> + struct device *dev = &scmi_pta->dev;
> struct scmi_optee_agent *agent;
> struct tee_context *tee_ctx;
> int ret;
> @@ -578,24 +579,22 @@ static int scmi_optee_service_probe(struct device *dev)
> return ret;
> }
>
> -static int scmi_optee_service_remove(struct device *dev)
> +static void scmi_optee_service_remove(struct tee_client_device *scmi_pta)
> {
> struct scmi_optee_agent *agent = scmi_optee_private;
>
> if (!scmi_optee_private)
> - return -EINVAL;
> + return;
>
> platform_driver_unregister(&scmi_optee_driver);
>
> if (!list_empty(&scmi_optee_private->channel_list))
> - return -EBUSY;
> + return;
>
> /* Ensure cleared reference is visible before resources are released */
> smp_store_mb(scmi_optee_private, NULL);
>
> tee_client_close_context(agent->tee_ctx);
> -
> - return 0;
> }
>
> static const struct tee_client_device_id scmi_optee_service_id[] = {
> @@ -609,11 +608,11 @@ static const struct tee_client_device_id scmi_optee_service_id[] = {
> MODULE_DEVICE_TABLE(tee, scmi_optee_service_id);
>
> static struct tee_client_driver scmi_optee_service_driver = {
> - .id_table = scmi_optee_service_id,
> - .driver = {
> + .probe = scmi_optee_service_probe,
> + .remove = scmi_optee_service_remove,
> + .id_table = scmi_optee_service_id,
> + .driver = {
> .name = "scmi-optee",
> - .probe = scmi_optee_service_probe,
> - .remove = scmi_optee_service_remove,
> },
> };
>
> --
> 2.47.3
>
>
next prev parent reply other threads:[~2025-12-15 7:33 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-11 17:14 [PATCH v1 00/17] tee: Use bus callbacks instead of driver callbacks Uwe Kleine-König
2025-12-11 17:15 ` [PATCH v1 08/17] efi: stmm: Make use of module_tee_client_driver() Uwe Kleine-König
2025-12-15 7:55 ` Sumit Garg
2025-12-11 17:15 ` [PATCH v1 09/17] efi: stmm: Make use of tee bus methods Uwe Kleine-König
2025-12-15 7:55 ` Sumit Garg
2025-12-11 17:15 ` [PATCH v1 10/17] firmware: arm_scmi: optee: Make use of module_tee_client_driver() Uwe Kleine-König
2025-12-12 12:33 ` Sudeep Holla
2025-12-15 7:30 ` Sumit Garg
2025-12-11 17:15 ` [PATCH v1 11/17] firmware: arm_scmi: Make use of tee bus methods Uwe Kleine-König
2025-12-12 12:34 ` Sudeep Holla
2025-12-15 7:32 ` Sumit Garg [this message]
2025-12-15 7:54 ` [PATCH v1 00/17] tee: Use bus callbacks instead of driver callbacks Sumit Garg
2025-12-15 9:32 ` Uwe Kleine-König
2025-12-16 7:38 ` Sumit Garg
2025-12-16 11:08 ` Uwe Kleine-König
2025-12-17 7:55 ` Sumit Garg
2025-12-17 8:21 ` Uwe Kleine-König
2025-12-17 9:02 ` Sumit Garg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aT-5p7FTvNU8jcLU@sumit-X1 \
--to=sumit.garg@kernel.org \
--cc=arm-scmi@vger.kernel.org \
--cc=christophe.jaillet@wanadoo.fr \
--cc=cristian.marussi@arm.com \
--cc=jens.wiklander@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=op-tee@lists.trustedfirmware.org \
--cc=sudeep.holla@arm.com \
--cc=u.kleine-koenig@baylibre.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).