]> 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)
commit75f07e07e0a6d19e8b92dc4f2d5befece5bec560
tree20ac863511be63d9298c68c50a05e949e980161d
parent3097cfe865468883e1531b91d6972bf62275d231
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: 53f080c213e4 ("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