All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexandre Belloni <alexandre.belloni@bootlin.com>
To: "Uwe Kleine-König" <u.kleine-koenig@baylibre.com>
Cc: "Jens Wiklander" <jens.wiklander@linaro.org>,
	"Clément Léger" <clement.leger@bootlin.com>,
	"Sumit Garg" <sumit.garg@kernel.org>,
	op-tee@lists.trustedfirmware.org, linux-rtc@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1 07/17] rtc: optee: Make use of tee bus methods
Date: Mon, 15 Dec 2025 11:42:35 +0100	[thread overview]
Message-ID: <20251215104235c0010f89@mail.local> (raw)
In-Reply-To: <a9c8da1b7b2832044129ec9e2616c40e0023ad57.1765472125.git.u.kleine-koenig@baylibre.com>

On 11/12/2025 18:15:01+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.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>

Acked-by: Alexandre Belloni <alexandre.belloni@bootlin.com>

> ---
>  drivers/rtc/rtc-optee.c | 13 ++++++-------
>  1 file changed, 6 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/rtc/rtc-optee.c b/drivers/rtc/rtc-optee.c
> index f924a729ead0..eefde789d194 100644
> --- a/drivers/rtc/rtc-optee.c
> +++ b/drivers/rtc/rtc-optee.c
> @@ -547,9 +547,9 @@ static int optee_ctx_match(struct tee_ioctl_version_data *ver, const void *data)
>  		return 0;
>  }
>  
> -static int optee_rtc_probe(struct device *dev)
> +static int optee_rtc_probe(struct tee_client_device *rtc_device)
>  {
> -	struct tee_client_device *rtc_device = to_tee_client_device(dev);
> +	struct device *dev = &rtc_device->dev;
>  	struct tee_ioctl_open_session_arg sess2_arg = {0};
>  	struct tee_ioctl_open_session_arg sess_arg = {0};
>  	struct optee_rtc *priv;
> @@ -682,8 +682,9 @@ static int optee_rtc_probe(struct device *dev)
>  	return err;
>  }
>  
> -static int optee_rtc_remove(struct device *dev)
> +static void optee_rtc_remove(struct tee_client_device *rtc_device)
>  {
> +	struct device *dev = &rtc_device->dev;
>  	struct optee_rtc *priv = dev_get_drvdata(dev);
>  
>  	if (priv->features & TA_RTC_FEATURE_ALARM) {
> @@ -696,8 +697,6 @@ static int optee_rtc_remove(struct device *dev)
>  	tee_shm_free(priv->shm);
>  	tee_client_close_session(priv->ctx, priv->session_id);
>  	tee_client_close_context(priv->ctx);
> -
> -	return 0;
>  }
>  
>  static int optee_rtc_suspend(struct device *dev)
> @@ -724,10 +723,10 @@ MODULE_DEVICE_TABLE(tee, optee_rtc_id_table);
>  
>  static struct tee_client_driver optee_rtc_driver = {
>  	.id_table	= optee_rtc_id_table,
> +	.probe		= optee_rtc_probe,
> +	.remove		= optee_rtc_remove,
>  	.driver		= {
>  		.name		= "optee_rtc",
> -		.probe		= optee_rtc_probe,
> -		.remove		= optee_rtc_remove,
>  		.pm		= pm_sleep_ptr(&optee_rtc_pm_ops),
>  	},
>  };
> -- 
> 2.47.3
> 

-- 
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

WARNING: multiple messages have this Message-ID (diff)
From: Alexandre Belloni via OP-TEE <op-tee@lists.trustedfirmware.org>
To: "Uwe Kleine-König" <u.kleine-koenig@baylibre.com>
Cc: "Clément Léger" <clement.leger@bootlin.com>,
	"Sumit Garg" <sumit.garg@kernel.org>,
	op-tee@lists.trustedfirmware.org, linux-rtc@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1 07/17] rtc: optee: Make use of tee bus methods
Date: Mon, 15 Dec 2025 11:42:35 +0100	[thread overview]
Message-ID: <20251215104235c0010f89@mail.local> (raw)
In-Reply-To: <a9c8da1b7b2832044129ec9e2616c40e0023ad57.1765472125.git.u.kleine-koenig@baylibre.com>

On 11/12/2025 18:15:01+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.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>

Acked-by: Alexandre Belloni <alexandre.belloni@bootlin.com>

> ---
>  drivers/rtc/rtc-optee.c | 13 ++++++-------
>  1 file changed, 6 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/rtc/rtc-optee.c b/drivers/rtc/rtc-optee.c
> index f924a729ead0..eefde789d194 100644
> --- a/drivers/rtc/rtc-optee.c
> +++ b/drivers/rtc/rtc-optee.c
> @@ -547,9 +547,9 @@ static int optee_ctx_match(struct tee_ioctl_version_data *ver, const void *data)
>  		return 0;
>  }
>  
> -static int optee_rtc_probe(struct device *dev)
> +static int optee_rtc_probe(struct tee_client_device *rtc_device)
>  {
> -	struct tee_client_device *rtc_device = to_tee_client_device(dev);
> +	struct device *dev = &rtc_device->dev;
>  	struct tee_ioctl_open_session_arg sess2_arg = {0};
>  	struct tee_ioctl_open_session_arg sess_arg = {0};
>  	struct optee_rtc *priv;
> @@ -682,8 +682,9 @@ static int optee_rtc_probe(struct device *dev)
>  	return err;
>  }
>  
> -static int optee_rtc_remove(struct device *dev)
> +static void optee_rtc_remove(struct tee_client_device *rtc_device)
>  {
> +	struct device *dev = &rtc_device->dev;
>  	struct optee_rtc *priv = dev_get_drvdata(dev);
>  
>  	if (priv->features & TA_RTC_FEATURE_ALARM) {
> @@ -696,8 +697,6 @@ static int optee_rtc_remove(struct device *dev)
>  	tee_shm_free(priv->shm);
>  	tee_client_close_session(priv->ctx, priv->session_id);
>  	tee_client_close_context(priv->ctx);
> -
> -	return 0;
>  }
>  
>  static int optee_rtc_suspend(struct device *dev)
> @@ -724,10 +723,10 @@ MODULE_DEVICE_TABLE(tee, optee_rtc_id_table);
>  
>  static struct tee_client_driver optee_rtc_driver = {
>  	.id_table	= optee_rtc_id_table,
> +	.probe		= optee_rtc_probe,
> +	.remove		= optee_rtc_remove,
>  	.driver		= {
>  		.name		= "optee_rtc",
> -		.probe		= optee_rtc_probe,
> -		.remove		= optee_rtc_remove,
>  		.pm		= pm_sleep_ptr(&optee_rtc_pm_ops),
>  	},
>  };
> -- 
> 2.47.3
> 

-- 
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

  parent reply	other threads:[~2025-12-15 10:42 UTC|newest]

Thread overview: 71+ 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:14 ` [PATCH v1 01/17] tee: Add some helpers to reduce boilerplate for tee client drivers Uwe Kleine-König
2025-12-15  7:05   ` Sumit Garg via OP-TEE
2025-12-15  7:05     ` Sumit Garg
2025-12-11 17:14 ` [PATCH v1 02/17] tee: Add probe, remove and shutdown bus callbacks to tee_client_driver Uwe Kleine-König
2025-12-15  7:23   ` Sumit Garg via OP-TEE
2025-12-15  7:23     ` Sumit Garg
2025-12-11 17:14 ` [PATCH v1 03/17] tee: Adapt documentation to cover recent additions Uwe Kleine-König
2025-12-15  7:24   ` Sumit Garg via OP-TEE
2025-12-15  7:24     ` Sumit Garg
2025-12-11 17:14 ` [PATCH v1 04/17] hwrng: optee - Make use of module_tee_client_driver() Uwe Kleine-König
2025-12-15  7:26   ` Sumit Garg
2025-12-15  7:26     ` Sumit Garg via OP-TEE
2025-12-11 17:14 ` [PATCH v1 05/17] hwrng: optee - Make use of tee bus methods Uwe Kleine-König
2025-12-15  7:27   ` Sumit Garg
2025-12-15  7:27     ` Sumit Garg via OP-TEE
2025-12-11 17:15 ` [PATCH v1 06/17] rtc: optee: Migrate to use tee specific driver registration function Uwe Kleine-König
2025-12-15  7:28   ` Sumit Garg
2025-12-15  7:28     ` Sumit Garg via OP-TEE
2025-12-15 10:41   ` Alexandre Belloni
2025-12-15 10:41     ` Alexandre Belloni via OP-TEE
2025-12-11 17:15 ` [PATCH v1 07/17] rtc: optee: Make use of tee bus methods Uwe Kleine-König
2025-12-15  7:30   ` Sumit Garg
2025-12-15  7:30     ` Sumit Garg via OP-TEE
2025-12-15 10:42   ` Alexandre Belloni [this message]
2025-12-15 10:42     ` Alexandre Belloni via OP-TEE
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-15  7:55     ` Sumit Garg via OP-TEE
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-15  7:55     ` Sumit Garg via OP-TEE
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-12 12:33     ` Sudeep Holla
2025-12-15  7:30   ` Sumit Garg
2025-12-15  7:30     ` Sumit Garg via OP-TEE
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-12 12:34     ` Sudeep Holla
2025-12-15  7:32   ` Sumit Garg
2025-12-15  7:32     ` Sumit Garg via OP-TEE
2025-12-11 17:15 ` [PATCH v1 12/17] firmware: tee_bnxt: Make use of module_tee_client_driver() Uwe Kleine-König
2025-12-15  7:33   ` Sumit Garg
2025-12-15  7:33     ` Sumit Garg via OP-TEE
2025-12-11 17:15 ` [PATCH v1 13/17] firmware: tee_bnxt: Make use of tee bus methods Uwe Kleine-König
2025-12-15  7:34   ` Sumit Garg
2025-12-15  7:34     ` Sumit Garg via OP-TEE
2025-12-11 17:15 ` [PATCH v1 14/17] KEYS: trusted: Migrate to use tee specific driver registration function Uwe Kleine-König
2025-12-15  7:36   ` Sumit Garg
2025-12-15  7:36     ` Sumit Garg via OP-TEE
2025-12-11 17:15 ` [PATCH v1 15/17] KEYS: trusted: Make use of tee bus methods Uwe Kleine-König
2025-12-15  7:36   ` Sumit Garg
2025-12-15  7:36     ` Sumit Garg via OP-TEE
2025-12-11 17:15 ` [PATCH v1 16/17] tpm/tpm_ftpm_tee: Make use of tee specific driver registration Uwe Kleine-König
2025-12-15  7:38   ` Sumit Garg
2025-12-15  7:38     ` Sumit Garg via OP-TEE
2025-12-11 17:15 ` [PATCH v1 17/17] tpm/tpm_ftpm_tee: Make use of tee bus methods Uwe Kleine-König
2025-12-11 20:22   ` Jarkko Sakkinen
2025-12-11 20:22     ` Jarkko Sakkinen via OP-TEE
2025-12-11 20:22   ` Jarkko Sakkinen
2025-12-11 20:22     ` Jarkko Sakkinen via OP-TEE
2025-12-15  7:40   ` Sumit Garg
2025-12-15  7:40     ` Sumit Garg via OP-TEE
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=20251215104235c0010f89@mail.local \
    --to=alexandre.belloni@bootlin.com \
    --cc=clement.leger@bootlin.com \
    --cc=jens.wiklander@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rtc@vger.kernel.org \
    --cc=op-tee@lists.trustedfirmware.org \
    --cc=sumit.garg@kernel.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.