Skip to content
Commit b8c19d8c authored by Himanshu Jha's avatar Himanshu Jha Committed by Carles Cufí
Browse files

util: Add GENMASK helper macro definition



Macro is used to create contiguous bitmask between the
arguments passed to the macro.

BITS_PER_LONG is computed as the multiplication of predefined
macros `__CHAR_BIT__` and `__SIZEOF_LONG__`.

Both gcc and clang support these predefined macros.

With this change, replace the redundant defintions of
GENMASK with the new generic macro available.

Fixes #10843

Suggested-by: default avatarUlf Magnusson <Ulf.Magnusson@nordicsemi.no>
Signed-off-by: default avatarHimanshu Jha <himanshujha199640@gmail.com>
parent 2445ba7a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment