From: Vladimir Oltean Date: Thu, 20 Apr 2023 22:55:59 +0000 (+0300) Subject: net: dsa: tag_sja1105: replace skb_mac_header() with vlan_eth_hdr() X-Git-Tag: v6.6.17~4755^2~60^2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b5653b157e55a25ec76506e8cd31353e0ed4944c;p=platform%2Fkernel%2Flinux-rpi.git net: dsa: tag_sja1105: replace skb_mac_header() with vlan_eth_hdr() This is a cosmetic patch which consolidates the code to use the helper function offered by if_vlan.h. Signed-off-by: Vladimir Oltean Reviewed-by: Eric Dumazet Reviewed-by: Simon Horman Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller --- diff --git a/net/dsa/tag_sja1105.c b/net/dsa/tag_sja1105.c index a7ca97b..a5f3b73 100644 --- a/net/dsa/tag_sja1105.c +++ b/net/dsa/tag_sja1105.c @@ -516,7 +516,7 @@ static bool sja1110_skb_has_inband_control_extension(const struct sk_buff *skb) static void sja1105_vlan_rcv(struct sk_buff *skb, int *source_port, int *switch_id, int *vbid, u16 *vid) { - struct vlan_ethhdr *hdr = (struct vlan_ethhdr *)skb_mac_header(skb); + struct vlan_ethhdr *hdr = vlan_eth_hdr(skb); u16 vlan_tci; if (skb_vlan_tag_present(skb))