]> git.ipfire.org Git - thirdparty/linux.git/commit
crypto: qat - fix type mismatch in RAS sysfs show functions
authorGiovanni Cabiddu <giovanni.cabiddu@intel.com>
Tue, 24 Mar 2026 18:17:23 +0000 (18:17 +0000)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 3 Apr 2026 00:56:11 +0000 (08:56 +0800)
commitec23d75c4b77ae42af0777ea59599b1d4f611371
tree4216cae089709807b32b78207f79327c14e22f64
parent795c24c677c7a1c12f5768daf22a874a2890662f
crypto: qat - fix type mismatch in RAS sysfs show functions

ADF_RAS_ERR_CTR_READ() expands to atomic_read(), which returns int.
The local variable 'counter' was declared as 'unsigned long', causing
a type mismatch on the assignment. The format specifier '%ld' was
consequently wrong in two ways: wrong length modifier and wrong
signedness.

Use int to match the return type of atomic_read() and update the
format specifier to '%d' accordingly.

Fixes: 532d7f6bc458 ("crypto: qat - add error counters")
Signed-off-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
Reviewed-by: Ahsan Atta <ahsan.atta@intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/intel/qat/qat_common/adf_sysfs_ras_counters.c