[PATCH] KEYS: Remove the ad-hoc compilation flag CAAM_DEBUG

Ye Bin yebin at huaweicloud.com
Tue Oct 28 13:22:54 UTC 2025


From: Ye Bin <yebin10 at huawei.com>

Fix the broken design based on Jarkko Sakkinen's suggestions as follows:

1. Remove the ad-hoc compilation flag (i.e., CAAM_DEBUG).
2. Substitute pr_info calls with pr_debug calls.

Closes: https://patchwork.kernel.org/project/linux-integrity/patch/20251024061153.61470-1-yebin@huaweicloud.com/
Signed-off-by: Ye Bin <yebin10 at huawei.com>
---
 security/keys/trusted-keys/trusted_caam.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/security/keys/trusted-keys/trusted_caam.c b/security/keys/trusted-keys/trusted_caam.c
index 601943ce0d60..c903ee7328ca 100644
--- a/security/keys/trusted-keys/trusted_caam.c
+++ b/security/keys/trusted-keys/trusted_caam.c
@@ -28,16 +28,10 @@ static const match_table_t key_tokens = {
 	{opt_err, NULL}
 };
 
-#ifdef CAAM_DEBUG
 static inline void dump_options(const struct caam_pkey_info *pkey_info)
 {
-	pr_info("key encryption algo %d\n", pkey_info->key_enc_algo);
+	pr_debug("key encryption algo %d\n", pkey_info->key_enc_algo);
 }
-#else
-static inline void dump_options(const struct caam_pkey_info *pkey_info)
-{
-}
-#endif
 
 static int get_pkey_options(char *c,
 			    struct caam_pkey_info *pkey_info)
-- 
2.34.1




More information about the Linux-security-module-archive mailing list