Intel-Wired-Lan Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Ahmed Zaki <ahmed.zaki@intel.com>
To: Alexey Kodanev <aleksei.kodanev@bell-sw.com>,
	<intel-wired-lan@lists.osuosl.org>
Subject: Re: [Intel-wired-lan] [PATCH iwl-next 1/2] iavf: drop duplicate iavf_{add|del}_cloud_filter() calls
Date: Mon, 26 Feb 2024 15:30:52 -0700	[thread overview]
Message-ID: <4b9d1ce8-c202-4afc-9dcf-ac74a30463d4@intel.com> (raw)
In-Reply-To: <20240226132103.69122-1-aleksei.kodanev@bell-sw.com>



On 2024-02-26 6:21 a.m., Alexey Kodanev wrote:
> There are currently two pairs of identical checks and calls
> to iavf_{add|del}_cloud_filter().
> 
> Detected using the static analysis tool - Svace.
> 
> Signed-off-by: Alexey Kodanev <aleksei.kodanev@bell-sw.com>
> ---
>   drivers/net/ethernet/intel/iavf/iavf_main.c | 9 ---------
>   1 file changed, 9 deletions(-)
> 
> diff --git a/drivers/net/ethernet/intel/iavf/iavf_main.c b/drivers/net/ethernet/intel/iavf/iavf_main.c
> index 335fd13e86f7..5097efa2e1cd 100644
> --- a/drivers/net/ethernet/intel/iavf/iavf_main.c
> +++ b/drivers/net/ethernet/intel/iavf/iavf_main.c
> @@ -2170,19 +2170,10 @@ static int iavf_process_aq_command(struct iavf_adapter *adapter)
>   		iavf_add_cloud_filter(adapter);
>   		return 0;
>   	}
> -
> -	if (adapter->aq_required & IAVF_FLAG_AQ_DEL_CLOUD_FILTER) {
> -		iavf_del_cloud_filter(adapter);
> -		return 0;
> -	}
>   	if (adapter->aq_required & IAVF_FLAG_AQ_DEL_CLOUD_FILTER) {
>   		iavf_del_cloud_filter(adapter);
>   		return 0;
>   	}
> -	if (adapter->aq_required & IAVF_FLAG_AQ_ADD_CLOUD_FILTER) {
> -		iavf_add_cloud_filter(adapter);
> -		return 0;
> -	}
>   	if (adapter->aq_required & IAVF_FLAG_AQ_ADD_FDIR_FILTER) {
>   		iavf_add_fdir_filter(adapter);
>   		return IAVF_SUCCESS;

Thanks.

Reviewed-by: Ahmed Zaki <ahmed.zaki@intel.com>

      parent reply	other threads:[~2024-02-26 22:38 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-26 13:21 [Intel-wired-lan] [PATCH iwl-next 1/2] iavf: drop duplicate iavf_{add|del}_cloud_filter() calls Alexey Kodanev
2024-02-26 13:21 ` [Intel-wired-lan] [PATCH iwl-next 2/2] i40e: remove unnecessary qv_info ptr NULL checks Alexey Kodanev
2024-03-04  8:46   ` Pucha, HimasekharX Reddy
2024-02-26 22:30 ` Ahmed Zaki [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=4b9d1ce8-c202-4afc-9dcf-ac74a30463d4@intel.com \
    --to=ahmed.zaki@intel.com \
    --cc=aleksei.kodanev@bell-sw.com \
    --cc=intel-wired-lan@lists.osuosl.org \
    /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