Intel-Wired-Lan Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Jacob Keller <jacob.e.keller@intel.com>
To: Hongbo Li <lihongbo22@huawei.com>, <anthony.l.nguyen@intel.com>
Cc: przemyslaw.kitszel@intel.com, edumazet@google.com,
	intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org,
	kuba@kernel.org, pabeni@redhat.com, davem@davemloft.net
Subject: Re: [Intel-wired-lan] [PATCH net-next] ice: Make use of assign_bit() API
Date: Tue, 17 Sep 2024 15:22:19 -0700	[thread overview]
Message-ID: <bc8f8703-2917-4da0-8df8-e361213c0781@intel.com> (raw)
In-Reply-To: <20240902131407.3087903-1-lihongbo22@huawei.com>



On 9/2/2024 6:14 AM, Hongbo Li wrote:
> 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)

Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>

      parent reply	other threads:[~2024-09-17 22:22 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bc8f8703-2917-4da0-8df8-e361213c0781@intel.com \
    --to=jacob.e.keller@intel.com \
    --cc=anthony.l.nguyen@intel.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=kuba@kernel.org \
    --cc=lihongbo22@huawei.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=przemyslaw.kitszel@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox