Skip to contentSkip to conversation

firmware: tee_bnxt: Use UUID API for exporting the UUID

PATCH Superseded Andy Shevchenko 3 participants 8 messages Apr 12, 2022 – May 4, 2022

Subsystems (3)

v3 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH v3 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.

---
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(-)
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
#1 lore raw
Quoted 8 lines · 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.

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

Quoted 16 lines
  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
Florian
#2 lore raw
In reply to Florian Fainelli
Quoted 1 line · Florian Fainelli

On 4/12/2022 4:32 AM, Andy Shevchenko wrote:

...

Quoted 5 lines
Quoted 1 line

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!

Signature · 2 lines
With Best Regards,
Andy Shevchenko
#3 lore raw
In reply to Florian Fainelli
Quoted 6 lines · Florian Fainelli
Quoted 5 lines · 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.

Quoted 7 lines
Quoted 3 lines

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

Signature · 2 lines
With Best Regards,
Andy Shevchenko
#4 lore raw
Quoted 11 lines · Andy Shevchenko
Quoted 10 lines · Florian Fainelli
Quoted 8 lines · 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.

---
v3: rebased on the latest vanilla, added Andrew since it has no move for 1y+

Quoted 6 lines
Quoted 3 lines

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!

Signature · 1 line
Florian
#5 lore raw
Quoted 16 lines · Florian Fainelli
Quoted 15 lines · Andy Shevchenko
Quoted 13 lines · Florian Fainelli
Quoted 8 lines · 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.

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

Quoted 5 lines
Quoted 2 lines

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!

Signature · 2 lines
With Best Regards,
Andy Shevchenko