Skip to contentSkip to conversation

firmware: tee_bnxt: Use UUID API for exporting the UUID

PATCH Applied Andy Shevchenko 4 participants 4 messages May 4, 2022 – May 6, 2022

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

PATCH v4 1/1 firmware: tee_bnxt: Use UUID API for exporting the UUID

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.

---
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(-)
drivers/firmware/broadcom/tee_bnxt_fw.c +1 -1
index a5bf4c3f6dc7..40e3183a3d11 100644
@@ -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;
 
Signature · 1 line
2.35.1
maintainer
#1 lore raw
Quoted 9 lines · 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.

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

#2 lore raw
Quoted 6 lines · Jakub Kicinski
Quoted 5 lines · 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.

Quoted 8 lines
Quoted 4 lines

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

Signature · 1 line
Florian
#3 lore raw
In reply to Andy Shevchenko
This patch was applied to netdev/net-next.git (master) by Jakub Kicinski <[email protected]>:

Hello:

This patch was applied to netdev/net-next.git (master) by Jakub Kicinski <[email protected]>:

Quoted 9 lines · 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.

[...]

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!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html