aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
diff options
context:
space:
mode:
authorJose Abreu <Jose.Abreu@synopsys.com>2019-11-11 15:42:34 +0100
committerDavid S. Miller <davem@davemloft.net>2019-11-11 23:13:19 -0800
commita24cae7012b59bfe1aed01fe3fc13d81b7b97b08 (patch)
tree76abcdbaa3702d703d4bc5866d7d41d726f10da1 /drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
parentcxgb4: remove redundant assignment to hdr_len (diff)
downloadlinux-dev-a24cae7012b59bfe1aed01fe3fc13d81b7b97b08.tar.xz
linux-dev-a24cae7012b59bfe1aed01fe3fc13d81b7b97b08.zip
net: stmmac: Fix sparse warning
The VID is converted to le16 so the variable must be __le16 type. Reported-by: kbuild test robot <lkp@intel.com> Fixes: c7ab0b8088d7 ("net: stmmac: Fallback to VLAN Perfect filtering if HASH is not available") Signed-off-by: Jose Abreu <Jose.Abreu@synopsys.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r--drivers/net/ethernet/stmicro/stmmac/stmmac_main.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index 199c4f938bb2..5f40fbb67bac 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -4214,6 +4214,7 @@ static u32 stmmac_vid_crc32_le(__le16 vid_le)
static int stmmac_vlan_update(struct stmmac_priv *priv, bool is_double)
{
u32 crc, hash = 0;
+ __le16 pmatch = 0;
int count = 0;
u16 vid = 0;
@@ -4228,11 +4229,11 @@ static int stmmac_vlan_update(struct stmmac_priv *priv, bool is_double)
if (count > 2) /* VID = 0 always passes filter */
return -EOPNOTSUPP;
- vid = cpu_to_le16(vid);
+ pmatch = cpu_to_le16(vid);
hash = 0;
}
- return stmmac_update_vlan_hash(priv, priv->hw, hash, vid, is_double);
+ return stmmac_update_vlan_hash(priv, priv->hw, hash, pmatch, is_double);
}
static int stmmac_vlan_rx_add_vid(struct net_device *ndev, __be16 proto, u16 vid)