mirror of
https://github.com/torvalds/linux.git
synced 2024-11-16 17:12:06 +00:00
cfd6fb45cf
clang points out inconsistencies in the FIELD_PREP() invocation in
this driver that result from the 'mask' being a 32-bit value:
drivers/crypto/ccree/cc_driver.c:117:18: error: result of comparison of constant 18446744073709551615 with expression of type 'u32' (aka 'unsigned int') is always false [-Werror,-Wtautological-constant-out-of-range-compare]
cache_params |= FIELD_PREP(mask, val);
^~~~~~~~~~~~~~~~~~~~~
include/linux/bitfield.h:94:3: note: expanded from macro 'FIELD_PREP'
__BF_FIELD_CHECK(_mask, 0ULL, _val, "FIELD_PREP: "); \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/bitfield.h:52:28: note: expanded from macro '__BF_FIELD_CHECK'
BUILD_BUG_ON_MSG((_mask) > (typeof(_reg))~0ull, \
~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This does not happen in other places that just pass a constant here.
Work around the warnings by widening the type of the temporary variable.
Fixes:
|
||
---|---|---|
.. | ||
cc_aead.c | ||
cc_aead.h | ||
cc_buffer_mgr.c | ||
cc_buffer_mgr.h | ||
cc_cipher.c | ||
cc_cipher.h | ||
cc_crypto_ctx.h | ||
cc_debugfs.c | ||
cc_debugfs.h | ||
cc_driver.c | ||
cc_driver.h | ||
cc_fips.c | ||
cc_fips.h | ||
cc_hash.c | ||
cc_hash.h | ||
cc_host_regs.h | ||
cc_hw_queue_defs.h | ||
cc_kernel_regs.h | ||
cc_lli_defs.h | ||
cc_pm.c | ||
cc_pm.h | ||
cc_request_mgr.c | ||
cc_request_mgr.h | ||
cc_sram_mgr.c | ||
cc_sram_mgr.h | ||
Makefile |