net/ipv6: resolve warning in ip6_fib.c
authorBreno Leitao <leitao@debian.org>
Mon, 22 Jan 2024 18:19:55 +0000 (10:19 -0800)
committerJakub Kicinski <kuba@kernel.org>
Wed, 24 Jan 2024 01:22:23 +0000 (17:22 -0800)
commit20df28fb5bd8081a05ec34542bd45e4f3feeced5
tree98ce133196d977d492024f0280bcbaa1568443ae
parenta6348a7104e0dac7b9b4b7042c3c8c36b81d71e7
net/ipv6: resolve warning in ip6_fib.c

In some configurations, the 'iter' variable in function
fib6_repair_tree() is unused, resulting the following warning when
compiled with W=1.

    net/ipv6/ip6_fib.c:1781:6: warning: variable 'iter' set but not used [-Wunused-but-set-variable]
     1781 |         int iter = 0;
  |             ^

It is unclear what is the advantage of this RT6_TRACE() macro[1], since
users can control pr_debug() in runtime, which is better than at
compilation time. pr_debug() has no overhead when disabled.

Remove the RT6_TRACE() in favor of simple pr_debug() helpers.

Link: https://lore.kernel.org/all/ZZwSEJv2HgI0cD4J@gmail.com/
Signed-off-by: Breno Leitao <leitao@debian.org>
Reviewed-by: David Ahern <dsahern@kernel.org>
Link: https://lore.kernel.org/r/20240122181955.2391676-2-leitao@debian.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
include/net/ip6_fib.h
net/ipv6/ip6_fib.c
net/ipv6/route.c