summaryrefslogtreecommitdiff
path: root/crypto
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2023-01-18 14:26:53 +0100
committerJohannes Berg <johannes.berg@intel.com>2023-01-19 14:46:25 +0100
commite2192de59e457aef8d1f055a452131f0b3e5d097 (patch)
treea7d47bf68cbc47043c0d80d259550c0ba2d7d8ba /crypto
parent41ade47c1273ca0e61c36f2cccad37473f0b2422 (diff)
bitfield: add FIELD_PREP_CONST()
Neither FIELD_PREP() nor *_encode_bits() can be used in constant contexts (such as initializers), but we don't want to define shift constants for all masks just for use in initializers, and having checks that the values fit is also useful. Therefore, add FIELD_PREP_CONST() which is a smaller version of FIELD_PREP() that can only take constant arguments and has less friendly (but not less strict) error checks, and expands to a constant value. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Link: https://lore.kernel.org/r/20230118142652.53f20593504b.Iaeea0aee77a6493d70e573b4aa55c91c00e01e4b@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'crypto')
0 files changed, 0 insertions, 0 deletions