include/linux/bitops.h: introduce BITS_PER_TYPE
authorChris Wilson <[email protected]>
Wed, 22 Aug 2018 04:57:03 +0000 (21:57 -0700)
committerLinus Torvalds <[email protected]>
Wed, 22 Aug 2018 17:52:48 +0000 (10:52 -0700)
commit9144d75e22cad3c89e6b2ccab551db9ee28d250a
treeb0fe7660f14d1d4630c2be77d55c373abc4aa77c
parentccf7a6d457a8bd618c77468c38842b3f9d82cef4
include/linux/bitops.h: introduce BITS_PER_TYPE

net_dim.h has a rather useful extension to BITS_PER_BYTE to compute the
number of bits in a type (BITS_PER_BYTE * sizeof(T)), so promote the macro
to bitops.h, alongside BITS_PER_BYTE, for wider usage.

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Chris Wilson <[email protected]>
Reviewed-by: Jani Nikula <[email protected]>
Cc: Randy Dunlap <[email protected]>
Cc: Andy Gospodarek <[email protected]>
Cc: David S. Miller <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: Ingo Molnar <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
include/linux/bitops.h
include/linux/net_dim.h