• A
    net_sched: fix unused variable warning in stmmac · 191672ca
    Arnd Bergmann 提交于
    The new tcf_exts_for_each_action() macro doesn't reference its
    arguments when CONFIG_NET_CLS_ACT is disabled, which leads to
    a harmless warning in at least one driver:
    
    drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c: In function 'tc_fill_actions':
    drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c:64:6: error: unused variable 'i' [-Werror=unused-variable]
    
    Adding a cast to void lets us avoid this kind of warning.
    To be on the safe side, do it for all three arguments, not
    just the one that caused the warning.
    
    Fixes: 244cd96a ("net_sched: remove list_head from tc_action")
    Signed-off-by: NArnd Bergmann <arnd@arndb.de>
    Signed-off-by: NDavid S. Miller <davem@davemloft.net>
    191672ca
pkt_cls.h 20.0 KB