net: wangxun: clean up the code
authorMengyuan Lou <mengyuanlou@net-swift.com>
Mon, 16 Jan 2023 10:38:39 +0000 (18:38 +0800)
committerJakub Kicinski <kuba@kernel.org>
Wed, 18 Jan 2023 03:29:59 +0000 (19:29 -0800)
commit860edff562e7e6d8af0ba89ca7b41506e56be430
treec657839ca766ebb8aec39cf6aea05fc9a5153224
parentf3a1e0c896e81f766d8677c8c07c1875ad14272b
net: wangxun: clean up the code

Convert various mult-bit fields to be defined using GENMASK/FIELD_PREP.
Simplify the code with the ternary operator.

Signed-off-by: Mengyuan Lou <mengyuanlou@net-swift.com>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Link: https://lore.kernel.org/r/20230116103839.84087-1-mengyuanlou@net-swift.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/wangxun/libwx/wx_hw.c
drivers/net/ethernet/wangxun/libwx/wx_type.h
drivers/net/ethernet/wangxun/ngbe/ngbe_hw.c
drivers/net/ethernet/wangxun/ngbe/ngbe_type.h