summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert@linux-m68k.org>2015-02-18 11:38:06 +0100
committerDavid S. Miller <davem@davemloft.net>2015-02-20 15:49:57 -0500
commit846cd66788b11105a62785078360c8854aa98310 (patch)
tree9c96b48df38f8e5804e177ae6b00ab57abfb31cd /include
parentf81edc6ac1e1e2e2cbe98bcd6ef5ebb7afb00807 (diff)
downloadlinux-846cd66788b11105a62785078360c8854aa98310.tar.gz
linux-846cd66788b11105a62785078360c8854aa98310.tar.bz2
linux-846cd66788b11105a62785078360c8854aa98310.zip
net: Initialize all members in skb_gro_remcsum_init()
skb_gro_remcsum_init() initializes the gro_remcsum.delta member only, leading to compiler warnings about a possibly uninitialized gro_remcsum.offset member: drivers/net/vxlan.c: In function ‘vxlan_gro_receive’: drivers/net/vxlan.c:602: warning: ‘grc.offset’ may be used uninitialized in this function net/ipv4/fou.c: In function ‘gue_gro_receive’: net/ipv4/fou.c:262: warning: ‘grc.offset’ may be used uninitialized in this function While these are harmless for now: - skb_gro_remcsum_process() sets offset before changing delta, - skb_gro_remcsum_cleanup() checks if delta is non-zero before accessing offset, it's safer to let the initialization function initialize all members. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Acked-by: Tom Herbert <therbert@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/linux/netdevice.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 5897b4ea5a3f..429d1790a27e 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -2342,6 +2342,7 @@ struct gro_remcsum {
static inline void skb_gro_remcsum_init(struct gro_remcsum *grc)
{
+ grc->offset = 0;
grc->delta = 0;
}