Skip to contentSkip to conversation

Remove build warnings due to backports

PATCH New Florian Fainelli 1 participant 3 messages Sep 19, 2017 Stable branch

lore
Share & tools
lore
#0 lore raw

cover Remove build warnings due to backports

Hi Sasha,

Please find two patches that fix build warnings that I just met while merging 4.1.43 locally.

Thanks!

Florian Fainelli (2):
of: fdt: Fix return value in __unflatten_device_tree()
ipv6: Remove sit_gro_receive()

 drivers/of/fdt.c       |  2 +-
 net/ipv6/ip6_offload.c | 13 -------------
 2 files changed, 1 insertion(+), 14 deletions(-)
Signature · 1 line
2.14.1
#1 lore raw

PATCH 1/2 of: fdt: Fix return value in __unflatten_device_tree()

Commit 78de28c67c8f ("of: fdt: add missing allocation-failure check") would make us return NULL in a function declared to return void as of the 4.1 kernel.

Fixes 78de28c67c8f ("of: fdt: add missing allocation-failure check")
---
 drivers/of/fdt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/of/fdt.c +1 -1
index bf89754fe973..308a95ead432 100644
@@ -413,7 +413,7 @@ static void __unflatten_device_tree(void *blob,
 	/* Allocate memory for the expanded device tree */
 	mem = dt_alloc(size + 4, __alignof__(struct device_node));
 	if (!mem)
-		return NULL;
+		return;
 
 	memset(mem, 0, size);
 
Signature · 1 line
2.14.1
#2 lore raw

PATCH 2/2 ipv6: Remove sit_gro_receive()

In reply to Florian Fainelli

This was backported as part of 066b300e5be4 ("tunnels: Don't apply GRO to multiple layers of encapsulation.") but nothing uses this function, thus resulting in this build warning:

net/ipv6/ip6_offload.c:264:25: warning: 'sit_gro_receive' defined but not used [-Wunused-function]
static struct sk_buff **sit_gro_receive(struct sk_buff **head,

                         ^

Just drop it for now.

Fixes 066b300e5be4 ("tunnels: Don't apply GRO to multiple layers of encapsulation.")
---
 net/ipv6/ip6_offload.c | 13 -------------
 1 file changed, 13 deletions(-)
net/ipv6/ip6_offload.c +0 -13
index 606a07890c68..1cb68e01c301 100644
@@ -261,19 +261,6 @@ out:
 	return pp;
 }
 
-static struct sk_buff **sit_gro_receive(struct sk_buff **head,
-					struct sk_buff *skb)
-{
-	if (NAPI_GRO_CB(skb)->encap_mark) {
-		NAPI_GRO_CB(skb)->flush = 1;
-		return NULL;
-	}
-
-	NAPI_GRO_CB(skb)->encap_mark = 1;
-
-	return ipv6_gro_receive(head, skb);
-}
-
 static int ipv6_gro_complete(struct sk_buff *skb, int nhoff)
 {
 	const struct net_offload *ops;
Signature · 1 line
2.14.1