public inbox for op-tee@lists.trustedfirmware.org
 help / color / mirror / Atom feed
* [PATCH 0/2] small amdtee cleanups
@ 2025-04-21 15:22 Mario Limonciello
  2025-04-21 15:22 ` [PATCH 1/2] tee: Use pr_fmt for messages Mario Limonciello
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Mario Limonciello @ 2025-04-21 15:22 UTC (permalink / raw)
  To: op-tee

[-- Attachment #1: Type: text/plain, Size: 448 bytes --]

From: Mario Limonciello <mario.limonciello@amd.com>

I just noticed a few small things for amdtee where the error messages
didn't consistently use the driver name.  While fixing that I noticed
the headers weren't sorted.

These patches fix both issues.

Mario Limonciello (2):
  tee: Use pr_fmt for messages
  tee: Sort header includes

 drivers/tee/amdtee/core.c | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

-- 
2.43.0


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

* [PATCH 1/2] tee: Use pr_fmt for messages
  2025-04-21 15:22 [PATCH 0/2] small amdtee cleanups Mario Limonciello
@ 2025-04-21 15:22 ` Mario Limonciello
  2025-04-28  7:45   ` Sumit Garg
  2025-04-21 15:22 ` [PATCH 2/2] tee: Sort header includes Mario Limonciello
  2025-04-28 14:27 ` [PATCH 0/2] small amdtee cleanups Jens Wiklander
  2 siblings, 1 reply; 6+ messages in thread
From: Mario Limonciello @ 2025-04-21 15:22 UTC (permalink / raw)
  To: op-tee

[-- Attachment #1: Type: text/plain, Size: 1512 bytes --]

From: Mario Limonciello <mario.limonciello@amd.com>

amd-tee inconsistently uses the word amd-tee in error messages.

Add a `pr_fmt()` define and remove the hardcoded use of amd-tee.
Also, remove the unnecessary driver init successful message because
there will be a message if failed and a user can assume it was successful
otherwise.

Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
---
 drivers/tee/amdtee/core.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/tee/amdtee/core.c b/drivers/tee/amdtee/core.c
index e487231d25dc0..a44625d076401 100644
--- a/drivers/tee/amdtee/core.c
+++ b/drivers/tee/amdtee/core.c
@@ -3,6 +3,8 @@
  * Copyright 2019 Advanced Micro Devices, Inc.
  */
 
+ #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/errno.h>
 #include <linux/io.h>
 #include <linux/module.h>
@@ -458,7 +460,7 @@ static int __init amdtee_driver_init(void)
 
 	rc = psp_check_tee_status();
 	if (rc) {
-		pr_err("amd-tee driver: tee not present\n");
+		pr_err("tee not present\n");
 		return rc;
 	}
 
@@ -494,7 +496,6 @@ static int __init amdtee_driver_init(void)
 
 	drv_data->amdtee = amdtee;
 
-	pr_info("amd-tee driver initialization successful\n");
 	return 0;
 
 err_device_unregister:
@@ -510,7 +511,7 @@ static int __init amdtee_driver_init(void)
 	kfree(drv_data);
 	drv_data = NULL;
 
-	pr_err("amd-tee driver initialization failed\n");
+	pr_err("initialization failed\n");
 	return rc;
 }
 module_init(amdtee_driver_init);
-- 
2.43.0


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

* [PATCH 2/2] tee: Sort header includes
  2025-04-21 15:22 [PATCH 0/2] small amdtee cleanups Mario Limonciello
  2025-04-21 15:22 ` [PATCH 1/2] tee: Use pr_fmt for messages Mario Limonciello
@ 2025-04-21 15:22 ` Mario Limonciello
  2025-04-28  7:45   ` Sumit Garg
  2025-04-28 14:27 ` [PATCH 0/2] small amdtee cleanups Jens Wiklander
  2 siblings, 1 reply; 6+ messages in thread
From: Mario Limonciello @ 2025-04-21 15:22 UTC (permalink / raw)
  To: op-tee

[-- Attachment #1: Type: text/plain, Size: 1163 bytes --]

From: Mario Limonciello <mario.limonciello@amd.com>

Various headers have been added over time that are not added alphabetically
and a private header is used before one of the linux/ headers.

Resort the list.

Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
---
 drivers/tee/amdtee/core.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/tee/amdtee/core.c b/drivers/tee/amdtee/core.c
index a44625d076401..fb39d9a19c698 100644
--- a/drivers/tee/amdtee/core.c
+++ b/drivers/tee/amdtee/core.c
@@ -6,18 +6,19 @@
  #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
 
 #include <linux/errno.h>
+#include <linux/device.h>
+#include <linux/firmware.h>
 #include <linux/io.h>
+#include <linux/mm.h>
 #include <linux/module.h>
+#include <linux/psp-tee.h>
 #include <linux/slab.h>
 #include <linux/string.h>
-#include <linux/device.h>
 #include <linux/tee_core.h>
 #include <linux/types.h>
-#include <linux/mm.h>
 #include <linux/uaccess.h>
-#include <linux/firmware.h>
+
 #include "amdtee_private.h"
-#include <linux/psp-tee.h>
 
 static struct amdtee_driver_data *drv_data;
 static DEFINE_MUTEX(session_list_mutex);
-- 
2.43.0


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

* Re: [PATCH 1/2] tee: Use pr_fmt for messages
  2025-04-21 15:22 ` [PATCH 1/2] tee: Use pr_fmt for messages Mario Limonciello
@ 2025-04-28  7:45   ` Sumit Garg
  0 siblings, 0 replies; 6+ messages in thread
From: Sumit Garg @ 2025-04-28  7:45 UTC (permalink / raw)
  To: op-tee

[-- Attachment #1: Type: text/plain, Size: 1765 bytes --]

On Mon, Apr 21, 2025 at 10:22:22AM -0500, Mario Limonciello via OP-TEE wrote:
> From: Mario Limonciello <mario.limonciello@amd.com>
> 
> amd-tee inconsistently uses the word amd-tee in error messages.
> 
> Add a `pr_fmt()` define and remove the hardcoded use of amd-tee.
> Also, remove the unnecessary driver init successful message because
> there will be a message if failed and a user can assume it was successful
> otherwise.
> 
> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
> ---
>  drivers/tee/amdtee/core.c | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
>

Reviewed-by: Sumit Garg <sumit.garg@oss.qualcomm.com>

-Sumit

> diff --git a/drivers/tee/amdtee/core.c b/drivers/tee/amdtee/core.c
> index e487231d25dc0..a44625d076401 100644
> --- a/drivers/tee/amdtee/core.c
> +++ b/drivers/tee/amdtee/core.c
> @@ -3,6 +3,8 @@
>   * Copyright 2019 Advanced Micro Devices, Inc.
>   */
>  
> + #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
> +
>  #include <linux/errno.h>
>  #include <linux/io.h>
>  #include <linux/module.h>
> @@ -458,7 +460,7 @@ static int __init amdtee_driver_init(void)
>  
>  	rc = psp_check_tee_status();
>  	if (rc) {
> -		pr_err("amd-tee driver: tee not present\n");
> +		pr_err("tee not present\n");
>  		return rc;
>  	}
>  
> @@ -494,7 +496,6 @@ static int __init amdtee_driver_init(void)
>  
>  	drv_data->amdtee = amdtee;
>  
> -	pr_info("amd-tee driver initialization successful\n");
>  	return 0;
>  
>  err_device_unregister:
> @@ -510,7 +511,7 @@ static int __init amdtee_driver_init(void)
>  	kfree(drv_data);
>  	drv_data = NULL;
>  
> -	pr_err("amd-tee driver initialization failed\n");
> +	pr_err("initialization failed\n");
>  	return rc;
>  }
>  module_init(amdtee_driver_init);
> -- 
> 2.43.0
> 

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

* Re: [PATCH 2/2] tee: Sort header includes
  2025-04-21 15:22 ` [PATCH 2/2] tee: Sort header includes Mario Limonciello
@ 2025-04-28  7:45   ` Sumit Garg
  0 siblings, 0 replies; 6+ messages in thread
From: Sumit Garg @ 2025-04-28  7:45 UTC (permalink / raw)
  To: op-tee

[-- Attachment #1: Type: text/plain, Size: 1391 bytes --]

On Mon, Apr 21, 2025 at 10:22:23AM -0500, Mario Limonciello via OP-TEE wrote:
> From: Mario Limonciello <mario.limonciello@amd.com>
> 
> Various headers have been added over time that are not added alphabetically
> and a private header is used before one of the linux/ headers.
> 
> Resort the list.
> 
> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
> ---
>  drivers/tee/amdtee/core.c | 9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)

Reviewed-by: Sumit Garg <sumit.garg@oss.qualcomm.com>

-Sumit

> 
> diff --git a/drivers/tee/amdtee/core.c b/drivers/tee/amdtee/core.c
> index a44625d076401..fb39d9a19c698 100644
> --- a/drivers/tee/amdtee/core.c
> +++ b/drivers/tee/amdtee/core.c
> @@ -6,18 +6,19 @@
>   #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
>  
>  #include <linux/errno.h>
> +#include <linux/device.h>
> +#include <linux/firmware.h>
>  #include <linux/io.h>
> +#include <linux/mm.h>
>  #include <linux/module.h>
> +#include <linux/psp-tee.h>
>  #include <linux/slab.h>
>  #include <linux/string.h>
> -#include <linux/device.h>
>  #include <linux/tee_core.h>
>  #include <linux/types.h>
> -#include <linux/mm.h>
>  #include <linux/uaccess.h>
> -#include <linux/firmware.h>
> +
>  #include "amdtee_private.h"
> -#include <linux/psp-tee.h>
>  
>  static struct amdtee_driver_data *drv_data;
>  static DEFINE_MUTEX(session_list_mutex);
> -- 
> 2.43.0
> 

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

* Re: [PATCH 0/2] small amdtee cleanups
  2025-04-21 15:22 [PATCH 0/2] small amdtee cleanups Mario Limonciello
  2025-04-21 15:22 ` [PATCH 1/2] tee: Use pr_fmt for messages Mario Limonciello
  2025-04-21 15:22 ` [PATCH 2/2] tee: Sort header includes Mario Limonciello
@ 2025-04-28 14:27 ` Jens Wiklander
  2 siblings, 0 replies; 6+ messages in thread
From: Jens Wiklander @ 2025-04-28 14:27 UTC (permalink / raw)
  To: op-tee

[-- Attachment #1: Type: text/plain, Size: 700 bytes --]

Hi,

On Mon, Apr 21, 2025 at 5:22 PM Mario Limonciello <superm1@kernel.org> wrote:
>
> From: Mario Limonciello <mario.limonciello@amd.com>
>
> I just noticed a few small things for amdtee where the error messages
> didn't consistently use the driver name.  While fixing that I noticed
> the headers weren't sorted.
>
> These patches fix both issues.
>
> Mario Limonciello (2):
>   tee: Use pr_fmt for messages
>   tee: Sort header includes
>
>  drivers/tee/amdtee/core.c | 16 +++++++++-------
>  1 file changed, 9 insertions(+), 7 deletions(-)

I'm trying to build this, but I run into some selinux build error. How
did you build this?

Cheers,
Jens

>
> --
> 2.43.0
>

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

end of thread, other threads:[~2025-04-28 14:27 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-21 15:22 [PATCH 0/2] small amdtee cleanups Mario Limonciello
2025-04-21 15:22 ` [PATCH 1/2] tee: Use pr_fmt for messages Mario Limonciello
2025-04-28  7:45   ` Sumit Garg
2025-04-21 15:22 ` [PATCH 2/2] tee: Sort header includes Mario Limonciello
2025-04-28  7:45   ` Sumit Garg
2025-04-28 14:27 ` [PATCH 0/2] small amdtee cleanups Jens Wiklander

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox