All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sumit Garg <sumit.garg@kernel.org>
To: "Uwe Kleine-König" <u.kleine-koenig@baylibre.com>
Cc: Jens Wiklander <jens.wiklander@linaro.org>,
	Olivia Mackall <olivia@selenic.com>,
	Herbert Xu <herbert@gondor.apana.org.au>,
	op-tee@lists.trustedfirmware.org, linux-crypto@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1 04/17] hwrng: optee - Make use of module_tee_client_driver()
Date: Mon, 15 Dec 2025 16:26:30 +0900	[thread overview]
Message-ID: <aT-4Ju_vgEf2JGC4@sumit-X1> (raw)
In-Reply-To: <a2560b5a16c01dc1f63437ce0d60b3ee9c7cb3b8.1765472125.git.u.kleine-koenig@baylibre.com>

nit for subject: s/hwrng: optee -/hwrng: optee:/

On Thu, Dec 11, 2025 at 06:14:58PM +0100, Uwe Kleine-König wrote:
> Reduce boilerplate by using the newly introduced module_tee_client_driver().
> That takes care of assigning the driver's bus, so the explicit assigning
> in this driver can be dropped.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
> ---
>  drivers/char/hw_random/optee-rng.c | 14 +-------------
>  1 file changed, 1 insertion(+), 13 deletions(-)
>

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

-Sumit

> diff --git a/drivers/char/hw_random/optee-rng.c b/drivers/char/hw_random/optee-rng.c
> index 96b5d546d136..6ee748c0cf57 100644
> --- a/drivers/char/hw_random/optee-rng.c
> +++ b/drivers/char/hw_random/optee-rng.c
> @@ -281,24 +281,12 @@ static struct tee_client_driver optee_rng_driver = {
>  	.id_table	= optee_rng_id_table,
>  	.driver		= {
>  		.name		= DRIVER_NAME,
> -		.bus		= &tee_bus_type,
>  		.probe		= optee_rng_probe,
>  		.remove		= optee_rng_remove,
>  	},
>  };
>  
> -static int __init optee_rng_mod_init(void)
> -{
> -	return driver_register(&optee_rng_driver.driver);
> -}
> -
> -static void __exit optee_rng_mod_exit(void)
> -{
> -	driver_unregister(&optee_rng_driver.driver);
> -}
> -
> -module_init(optee_rng_mod_init);
> -module_exit(optee_rng_mod_exit);
> +module_tee_client_driver(optee_rng_driver);
>  
>  MODULE_LICENSE("GPL v2");
>  MODULE_AUTHOR("Sumit Garg <sumit.garg@linaro.org>");
> -- 
> 2.47.3
> 
> 

WARNING: multiple messages have this Message-ID (diff)
From: Sumit Garg via OP-TEE <op-tee@lists.trustedfirmware.org>
To: "Uwe Kleine-König" <u.kleine-koenig@baylibre.com>
Cc: Olivia Mackall <olivia@selenic.com>,
	Herbert Xu <herbert@gondor.apana.org.au>,
	op-tee@lists.trustedfirmware.org, linux-crypto@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1 04/17] hwrng: optee - Make use of module_tee_client_driver()
Date: Mon, 15 Dec 2025 16:26:30 +0900	[thread overview]
Message-ID: <aT-4Ju_vgEf2JGC4@sumit-X1> (raw)
In-Reply-To: <a2560b5a16c01dc1f63437ce0d60b3ee9c7cb3b8.1765472125.git.u.kleine-koenig@baylibre.com>

nit for subject: s/hwrng: optee -/hwrng: optee:/

On Thu, Dec 11, 2025 at 06:14:58PM +0100, Uwe Kleine-König wrote:
> Reduce boilerplate by using the newly introduced module_tee_client_driver().
> That takes care of assigning the driver's bus, so the explicit assigning
> in this driver can be dropped.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
> ---
>  drivers/char/hw_random/optee-rng.c | 14 +-------------
>  1 file changed, 1 insertion(+), 13 deletions(-)
>

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

-Sumit

> diff --git a/drivers/char/hw_random/optee-rng.c b/drivers/char/hw_random/optee-rng.c
> index 96b5d546d136..6ee748c0cf57 100644
> --- a/drivers/char/hw_random/optee-rng.c
> +++ b/drivers/char/hw_random/optee-rng.c
> @@ -281,24 +281,12 @@ static struct tee_client_driver optee_rng_driver = {
>  	.id_table	= optee_rng_id_table,
>  	.driver		= {
>  		.name		= DRIVER_NAME,
> -		.bus		= &tee_bus_type,
>  		.probe		= optee_rng_probe,
>  		.remove		= optee_rng_remove,
>  	},
>  };
>  
> -static int __init optee_rng_mod_init(void)
> -{
> -	return driver_register(&optee_rng_driver.driver);
> -}
> -
> -static void __exit optee_rng_mod_exit(void)
> -{
> -	driver_unregister(&optee_rng_driver.driver);
> -}
> -
> -module_init(optee_rng_mod_init);
> -module_exit(optee_rng_mod_exit);
> +module_tee_client_driver(optee_rng_driver);
>  
>  MODULE_LICENSE("GPL v2");
>  MODULE_AUTHOR("Sumit Garg <sumit.garg@linaro.org>");
> -- 
> 2.47.3
> 
> 

  reply	other threads:[~2025-12-15  7:26 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 [this message]
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
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=aT-4Ju_vgEf2JGC4@sumit-X1 \
    --to=sumit.garg@kernel.org \
    --cc=herbert@gondor.apana.org.au \
    --cc=jens.wiklander@linaro.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=olivia@selenic.com \
    --cc=op-tee@lists.trustedfirmware.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.