All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Horman <horms@kernel.org>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: "David S. Miller" <davem@davemloft.net>,
	David Ahern <dsahern@kernel.org>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Kuniyuki Iwashima <kuniyu@amazon.com>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	kernel test robot <lkp@intel.com>
Subject: Re: [PATCH net-next v2] ipv4: ip_gre: Fix set but not used warning in ipgre_err() if IPv4-only
Date: Mon, 20 Jan 2025 16:26:05 +0000	[thread overview]
Message-ID: <20250120162605.GZ6206@kernel.org> (raw)
In-Reply-To: <67956320a8ee663f2582cc75f0e8047d69da5f6a.1737371364.git.geert@linux-m68k.org>

On Mon, Jan 20, 2025 at 02:12:36PM +0100, Geert Uytterhoeven wrote:
> if CONFIG_NET_IPGRE is enabled, but CONFIG_IPV6 is disabled:
> 
>     net/ipv4/ip_gre.c: In function ‘ipgre_err’:
>     net/ipv4/ip_gre.c:144:22: error: variable ‘data_len’ set but not used [-Werror=unused-but-set-variable]
>       144 |         unsigned int data_len = 0;
> 	  |                      ^~~~~~~~
> 
> Fix this by moving all data_len processing inside the IPV6-only section
> that uses its result.
> 
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202501121007.2GofXmh5-lkp@intel.com/
> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
> ---
> v2:
>   - Do not use the ternary operator,
>   - Target net-next.

Thanks Geert,

This has been bothering me too.

Reviewed-by: Simon Horman <horms@kernel.org>

  reply	other threads:[~2025-01-20 16:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-20 13:12 [PATCH net-next v2] ipv4: ip_gre: Fix set but not used warning in ipgre_err() if IPv4-only Geert Uytterhoeven
2025-01-20 16:26 ` Simon Horman [this message]
2025-01-23  9:35 ` Paolo Abeni

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=20250120162605.GZ6206@kernel.org \
    --to=horms@kernel.org \
    --cc=davem@davemloft.net \
    --cc=dsahern@kernel.org \
    --cc=edumazet@google.com \
    --cc=geert@linux-m68k.org \
    --cc=kuba@kernel.org \
    --cc=kuniyu@amazon.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.