From: David Ahern <dsahern@kernel.org>
To: Breno Leitao <leitao@debian.org>,
weiwan@google.com, kuba@kernel.org,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>
Cc: leit@meta.com,
"open list:NETWORKING [IPv4/IPv6]" <netdev@vger.kernel.org>,
open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH RESEND net-next 2/2] net/ipv6: resolve warning in ip6_fib.c
Date: Mon, 22 Jan 2024 12:41:41 -0700 [thread overview]
Message-ID: <233ad4e5-4439-4c85-96e6-6d55ec2622ac@kernel.org> (raw)
In-Reply-To: <20240122181955.2391676-2-leitao@debian.org>
On 1/22/24 11:19 AM, Breno Leitao wrote:
> 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.
>
> [1] Link: https://lore.kernel.org/all/ZZwSEJv2HgI0cD4J@gmail.com/
> Signed-off-by: Breno Leitao <leitao@debian.org>
> ---
> include/net/ip6_fib.h | 6 ------
> net/ipv6/ip6_fib.c | 15 +++++++++------
> net/ipv6/route.c | 8 ++++----
> 3 files changed, 13 insertions(+), 16 deletions(-)
>
Reviewed-by: David Ahern <dsahern@kernel.org>
next prev parent reply other threads:[~2024-01-22 19:41 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-22 18:19 [PATCH RESEND net-next 1/2] net/ipv6: Remove unnecessary pr_debug() logs Breno Leitao
2024-01-22 18:19 ` [PATCH RESEND net-next 2/2] net/ipv6: resolve warning in ip6_fib.c Breno Leitao
2024-01-22 19:41 ` David Ahern [this message]
2024-01-24 1:30 ` [PATCH RESEND net-next 1/2] net/ipv6: Remove unnecessary pr_debug() logs patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=233ad4e5-4439-4c85-96e6-6d55ec2622ac@kernel.org \
--to=dsahern@kernel.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=leit@meta.com \
--cc=leitao@debian.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=weiwan@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®