diff options
| author | Hongbo Li <[email protected]> | 2024-09-02 13:14:07 +0000 |
|---|---|---|
| committer | Tony Nguyen <[email protected]> | 2024-10-08 21:37:15 +0000 |
| commit | 8d873ccd8a0703587f743f9e9e474f48094b98d1 (patch) | |
| tree | f406b75f2f40f4a06d61914dab13c25f5274b382 | |
| parent | ice: store max_frame and rx_buf_len only in ice_rx_ring (diff) | |
| download | kernel-8d873ccd8a0703587f743f9e9e474f48094b98d1.tar.gz kernel-8d873ccd8a0703587f743f9e9e474f48094b98d1.zip | |
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 <[email protected]>
Reviewed-by: Gerhard Engleder <[email protected]>
Tested-by: George Kuruvinakunnel <[email protected]>
Reviewed-by: Jacob Keller <[email protected]>
Signed-off-by: Tony Nguyen <[email protected]>
| -rw-r--r-- | drivers/net/ethernet/intel/ice/ice_main.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c index 9f6e8a5508a2..255ae9325c69 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) |
