From: Tony Nguyen <anthony.l.nguyen@intel.com>
To: davem@davemloft.net, kuba@kernel.org
Cc: Jesse Brandeburg <jesse.brandeburg@intel.com>,
netdev@vger.kernel.org, nhorman@redhat.com, sassmann@redhat.com,
anthony.l.nguyen@intel.com, Aaron Brown <aaron.f.brown@intel.com>
Subject: [net-next 3/3] e1000: remove unused and incorrect code
Date: Wed, 7 Oct 2020 16:10:50 -0700 [thread overview]
Message-ID: <20201007231050.1438704-4-anthony.l.nguyen@intel.com> (raw)
In-Reply-To: <20201007231050.1438704-1-anthony.l.nguyen@intel.com>
From: Jesse Brandeburg <jesse.brandeburg@intel.com>
The e1000_clear_vfta function was triggering a warning in kbuild-bot
testing. It's actually a bug but has no functional impact.
drivers/net/ethernet/intel/e1000/e1000_hw.c:4415:58: warning: Same expression in both branches of ternary operator. [duplicateExpressionTernary]
Fix this warning by removing the offending code and simplifying
the routine to do exactly what it did before, no functional
change.
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
drivers/net/ethernet/intel/e1000/e1000_hw.c | 10 +---------
1 file changed, 1 insertion(+), 9 deletions(-)
diff --git a/drivers/net/ethernet/intel/e1000/e1000_hw.c b/drivers/net/ethernet/intel/e1000/e1000_hw.c
index fb5af23880c3..4c0c9433bd60 100644
--- a/drivers/net/ethernet/intel/e1000/e1000_hw.c
+++ b/drivers/net/ethernet/intel/e1000/e1000_hw.c
@@ -4401,17 +4401,9 @@ void e1000_write_vfta(struct e1000_hw *hw, u32 offset, u32 value)
static void e1000_clear_vfta(struct e1000_hw *hw)
{
u32 offset;
- u32 vfta_value = 0;
- u32 vfta_offset = 0;
- u32 vfta_bit_in_reg = 0;
for (offset = 0; offset < E1000_VLAN_FILTER_TBL_SIZE; offset++) {
- /* If the offset we want to clear is the same offset of the
- * manageability VLAN ID, then clear all bits except that of the
- * manageability unit
- */
- vfta_value = (offset == vfta_offset) ? vfta_bit_in_reg : 0;
- E1000_WRITE_REG_ARRAY(hw, VFTA, offset, vfta_value);
+ E1000_WRITE_REG_ARRAY(hw, VFTA, offset, 0);
E1000_WRITE_FLUSH();
}
}
--
2.26.2
next prev parent reply other threads:[~2020-10-07 23:11 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-07 23:10 [net-next 0/3][pull request] 40GbE Intel Wired LAN Driver Updates 2020-10-07 Tony Nguyen
2020-10-07 23:10 ` [net-next 1/3] i40e: Allow changing FEC settings on X722 if supported by FW Tony Nguyen
2020-10-09 17:55 ` Willem de Bruijn
2020-10-09 23:36 ` Jakub Kicinski
2020-10-12 16:31 ` Nguyen, Anthony L
2020-10-07 23:10 ` [net-next 2/3] i40e: Fix MAC address setting for a VF via Host/VM Tony Nguyen
2020-10-09 17:46 ` Willem de Bruijn
2020-10-12 16:27 ` Nguyen, Anthony L
2020-10-16 10:46 ` Loktionov, Aleksandr
2020-10-16 16:23 ` Willem de Bruijn
2020-10-07 23:10 ` Tony Nguyen [this message]
2020-10-09 17:44 ` [net-next 3/3] e1000: remove unused and incorrect code Willem de Bruijn
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=20201007231050.1438704-4-anthony.l.nguyen@intel.com \
--to=anthony.l.nguyen@intel.com \
--cc=aaron.f.brown@intel.com \
--cc=davem@davemloft.net \
--cc=jesse.brandeburg@intel.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=nhorman@redhat.com \
--cc=sassmann@redhat.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;
as well as URLs for NNTP newsgroup(s).