Skip to content

Commit f9dbc7e

Browse files
jsitnickiKernel Patches Daemon
authored andcommitted
vlan: Make vlan_remove_tag return nothing
All callers ignore the return value. Prepare to reorder memmove() after skb_pull() which is a common pattern. Signed-off-by: Jakub Sitnicki <[email protected]>
1 parent f09b365 commit f9dbc7e

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

include/linux/if_vlan.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -731,18 +731,16 @@ static inline void vlan_set_encap_proto(struct sk_buff *skb,
731731
*
732732
* Expects the skb to contain a VLAN tag in the payload, and to have skb->data
733733
* pointing at the MAC header.
734-
*
735-
* Returns: a new pointer to skb->data, or NULL on failure to pull.
736734
*/
737-
static inline void *vlan_remove_tag(struct sk_buff *skb, u16 *vlan_tci)
735+
static inline void vlan_remove_tag(struct sk_buff *skb, u16 *vlan_tci)
738736
{
739737
struct vlan_hdr *vhdr = (struct vlan_hdr *)(skb->data + ETH_HLEN);
740738

741739
*vlan_tci = ntohs(vhdr->h_vlan_TCI);
742740

743741
memmove(skb->data + VLAN_HLEN, skb->data, 2 * ETH_ALEN);
744742
vlan_set_encap_proto(skb, vhdr);
745-
return __skb_pull(skb, VLAN_HLEN);
743+
__skb_pull(skb, VLAN_HLEN);
746744
}
747745

748746
/**

0 commit comments

Comments
 (0)