From: Jiri Pirko <jiri@resnulli.us>
To: Breno Leitao <leitao@debian.org>
Cc: kuba@kernel.org, davem@davemloft.net, pabeni@redhat.com,
edumazet@google.com, Andrew Morton <akpm@linux-foundation.org>,
Mahesh Bandewar <maheshb@google.com>,
weiwan@google.com, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, horms@kernel.org, andrew@lunn.ch,
leit@fb.com
Subject: Re: [PATCH] blackhole_dev: Fix buil warning
Date: Thu, 1 Feb 2024 17:02:18 +0100 [thread overview]
Message-ID: <ZbvAigcKvxTLjHrr@nanopsycho> (raw)
In-Reply-To: <20240201133238.3089363-1-leitao@debian.org>
s/buil/build/ in the subject.
Also, indicate which tree are you targetting. In this case, should be:
[patch net-next] xxx
Thu, Feb 01, 2024 at 02:32:37PM CET, leitao@debian.org wrote:
>lib/test_blackhole_dev.c sets a variable that is never read, causing
>this following building warning:
>
> lib/test_blackhole_dev.c:32:17: warning: variable 'ethh' set but not used [-Wunused-but-set-variable]
>
>Remove the variable struct ethhdr *ethh, which is unused.
>
>Fixes: 509e56b37cc3 ("blackhole_dev: add a selftest")
>Signed-off-by: Breno Leitao <leitao@debian.org>
The patch itself looks good. Feel free to attach
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
with the v2 with fixed subject. Thanks!
>---
> lib/test_blackhole_dev.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
>diff --git a/lib/test_blackhole_dev.c b/lib/test_blackhole_dev.c
>index 4c40580a99a3..f247089d63c0 100644
>--- a/lib/test_blackhole_dev.c
>+++ b/lib/test_blackhole_dev.c
>@@ -29,7 +29,6 @@ static int __init test_blackholedev_init(void)
> {
> struct ipv6hdr *ip6h;
> struct sk_buff *skb;
>- struct ethhdr *ethh;
> struct udphdr *uh;
> int data_len;
> int ret;
>@@ -61,7 +60,7 @@ static int __init test_blackholedev_init(void)
> ip6h->saddr = in6addr_loopback;
> ip6h->daddr = in6addr_loopback;
> /* Ether */
>- ethh = (struct ethhdr *)skb_push(skb, sizeof(struct ethhdr));
>+ skb_push(skb, sizeof(struct ethhdr));
> skb_set_mac_header(skb, 0);
>
> skb->protocol = htons(ETH_P_IPV6);
>--
>2.39.3
>
>
next prev parent reply other threads:[~2024-02-01 16:02 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-01 13:32 [PATCH] blackhole_dev: Fix buil warning Breno Leitao
2024-02-01 16:02 ` Jiri Pirko [this message]
2024-02-01 16:55 ` Jakub Kicinski
2024-02-01 18:46 ` Breno Leitao
2024-02-01 19:40 ` Jakub Kicinski
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=ZbvAigcKvxTLjHrr@nanopsycho \
--to=jiri@resnulli.us \
--cc=akpm@linux-foundation.org \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=leit@fb.com \
--cc=leitao@debian.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maheshb@google.com \
--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;
as well as URLs for NNTP newsgroup(s).