diff mbox series

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

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

Commit Message

Andy Shevchenko May 4, 2022, 9:14 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>
Reviewed-by: Christoph Hellwig <hch@lst.de>
---
v4: added tag (Christoph), resent with 126858db81a5 (in next) in mind (Florian)

 drivers/firmware/broadcom/tee_bnxt_fw.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jakub Kicinski May 5, 2022, 4:39 p.m. UTC | #1
On Wed,  4 May 2022 12:14:07 +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>
> Reviewed-by: Christoph Hellwig <hch@lst.de>
> ---
> v4: added tag (Christoph), resent with 126858db81a5 (in next) in mind (Florian)

Judging by the history of the file this may go via the tee tree or
net-next. Since tee was not CCed I presume the latter is preferred.
Please let us know if that's incorrect otherwise we'll apply tomorrow :)
Florian Fainelli May 5, 2022, 5:17 p.m. UTC | #2
On 5/5/22 09:39, Jakub Kicinski wrote:
> On Wed,  4 May 2022 12:14:07 +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>
>> Reviewed-by: Christoph Hellwig <hch@lst.de>
>> ---
>> v4: added tag (Christoph), resent with 126858db81a5 (in next) in mind (Florian)
> 
> Judging by the history of the file this may go via the tee tree or
> net-next. Since tee was not CCed I presume the latter is preferred.
> Please let us know if that's incorrect otherwise we'll apply tomorrow :)

This file has historically been without a maintainer or tree, but since 
it is somewhat related to the bnxt driver, I eventually signed up 
Michael to also review such patches:

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=126858db81a5094d20885bc59621c3b9497f9048

If you could apply it via netdev-next/master that owuld be great, thanks!
patchwork-bot+netdevbpf@kernel.org May 6, 2022, 2 a.m. UTC | #3
Hello:

This patch was applied to netdev/net-next.git (master)
by Jakub Kicinski <kuba@kernel.org>:

On Wed,  4 May 2022 12:14:07 +0300 you 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>
> Reviewed-by: Christoph Hellwig <hch@lst.de>
> 
> [...]

Here is the summary with links:
  - [v4,1/1] firmware: tee_bnxt: Use UUID API for exporting the UUID
    https://git.kernel.org/netdev/net-next/c/10b4a11fe70f

You are awesome, thank you!
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;