• E
    net: make u64_stats_init() a function · 9464ca65
    Eric Dumazet 提交于
    Using a function instead of a macro is cleaner and remove
    following W=1 warnings (extract)
    
    In file included from net/ipv6/ip6_vti.c:29:0:
    net/ipv6/ip6_vti.c: In function ‘vti6_dev_init_gen’:
    include/linux/netdevice.h:2029:18: warning: variable ‘stat’ set but not
    used [-Wunused-but-set-variable]
        typeof(type) *stat;   \
                      ^
    net/ipv6/ip6_vti.c:862:16: note: in expansion of macro
    ‘netdev_alloc_pcpu_stats’
      dev->tstats = netdev_alloc_pcpu_stats(struct pcpu_sw_netstats);
                    ^
      CC [M]  net/ipv6/sit.o
    In file included from net/ipv6/sit.c:30:0:
    net/ipv6/sit.c: In function ‘ipip6_tunnel_init’:
    include/linux/netdevice.h:2029:18: warning: variable ‘stat’ set but not
    used [-Wunused-but-set-variable]
        typeof(type) *stat;   \
                      ^
    Signed-off-by: NEric Dumazet <edumazet@google.com>
    Signed-off-by: NDavid S. Miller <davem@davemloft.net>
    9464ca65
u64_stats_sync.h 4.3 KB