All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: intel-wired-lan@osuosl.org
Subject: [Intel-wired-lan] [PATCH] ice: remove an unneeded NULL check
Date: Fri, 12 Oct 2018 10:17:09 +0300	[thread overview]
Message-ID: <20181012071709.GA10212@mwanda> (raw)

We added a NULL check in commit 072f0c3db9da ("ice: Fix potential null
pointer issues") but it causes static checker warnings.

    drivers/net/ethernet/intel/ice/ice_switch.c:2145 ice_add_to_vsi_fltr_list()
    warn: address of 'fm_entry->fltr_info' is non-NULL

We can just remove it.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/net/ethernet/intel/ice/ice_switch.c b/drivers/net/ethernet/intel/ice/ice_switch.c
index 33403f39f1b3..a9ef19da6e61 100644
--- a/drivers/net/ethernet/intel/ice/ice_switch.c
+++ b/drivers/net/ethernet/intel/ice/ice_switch.c
@@ -2142,7 +2142,7 @@ ice_add_to_vsi_fltr_list(struct ice_hw *hw, u16 vsi_handle,
 		struct ice_fltr_info *fi;
 
 		fi = &fm_entry->fltr_info;
-		if (!fi || !ice_vsi_uses_fltr(fm_entry, vsi_handle))
+		if (!ice_vsi_uses_fltr(fm_entry, vsi_handle))
 			continue;
 
 		status = ice_add_entry_to_vsi_fltr_list(hw, vsi_handle,

WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <dan.carpenter@oracle.com>
To: kernel-janitors@vger.kernel.org
Subject: [PATCH] ice: remove an unneeded NULL check
Date: Fri, 12 Oct 2018 07:17:09 +0000	[thread overview]
Message-ID: <20181012071709.GA10212@mwanda> (raw)

We added a NULL check in commit 072f0c3db9da ("ice: Fix potential null
pointer issues") but it causes static checker warnings.

    drivers/net/ethernet/intel/ice/ice_switch.c:2145 ice_add_to_vsi_fltr_list()
    warn: address of 'fm_entry->fltr_info' is non-NULL

We can just remove it.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/net/ethernet/intel/ice/ice_switch.c b/drivers/net/ethernet/intel/ice/ice_switch.c
index 33403f39f1b3..a9ef19da6e61 100644
--- a/drivers/net/ethernet/intel/ice/ice_switch.c
+++ b/drivers/net/ethernet/intel/ice/ice_switch.c
@@ -2142,7 +2142,7 @@ ice_add_to_vsi_fltr_list(struct ice_hw *hw, u16 vsi_handle,
 		struct ice_fltr_info *fi;
 
 		fi = &fm_entry->fltr_info;
-		if (!fi || !ice_vsi_uses_fltr(fm_entry, vsi_handle))
+		if (!ice_vsi_uses_fltr(fm_entry, vsi_handle))
 			continue;
 
 		status = ice_add_entry_to_vsi_fltr_list(hw, vsi_handle,

             reply	other threads:[~2018-10-12  7:17 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-12  7:17 Dan Carpenter [this message]
2018-10-12  7:17 ` [PATCH] ice: remove an unneeded NULL check Dan Carpenter
2018-10-15 16:18 ` [Intel-wired-lan] " Allan, Bruce W
2018-10-15 16:18   ` Allan, Bruce W
2018-10-16 10:59   ` Dan Carpenter
2018-10-16 10:59     ` Dan Carpenter
2018-10-17 14:04     ` David Arcari
2018-10-17 14:04       ` David Arcari
2018-10-15 21:17 ` Bowers, AndrewX

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=20181012071709.GA10212@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=intel-wired-lan@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.