From: Kuniyuki Iwashima <kuniyu@amazon.com>
To: <geert@linux-m68k.org>
Cc: <davem@davemloft.net>, <dsahern@kernel.org>,
<edumazet@google.com>, <horms@kernel.org>, <kuba@kernel.org>,
<linux-kernel@vger.kernel.org>, <lkp@intel.com>,
<netdev@vger.kernel.org>, <pabeni@redhat.com>
Subject: Re: [PATCH] ipv4: ip_gre: Fix set but not used warning in ipgre_err() if IPv4-only
Date: Mon, 13 Jan 2025 15:19:42 +0900 [thread overview]
Message-ID: <20250113061942.57178-1-kuniyu@amazon.com> (raw)
In-Reply-To: <3dc917cf6244ef123aa955b2fbbf02473d13cdb5.1736672666.git.geert@linux-m68k.org>
From: Geert Uytterhoeven <geert@linux-m68k.org>
Date: Sun, 12 Jan 2025 10:05:10 +0100
> @@ -191,8 +189,9 @@ static int ipgre_err(struct sk_buff *skb, u32 info,
>
> #if IS_ENABLED(CONFIG_IPV6)
> if (tpi->proto == htons(ETH_P_IPV6) &&
> - !ip6_err_gen_icmpv6_unreach(skb, iph->ihl * 4 + tpi->hdr_len,
> - type, data_len))
> + !ip6_err_gen_icmpv6_unreach(skb, iph->ihl * 4 + tpi->hdr_len, type,
> + type == ICMP_TIME_EXCEEDED ?
> + icmp_hdr(skb)->un.reserved[1] * 4 /* RFC 4884 4.1 */ : 0))
> return 0;
> #endif
No need to pack everything in a single line.
---8<---
#if IS_ENABLED(CONFIG_IPV6)
if (tpi->proto == htons(ETH_P_IPV6)) {
unsigned int data_len = 0;
if (type == ICMP_TIME_EXCEEDED)
data_len = icmp_hdr(skb)->un.reserved[1] * 4; /* RFC 4884 4.1 */
if (!ip6_err_gen_icmpv6_unreach(skb, iph->ihl * 4 + tpi->hdr_len,
type, data_len)
return 0;
}
#endif
---8<---
For the future submission, please specify the target tree in Subject.
[PATCH net-next v2] ...
See: Documentation/process/maintainer-netdev.rst
Thanks
prev parent reply other threads:[~2025-01-13 6:19 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-12 9:05 Geert Uytterhoeven
2025-01-13 6:19 ` Kuniyuki Iwashima [this message]
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=20250113061942.57178-1-kuniyu@amazon.com \
--to=kuniyu@amazon.com \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=edumazet@google.com \
--cc=geert@linux-m68k.org \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--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 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®