]> git.baikalelectronics.ru Git - kernel.git/commit
crypto: cavium/nitrox - don't cast parameter in bit operations
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Wed, 23 Feb 2022 16:26:20 +0000 (18:26 +0200)
committerHerbert Xu <herbert@gondor.apana.org.au>
Wed, 2 Mar 2022 22:49:21 +0000 (10:49 +1200)
commit9e4b6d7470a920fa04c8718e67c61844b7e87023
tree16fc2e094150d43001ae21cc91a18a515b45e48c
parentfcb632e3986ffb86b3e36034aab7ef54dc055a2a
crypto: cavium/nitrox - 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: b7ed7a91e20d ("crypto: cavium/nitrox - Enabled Mailbox support")
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/cavium/nitrox/nitrox_mbx.c