diff mbox series

[v3,1/1] firmware: tee_bnxt: Use UUID API for exporting the UUID

Message ID 20220412113250.57997-1-andriy.shevchenko@linux.intel.com (mailing list archive)
State Superseded
Headers show
Series [v3,1/1] firmware: tee_bnxt: Use UUID API for exporting the UUID | expand

Commit Message

Andy Shevchenko April 12, 2022, 11:32 a.m. UTC
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>
---
v3: rebased on the latest vanilla, added Andrew since it has no move for 1y+
 drivers/firmware/broadcom/tee_bnxt_fw.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Florian Fainelli April 13, 2022, 3:38 p.m. UTC | #1
On 4/12/2022 4:32 AM, 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.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
> v3: rebased on the latest vanilla, added Andrew since it has no move for 1y+

I don't think this is going to be picked up unless we designate a entry 
in the MAINTAINERS file, I don't mind taking this via the Broadcom ARM 
SoCs pull request if this does not move.

>   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 a5bf4c3f6dc7..40e3183a3d11 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;
>
Christoph Hellwig April 13, 2022, 4:43 p.m. UTC | #2
On Tue, Apr 12, 2022 at 02:32:50PM +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.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

Looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>
Andy Shevchenko April 13, 2022, 4:51 p.m. UTC | #3
On Wed, Apr 13, 2022 at 08:38:41AM -0700, Florian Fainelli wrote:
> On 4/12/2022 4:32 AM, Andy Shevchenko wrote:

...

> > v3: rebased on the latest vanilla, added Andrew since it has no move for 1y+
> 
> I don't think this is going to be picked up unless we designate a entry in
> the MAINTAINERS file, I don't mind taking this via the Broadcom ARM SoCs
> pull request if this does not move.

Please do, seems above mentioned tree is the best choice for this driver.

Thanks!
Andy Shevchenko April 13, 2022, 4:52 p.m. UTC | #4
On Wed, Apr 13, 2022 at 06:43:19PM +0200, Christoph Hellwig wrote:
> On Tue, Apr 12, 2022 at 02:32:50PM +0300, Andy Shevchenko wrote:

...

> Reviewed-by: Christoph Hellwig <hch@lst.de>

Thanks!
Andy Shevchenko May 3, 2022, 10:19 a.m. UTC | #5
On Wed, Apr 13, 2022 at 08:38:41AM -0700, Florian Fainelli wrote:
> On 4/12/2022 4:32 AM, 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.
> > 
> > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> > ---
> > v3: rebased on the latest vanilla, added Andrew since it has no move for 1y+
> 
> I don't think this is going to be picked up unless we designate a entry in
> the MAINTAINERS file, I don't mind taking this via the Broadcom ARM SoCs
> pull request if this does not move.

I saw your patch has been picked up to up-to-date MAINTAINERS record.
Can this one now be picked up too?
Florian Fainelli May 3, 2022, 7:28 p.m. UTC | #6
On 5/3/22 03:19, Andy Shevchenko wrote:
> On Wed, Apr 13, 2022 at 08:38:41AM -0700, Florian Fainelli wrote:
>> On 4/12/2022 4:32 AM, 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.
>>>
>>> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
>>> ---
>>> v3: rebased on the latest vanilla, added Andrew since it has no move for 1y+
>>
>> I don't think this is going to be picked up unless we designate a entry in
>> the MAINTAINERS file, I don't mind taking this via the Broadcom ARM SoCs
>> pull request if this does not move.
> 
> I saw your patch has been picked up to up-to-date MAINTAINERS record.
> Can this one now be picked up too?

Please resubmit targeting David Miller's net-next tree since this is how 
patches would be merged moving forward. Thanks!
Andy Shevchenko May 4, 2022, 9:14 a.m. UTC | #7
On Tue, May 03, 2022 at 12:28:18PM -0700, Florian Fainelli wrote:
> On 5/3/22 03:19, Andy Shevchenko wrote:
> > On Wed, Apr 13, 2022 at 08:38:41AM -0700, Florian Fainelli wrote:
> > > On 4/12/2022 4:32 AM, 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.
> > > > 
> > > > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> > > > ---
> > > > v3: rebased on the latest vanilla, added Andrew since it has no move for 1y+
> > > 
> > > I don't think this is going to be picked up unless we designate a entry in
> > > the MAINTAINERS file, I don't mind taking this via the Broadcom ARM SoCs
> > > pull request if this does not move.
> > 
> > I saw your patch has been picked up to up-to-date MAINTAINERS record.
> > Can this one now be picked up too?
> 
> Please resubmit targeting David Miller's net-next tree since this is how
> patches would be merged moving forward. Thanks!

Done, thanks!
diff mbox series

Patch

diff --git a/drivers/firmware/broadcom/tee_bnxt_fw.c b/drivers/firmware/broadcom/tee_bnxt_fw.c
index a5bf4c3f6dc7..40e3183a3d11 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;