Linux-MIPS Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH v1] firmware: tee_bnxt: Use UUID API for exporting the UUID
@ 2020-04-22 13:00 Andy Shevchenko
  2020-06-18 10:56 ` Andy Shevchenko
  0 siblings, 1 reply; 3+ messages in thread
From: Andy Shevchenko @ 2020-04-22 13:00 UTC (permalink / raw)
  To: Rafał Miłecki, linux-mips, Vikas Gupta; +Cc: Andy Shevchenko

There is export_uuid() function which exports uuid_t to the u8 array.
Use it instead of open coding variant.

This allows to hide the uuid_t internals.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/firmware/broadcom/tee_bnxt_fw.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/firmware/broadcom/tee_bnxt_fw.c b/drivers/firmware/broadcom/tee_bnxt_fw.c
index ed10da5313e86..4cf0c2576037d 100644
--- a/drivers/firmware/broadcom/tee_bnxt_fw.c
+++ b/drivers/firmware/broadcom/tee_bnxt_fw.c
@@ -197,7 +197,7 @@ static int tee_bnxt_fw_probe(struct device *dev)
 		return -ENODEV;
 
 	/* Open session with Bnxt load Trusted App */
-	memcpy(sess_arg.uuid, bnxt_device->id.uuid.b, TEE_IOCTL_UUID_LEN);
+	export_uuid(sess_arg.uuid, &bnxt_device->id.uuid);
 	sess_arg.clnt_login = TEE_IOCTL_LOGIN_PUBLIC;
 	sess_arg.num_params = 0;
 
-- 
2.26.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v1] firmware: tee_bnxt: Use UUID API for exporting the UUID
  2020-04-22 13:00 [PATCH v1] firmware: tee_bnxt: Use UUID API for exporting the UUID Andy Shevchenko
@ 2020-06-18 10:56 ` Andy Shevchenko
  2020-10-12 17:24   ` Andy Shevchenko
  0 siblings, 1 reply; 3+ messages in thread
From: Andy Shevchenko @ 2020-06-18 10:56 UTC (permalink / raw)
  To: Rafał Miłecki, linux-mips, Vikas Gupta

On Wed, Apr 22, 2020 at 04:00:21PM +0300, Andy Shevchenko wrote:
> There is export_uuid() function which exports uuid_t to the u8 array.
> Use it instead of open coding variant.
> 
> This allows to hide the uuid_t internals.

Any comment on this?

> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
>  drivers/firmware/broadcom/tee_bnxt_fw.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/firmware/broadcom/tee_bnxt_fw.c b/drivers/firmware/broadcom/tee_bnxt_fw.c
> index ed10da5313e86..4cf0c2576037d 100644
> --- a/drivers/firmware/broadcom/tee_bnxt_fw.c
> +++ b/drivers/firmware/broadcom/tee_bnxt_fw.c
> @@ -197,7 +197,7 @@ static int tee_bnxt_fw_probe(struct device *dev)
>  		return -ENODEV;
>  
>  	/* Open session with Bnxt load Trusted App */
> -	memcpy(sess_arg.uuid, bnxt_device->id.uuid.b, TEE_IOCTL_UUID_LEN);
> +	export_uuid(sess_arg.uuid, &bnxt_device->id.uuid);
>  	sess_arg.clnt_login = TEE_IOCTL_LOGIN_PUBLIC;
>  	sess_arg.num_params = 0;
>  
> -- 
> 2.26.1
> 

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v1] firmware: tee_bnxt: Use UUID API for exporting the UUID
  2020-06-18 10:56 ` Andy Shevchenko
@ 2020-10-12 17:24   ` Andy Shevchenko
  0 siblings, 0 replies; 3+ messages in thread
From: Andy Shevchenko @ 2020-10-12 17:24 UTC (permalink / raw)
  To: Rafał Miłecki, linux-mips, Vikas Gupta; +Cc: op-tee

On Thu, Jun 18, 2020 at 01:56:48PM +0300, Andy Shevchenko wrote:
> On Wed, Apr 22, 2020 at 04:00:21PM +0300, Andy Shevchenko wrote:
> > There is export_uuid() function which exports uuid_t to the u8 array.
> > Use it instead of open coding variant.
> > 
> > This allows to hide the uuid_t internals.
> 
> Any comment on this?

Guys, who is going to pick this up?

> > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> > ---
> >  drivers/firmware/broadcom/tee_bnxt_fw.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/firmware/broadcom/tee_bnxt_fw.c b/drivers/firmware/broadcom/tee_bnxt_fw.c
> > index ed10da5313e86..4cf0c2576037d 100644
> > --- a/drivers/firmware/broadcom/tee_bnxt_fw.c
> > +++ b/drivers/firmware/broadcom/tee_bnxt_fw.c
> > @@ -197,7 +197,7 @@ static int tee_bnxt_fw_probe(struct device *dev)
> >  		return -ENODEV;
> >  
> >  	/* Open session with Bnxt load Trusted App */
> > -	memcpy(sess_arg.uuid, bnxt_device->id.uuid.b, TEE_IOCTL_UUID_LEN);
> > +	export_uuid(sess_arg.uuid, &bnxt_device->id.uuid);
> >  	sess_arg.clnt_login = TEE_IOCTL_LOGIN_PUBLIC;
> >  	sess_arg.num_params = 0;
> >  

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, back to index

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-22 13:00 [PATCH v1] firmware: tee_bnxt: Use UUID API for exporting the UUID Andy Shevchenko
2020-06-18 10:56 ` Andy Shevchenko
2020-10-12 17:24   ` Andy Shevchenko

Linux-MIPS Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-mips/0 linux-mips/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-mips linux-mips/ https://lore.kernel.org/linux-mips \
		linux-mips@vger.kernel.org
	public-inbox-index linux-mips

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-mips


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git