diff options
author | Jakub Kicinski <[email protected]> | 2022-03-21 11:42:00 +0100 |
---|---|---|
committer | David S. Miller <[email protected]> | 2022-03-21 13:21:16 +0000 |
commit | fc9769f62e5937b496139b07e9e9656896479018 (patch) | |
tree | a17f96acf1874e6922eb4df161d5add169fb2de8 /net/lapb/lapb_subr.c | |
parent | 4b45e07907d87d0e218d9c4a125cdf1d9ea9b1c3 (diff) |
nfp: calculate ring masks without conditionals
Ring enable masks are 64bit long. Replace mask calculation from:
block_cnt == 64 ? 0xffffffffffffffffULL : (1 << block_cnt) - 1
with:
(U64_MAX >> (64 - block_cnt))
to simplify the code.
Signed-off-by: Jakub Kicinski <[email protected]>
Signed-off-by: Fei Qin <[email protected]>
Signed-off-by: Simon Horman <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'net/lapb/lapb_subr.c')
0 files changed, 0 insertions, 0 deletions