]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
crypto: qce - fix version check
authorGaurav Kashyap <gaurav.kashyap@oss.qualcomm.com>
Wed, 29 Oct 2025 08:25:31 +0000 (01:25 -0700)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 6 Nov 2025 06:31:08 +0000 (14:31 +0800)
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 <gaurav.kashyap@oss.qualcomm.com>
Signed-off-by: Jingyi Wang <jingyi.wang@oss.qualcomm.com>
Reviewed-by: Bjorn Andersson <andersson@kernel.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/qce/core.c

index e95e84486d9aefe4b9af09a27631f0f9e7ad231f..b966f3365b7de8d2a8f6707397a34aa4facdc4ac 100644 (file)
@@ -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;