mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-14 12:21:15 -04:00
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 <lihongbo22@huawei.com>
Reviewed-by: Gerhard Engleder <gerhard@engleder-embedded.com>
Tested-by: George Kuruvinakunnel <george.kuruvinakunnel@intel.com>
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user