]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
amdtee: Use pr_fmt for messages
authorMario Limonciello <mario.limonciello@amd.com>
Mon, 21 Apr 2025 15:22:22 +0000 (10:22 -0500)
committerJens Wiklander <jens.wiklander@linaro.org>
Tue, 29 Apr 2025 08:57:40 +0000 (10:57 +0200)
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>
Reviewed-by: Sumit Garg <sumit.garg@oss.qualcomm.com>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
drivers/tee/amdtee/core.c

index e487231d25dc0129bd08e007f169f1ce1c79c3a2..a44625d0764016e590c6030bfc1c145b548c56c2 100644 (file)
@@ -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 @@ err_kfree_drv_data:
        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);