From: Hongbo Li Date: Mon, 2 Sep 2024 13:14:07 +0000 (+0800) Subject: ice: Make use of assign_bit() API X-Git-Tag: v6.13-rc1~135^2~364^2~7 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8d873ccd8a0703587f743f9e9e474f48094b98d1;p=thirdparty%2Fkernel%2Flinux.git ice: Make use of assign_bit() API We have for some time the assign_bit() API to replace open coded if (foo) set_bit(n, bar); else clear_bit(n, bar); Use this API to clean the code. No functional change intended. Signed-off-by: Hongbo Li Reviewed-by: Gerhard Engleder Tested-by: George Kuruvinakunnel Reviewed-by: Jacob Keller Signed-off-by: Tony Nguyen --- diff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c index 9f6e8a5508a22..255ae9325c692 100644 --- a/drivers/net/ethernet/intel/ice/ice_main.c +++ b/drivers/net/ethernet/intel/ice/ice_main.c @@ -6549,8 +6549,7 @@ ice_set_features(struct net_device *netdev, netdev_features_t features) if (changed & NETIF_F_HW_TC) { bool ena = !!(features & NETIF_F_HW_TC); - ena ? set_bit(ICE_FLAG_CLS_FLOWER, pf->flags) : - clear_bit(ICE_FLAG_CLS_FLOWER, pf->flags); + assign_bit(ICE_FLAG_CLS_FLOWER, pf->flags, ena); } if (changed & NETIF_F_LOOPBACK)