bitfield.h: add FIELD_FIT() helper
authorJakub Kicinski <jakub.kicinski@netronome.com>
Thu, 9 Feb 2017 17:17:27 +0000 (09:17 -0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 10 Feb 2017 20:52:24 +0000 (15:52 -0500)
commit1697599ee301a52cded6499a09bd609f7f63fd06
treeb527e775e84e39aba8e6df205765ec441925e303
parent4f2bd6b35b345523ac99b14ce9a1f4a98f21ebdb
bitfield.h: add FIELD_FIT() helper

Add a helper for checking at runtime that a value will fit inside
a specified field/mask.

Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/netronome/nfp/nfp_bpf.h
include/linux/bitfield.h