]> git.baikalelectronics.ru Git - kernel.git/commit
crypto: qat - don't cast parameter in bit operations
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Wed, 9 Feb 2022 18:00:47 +0000 (20:00 +0200)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 18 Feb 2022 05:21:08 +0000 (16:21 +1100)
commit2fc45ef06c1b55f2473c68424417311db61187d9
tree20ac863511be63d9298c68c50a05e949e980161d
parent4271b1403657e261c7a19c3a077a9d1446c5d009
crypto: qat - don't cast parameter in bit operations

While in this particular case it would not be a (critical) issue,
the pattern itself is bad and error prone in case the location
of the parameter is changed.

Don't cast parameter to unsigned long pointer in the bit operations.
Instead copy to a local variable on stack of a proper type and use.

Fixes: 9455e8d3ebd1 ("crypto: qat - Intel(R) QAT ucode part of fw loader")
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/qat/qat_common/qat_uclo.c