lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aT-5CCZBzZdn937E@sumit-X1>
Date: Mon, 15 Dec 2025 16:30:16 +0900
From: Sumit Garg <sumit.garg@...nel.org>
To: Uwe Kleine-König <u.kleine-koenig@...libre.com>
Cc: Jens Wiklander <jens.wiklander@...aro.org>,
	Clément Léger <clement.leger@...tlin.com>,
	Alexandre Belloni <alexandre.belloni@...tlin.com>,
	op-tee@...ts.trustedfirmware.org, linux-rtc@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH v1 07/17] rtc: optee: Make use of tee bus methods

On Thu, Dec 11, 2025 at 06:15:01PM +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@...libre.com>
> ---
>  drivers/rtc/rtc-optee.c | 13 ++++++-------
>  1 file changed, 6 insertions(+), 7 deletions(-)

Reviewed-by: Sumit Garg <sumit.garg@....qualcomm.com>

-Sumit

> 
> 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
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ