Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1404676
| From | David Miller <davem@davemloft.net> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] mlx5: avoid unused variable warning |
| Date | 2016-05-20 20:30 +0200 |
| Message-ID | <rAXlo-Ew-7@gated-at.bofh.it> (permalink) |
| References | <rAaE2-3i0-23@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: Arnd Bergmann <arnd@arndb.de>
Date: Wed, 18 May 2016 16:21:07 +0200
> When CONFIG_NET_CLS_ACT is disabled, we get a new warning in the mlx5
> ethernet driver because the tc_for_each_action() loop never references
> the iterator:
>
> mellanox/mlx5/core/en_tc.c: In function 'mlx5e_stats_flower':
> mellanox/mlx5/core/en_tc.c:431:20: error: unused variable 'a' [-Werror=unused-variable]
> struct tc_action *a;
>
> This changes the dummy tc_for_each_action() macro by adding a
> cast to void, letting the compiler know that the variable is
> intentionally declared but not used here. I could not come up
> with a nicer workaround, but this seems to do the trick.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Fixes: aad7e08d39bd ("net/mlx5e: Hardware offloaded flower filter statistics support")
> Fixes: 00175aec941e ("net/sched: Macro instead of CONFIG_NET_CLS_ACT ifdef")
Applied, thanks Arnd.
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH] mlx5: avoid unused variable warning Arnd Bergmann <arnd@arndb.de> - 2016-05-18 16:30 +0200 Re: [PATCH] mlx5: avoid unused variable warning "Amir Vadai\"" <amir@vadai.me> - 2016-05-18 17:20 +0200 Re: [PATCH] mlx5: avoid unused variable warning David Miller <davem@davemloft.net> - 2016-05-20 20:30 +0200
csiph-web