Commit a24cae70 authored by Jose Abreu's avatar Jose Abreu Committed by David S. Miller
Browse files

net: stmmac: Fix sparse warning



The VID is converted to le16 so the variable must be __le16 type.

Reported-by: default avatarkbuild test robot <lkp@intel.com>
Fixes: c7ab0b80 ("net: stmmac: Fallback to VLAN Perfect filtering if HASH is not available")
Signed-off-by: default avatarJose Abreu <Jose.Abreu@synopsys.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 29711306
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -733,7 +733,7 @@ static void dwmac4_set_mac_loopback(void __iomem *ioaddr, bool enable)
}

static void dwmac4_update_vlan_hash(struct mac_device_info *hw, u32 hash,
				    u16 perfect_match, bool is_double)
				    __le16 perfect_match, bool is_double)
{
	void __iomem *ioaddr = hw->pcsr;

+1 −1
Original line number Diff line number Diff line
@@ -556,7 +556,7 @@ static int dwxgmac2_rss_configure(struct mac_device_info *hw,
}

static void dwxgmac2_update_vlan_hash(struct mac_device_info *hw, u32 hash,
				      u16 perfect_match, bool is_double)
				      __le16 perfect_match, bool is_double)
{
	void __iomem *ioaddr = hw->pcsr;

+1 −1
Original line number Diff line number Diff line
@@ -357,7 +357,7 @@ struct stmmac_ops {
			     struct stmmac_rss *cfg, u32 num_rxq);
	/* VLAN */
	void (*update_vlan_hash)(struct mac_device_info *hw, u32 hash,
				 u16 perfect_match, bool is_double);
				 __le16 perfect_match, bool is_double);
	void (*enable_vlan)(struct mac_device_info *hw, u32 type);
	/* TX Timestamp */
	int (*get_mac_tx_timestamp)(struct mac_device_info *hw, u64 *ts);
+3 −2
Original line number Diff line number Diff line
@@ -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)