Commit b960a0ac6939ef4962c5abbf33e80d1382b45fc1
Committed by
David S. Miller
1 parent
1abcd82c20
Exists in
ti-lsk-linux-4.1.y
and in
10 other branches
vlan: make __vlan_hwaccel_put_tag return void
Always returns the same skb it gets, so change to void. Signed-off-by: Jiri Pirko <jiri@resnulli.us> Acked-by: Pravin B Shelar <pshelar@nicira.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Showing 3 changed files with 7 additions and 10 deletions Side-by-side Diff
drivers/scsi/fcoe/fcoe.c
... | ... | @@ -1669,10 +1669,8 @@ |
1669 | 1669 | fcoe->realdev->features & NETIF_F_HW_VLAN_CTAG_TX) { |
1670 | 1670 | /* must set skb->dev before calling vlan_put_tag */ |
1671 | 1671 | skb->dev = fcoe->realdev; |
1672 | - skb = __vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), | |
1673 | - vlan_dev_vlan_id(fcoe->netdev)); | |
1674 | - if (!skb) | |
1675 | - return -ENOMEM; | |
1672 | + __vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), | |
1673 | + vlan_dev_vlan_id(fcoe->netdev)); | |
1676 | 1674 | } else |
1677 | 1675 | skb->dev = fcoe->netdev; |
1678 | 1676 |
include/linux/if_vlan.h
... | ... | @@ -347,13 +347,11 @@ |
347 | 347 | * |
348 | 348 | * Puts the VLAN TCI in @skb->vlan_tci and lets the device do the rest |
349 | 349 | */ |
350 | -static inline struct sk_buff *__vlan_hwaccel_put_tag(struct sk_buff *skb, | |
351 | - __be16 vlan_proto, | |
352 | - u16 vlan_tci) | |
350 | +static inline void __vlan_hwaccel_put_tag(struct sk_buff *skb, | |
351 | + __be16 vlan_proto, u16 vlan_tci) | |
353 | 352 | { |
354 | 353 | skb->vlan_proto = vlan_proto; |
355 | 354 | skb->vlan_tci = VLAN_TAG_PRESENT | vlan_tci; |
356 | - return skb; | |
357 | 355 | } |
358 | 356 | |
359 | 357 | /** |
... | ... | @@ -368,7 +366,8 @@ |
368 | 366 | __be16 vlan_proto, u16 vlan_tci) |
369 | 367 | { |
370 | 368 | if (vlan_hw_offload_capable(skb->dev->features, vlan_proto)) { |
371 | - return __vlan_hwaccel_put_tag(skb, vlan_proto, vlan_tci); | |
369 | + __vlan_hwaccel_put_tag(skb, vlan_proto, vlan_tci); | |
370 | + return skb; | |
372 | 371 | } else { |
373 | 372 | return __vlan_put_tag(skb, vlan_proto, vlan_tci); |
374 | 373 | } |
net/8021q/vlan_dev.c
... | ... | @@ -150,7 +150,7 @@ |
150 | 150 | u16 vlan_tci; |
151 | 151 | vlan_tci = vlan->vlan_id; |
152 | 152 | vlan_tci |= vlan_dev_get_egress_qos_mask(dev, skb->priority); |
153 | - skb = __vlan_hwaccel_put_tag(skb, vlan->vlan_proto, vlan_tci); | |
153 | + __vlan_hwaccel_put_tag(skb, vlan->vlan_proto, vlan_tci); | |
154 | 154 | } |
155 | 155 | |
156 | 156 | skb->dev = vlan->real_dev; |