[PATCH] crypto: aspeed - fix debug Kconfig guard in aspeed-hace-crypto.c

Pengpeng Hou hppiscas at 163.com
Thu Dec 3 18:12:45 PST 2026


The Aspeed cipher debug macro tests an option that does not exist. The
driver-wide CRYPTO_DEV_ASPEED_DEBUG option controls the corresponding
diagnostics elsewhere in HACE.

Use that option here too. This changes the diagnostic path, not the
cipher implementation.

The issue was found by our static-analysis tool and manually reviewed.

Fixes: 62f58b1637b7 ("crypto: aspeed - add HACE crypto driver")
Signed-off-by: Pengpeng Hou <hppiscas at 163.com>
---
The original patch was prepared with Gemini. Codex assisted with this
review and revision (Assisted-by: gpt 5).
Built aspeed-hace-crypto.o on x86-64 with GCC 11.4 and W=1
(CONFIG_CRYPTO_DEV_ASPEED=m, CONFIG_CRYPTO_DEV_ASPEED_DEBUG=y,
CONFIG_CRYPTO_DEV_ASPEED_HACE_CRYPTO=y). No runtime or hardware test was
performed.

 drivers/crypto/aspeed/aspeed-hace-crypto.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/crypto/aspeed/aspeed-hace-crypto.c b/drivers/crypto/aspeed/aspeed-hace-crypto.c
index e7d3f611df05cbe3a8ed12f68f4f8e0ce0437b58..f73a46d36a760672ab38cea9dcaad6b3a9e966c3 100644
--- a/drivers/crypto/aspeed/aspeed-hace-crypto.c
+++ b/drivers/crypto/aspeed/aspeed-hace-crypto.c
@@ -16,7 +16,7 @@
 #include <linux/scatterlist.h>
 #include <linux/string.h>
 
-#ifdef CONFIG_CRYPTO_DEV_ASPEED_HACE_CRYPTO_DEBUG
+#ifdef CONFIG_CRYPTO_DEV_ASPEED_DEBUG
 #define CIPHER_DBG(h, fmt, ...)	\
 	dev_info((h)->dev, "%s() " fmt, __func__, ##__VA_ARGS__)
 #else

base-commit: d06ce6f1eb5eeffd4ebcfde345dc34a98131d106




More information about the linux-arm-kernel mailing list