linux/drivers/crypto/ccree
Arnd Bergmann cfd6fb45cf crypto: ccree - avoid out-of-range warnings from clang
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: 05c2a70591 ("crypto: ccree - rework cache parameters handling")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Gilad ben-Yossef <gilad@benyossef.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2021-10-08 20:02:37 +08:00
..
cc_aead.c mm, treewide: rename kzfree() to kfree_sensitive() 2020-08-07 11:33:22 -07:00
cc_aead.h crypto: ccree - refactor AEAD IV in AAD handling 2020-03-12 23:00:16 +11:00
cc_buffer_mgr.c mm, treewide: rename kzfree() to kfree_sensitive() 2020-08-07 11:33:22 -07:00
cc_buffer_mgr.h crypto: ccree - use u32 for SRAM addresses 2020-02-22 09:25:44 +08:00
cc_cipher.c crypto: ccree - fix spelling typo of allocated 2021-02-05 14:31:35 +11:00
cc_cipher.h crypto: ccree - copyright header update 2019-04-25 15:38:14 +08:00
cc_crypto_ctx.h crypto: ccree - remove bitlocker cipher 2020-08-21 14:45:28 +10:00
cc_debugfs.c crypto: ccree - constify struct debugfs_reg32 2020-05-15 16:15:00 +10:00
cc_debugfs.h crypto: ccree - copyright header update 2019-04-25 15:38:14 +08:00
cc_driver.c crypto: ccree - avoid out-of-range warnings from clang 2021-10-08 20:02:37 +08:00
cc_driver.h crypto: ccree - remove unused including <linux/version.h> 2021-01-03 08:41:35 +11:00
cc_fips.c crypto: ccree - fix typos in comments 2019-12-11 16:36:54 +08:00
cc_fips.h crypto: ccree - add function to handle cryptocell tee fips error 2019-04-25 15:38:16 +08:00
cc_hash.c mm, treewide: rename kzfree() to kfree_sensitive() 2020-08-07 11:33:22 -07:00
cc_hash.h crypto: ccree - improve kerneldoc in cc_hash.[ch] 2020-02-22 09:25:45 +08:00
cc_host_regs.h crypto: ccree - add HW engine config check 2019-06-27 14:28:00 +08:00
cc_hw_queue_defs.h crypto: ccree - update register handling macros 2020-03-12 23:00:16 +11:00
cc_kernel_regs.h crypto: ccree - copyright header update 2019-04-25 15:38:14 +08:00
cc_lli_defs.h crypto: ccree - allow more AEAD assoc data fragments 2019-04-25 15:38:15 +08:00
cc_pm.c crypto: ccree - rework cache parameters handling 2020-11-27 17:13:49 +11:00
cc_pm.h crypto: ccree - make cc_pm_{suspend,resume}() static 2020-02-22 09:25:44 +08:00
cc_request_mgr.c mm, treewide: rename kzfree() to kfree_sensitive() 2020-08-07 11:33:22 -07:00
cc_request_mgr.h crypto: ccree - improve kerneldoc in cc_request_mgr.[ch] 2020-02-22 09:25:46 +08:00
cc_sram_mgr.c crypto: ccree - improve kerneldoc in cc_sram_mgr.[ch] 2020-02-22 09:25:46 +08:00
cc_sram_mgr.h crypto: ccree - improve kerneldoc in cc_sram_mgr.[ch] 2020-02-22 09:25:46 +08:00
Makefile crypto: ccree - drop legacy ivgen support 2019-07-26 14:51:55 +10:00