OSDN Git Service

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)
commitfffe799b6cc980f967df2f3773dc53639dd68d7e
tree20ac863511be63d9298c68c50a05e949e980161d
parent4ba31cdd88c9008777a48d3ac2b045dce5634389
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: b4b7e67c917f ("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