Intel-Wired-Lan Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-wired-lan] [PATCH net-next] ice: Make use of assign_bit() API
@ 2024-09-02 13:14 Hongbo Li
  2024-09-04 19:07 ` Gerhard Engleder
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Hongbo Li @ 2024-09-02 13:14 UTC (permalink / raw)
  To: anthony.l.nguyen
  Cc: przemyslaw.kitszel, edumazet, intel-wired-lan, lihongbo22, netdev,
	kuba, pabeni, davem

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>
---
 drivers/net/ethernet/intel/ice/ice_main.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c
index 46d3c5a34d6a..e3ad91b3ba77 100644
--- a/drivers/net/ethernet/intel/ice/ice_main.c
+++ b/drivers/net/ethernet/intel/ice/ice_main.c
@@ -6522,8 +6522,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)
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-09-17 22:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-02 13:14 [Intel-wired-lan] [PATCH net-next] ice: Make use of assign_bit() API Hongbo Li
2024-09-04 19:07 ` Gerhard Engleder
2024-09-17 19:10 ` Kuruvinakunnel, George
2024-09-17 22:22 ` Jacob Keller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox