From: Gaurav Kashyap Date: Wed, 29 Oct 2025 08:25:31 +0000 (-0700) Subject: crypto: qce - fix version check X-Git-Tag: v6.19-rc1~185^2~35 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=457be301fc6f8731c825b19b9be55a8d72c624b8;p=thirdparty%2Fkernel%2Flinux.git crypto: qce - fix version check The previous version check made it difficult to support newer major versions (e.g., v6.0) without adding extra checks/macros. Update the logic to only reject v5.0 and allow future versions without additional changes. Signed-off-by: Gaurav Kashyap Signed-off-by: Jingyi Wang Reviewed-by: Bjorn Andersson Signed-off-by: Herbert Xu --- diff --git a/drivers/crypto/qce/core.c b/drivers/crypto/qce/core.c index e95e84486d9ae..b966f3365b7de 100644 --- a/drivers/crypto/qce/core.c +++ b/drivers/crypto/qce/core.c @@ -21,7 +21,6 @@ #include "sha.h" #include "aead.h" -#define QCE_MAJOR_VERSION5 0x05 #define QCE_QUEUE_LENGTH 1 #define QCE_DEFAULT_MEM_BANDWIDTH 393600 @@ -161,7 +160,7 @@ static int qce_check_version(struct qce_device *qce) * the driver does not support v5 with minor 0 because it has special * alignment requirements. */ - if (major != QCE_MAJOR_VERSION5 || minor == 0) + if (major == 5 && minor == 0) return -ENODEV; qce->burst_size = QCE_BAM_BURST_SIZE;