]> git.baikalelectronics.ru Git - kernel.git/commit
net_sched: fix unused variable warning in stmmac
authorArnd Bergmann <arnd@arndb.de>
Wed, 22 Aug 2018 15:25:44 +0000 (17:25 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 23 Aug 2018 04:40:21 +0000 (21:40 -0700)
commita1131f3a2806842424e75a9a5523baa2ac215681
treeb399bf62efe915c7bd9559aee968b61236ce2c05
parent3a454582c5f62aa3164a49fe38d04836fdd2d236
net_sched: fix unused variable warning in stmmac

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: 7524d6617b3d ("net_sched: remove list_head from tc_action")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/pkt_cls.h