Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp898378rdb; Fri, 2 Feb 2024 07:21:19 -0800 (PST) X-Google-Smtp-Source: AGHT+IHImzy3W/EsrcUloLlMgoqDkujiOwY4if+zAonUXDcyohtcf5BesEEPK0fKO/oQwIhyRYhQ X-Received: by 2002:aa7:c495:0:b0:560:56c:800f with SMTP id m21-20020aa7c495000000b00560056c800fmr542370edq.42.1706887279584; Fri, 02 Feb 2024 07:21:19 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706887279; cv=pass; d=google.com; s=arc-20160816; b=ZaYNE1w/PUxPwmSKF64Z/4SdUzjviDshyZ9av2EHTVil6nJ1dkpR2Q8o8ckWyaYRPc dxciRxnzJEzrbAJnMRkNmlAIwVbmzPj0tk5NZGVGmJ9j8fBD8oTSOy83LlriSiHPMdJK jTeXPzNPDGRCupSxnZbhBC3d3vaavcCQiU6Gaay+Mpkx4Wu7olcaqzG6TAVPFa6w3ITQ /zBlRhR8Df9z5KqpY1vWAXEt0zJcnPKBfimxqPYdJsb7hIg8QmrJeJt29VRcSbIe13ZP H8q01WOdfp+4AYtwKCgp81z/BsLNY18EsKzyryPS9JWJbmOPl3iHnWV+7FWb4NQ4LjSi +/1w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from; bh=V6+toLXFWmacB/oERly47/fdYHBg/T4DXmrWMTNM2KI=; fh=BNDn15p1H5LBcnLn8sBFyuZY71vkSDQ0cTF0uISs9tc=; b=0Q6zHM68YLNsJgoSn9y31q1vkONJmfubaMK0G/9qjoRkr0XM1g2SIoivp/jkV7sn/x aEu0Y16bYyE3V6Rvb8VxsUCz+sjKv4JGsNZNUtask3nwQ4lt5j4f8oJj2wjcI30fYyKE yeyFZ7qYfNhKoKy93kwZjL5vaqCECKc3ELS9U+hydQbYbpR0t5nhz7F2PajW+38L6+Py QkJrMwG69/l9keRx+m7HTGgBtIgojC6TsFQfXIeEi28yKhIFIaC4dBeoVHgrP/WtM9Ci 3EfAM+q448EzAoyZH4+fkgY+pXftBmEv5LtoIkF08ulHCPqqykRv2X/OumMwAmPfVIOk NErg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-50000-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-50000-linux.lists.archive=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=1; AJvYcCXMGhmsSQUmGrrs2nto5BkmZyLkHdV0KFO2FuPRalrEic5EN+MIPSQvdT56aDPqJH1XhF6FPyN6FBqaOs4giDtB+p5P0Y06ICT9ZGPu8Q== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id t7-20020aa7d707000000b0055f1893ea28si938576edq.430.2024.02.02.07.21.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Feb 2024 07:21:19 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-50000-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-50000-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-50000-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id DAC641F2CD21 for ; Fri, 2 Feb 2024 15:14:23 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AB9F914691C; Fri, 2 Feb 2024 15:13:43 +0000 (UTC) Received: from mail-ej1-f47.google.com (mail-ej1-f47.google.com [209.85.218.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4E44477654; Fri, 2 Feb 2024 15:13:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.47 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706886823; cv=none; b=B8Lw4ByN5lgNymubxU82nL8WvxY55fLNeEY0UAGYkmoIbbqAQYkAa1nFh3PkUceqiItei+bOPXkTtcZ3mpamjaNY2L+mH/iEycjDW+fitOacQlKGOXY8NJNDiSfK66PKYAVqSkN3Qe7A8rnr/B8ojpsvE3hYjNpV8CoThAMHXRc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706886823; c=relaxed/simple; bh=6kdyWk3zE7pklDpacOf7W4hSCKaBNcyUHwuQesYEe6I=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=ePmLS4McgTJodiMR+7TA8MweVRGi1FgaLu9UVmQJgg/ihsZcU4i7UYAYBXj3LdYP774ZgOiygulQR7otqE67UcGiZ5PTzt7snYcOaqUqUMWqRhiJf+F7zN/XyXFqn+CPleF9DMShvDbX6Lsj9+gmPgKe6CimVemWk7a5bp8/Hxk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=debian.org; spf=pass smtp.mailfrom=gmail.com; arc=none smtp.client-ip=209.85.218.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=debian.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ej1-f47.google.com with SMTP id a640c23a62f3a-a3510d79ae9so290618166b.0; Fri, 02 Feb 2024 07:13:41 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706886819; x=1707491619; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=V6+toLXFWmacB/oERly47/fdYHBg/T4DXmrWMTNM2KI=; b=iOnD9PCXqmZZ1kS/5pAjT33u9tgaiQ8kvXv1qRO/fNqqiQlI5gkCjFO78+iQx7uxcv DiTwNem2xq3f7nyoXWldKVRcjsiIUgXf3TevRKQgnJeg8YOxL5uoHXXR4rvHucgmNbYQ SyjAKr/gVo+tjPO3yFXgt5LU1vxC6m458W50kZ/Qr6JGOmy7vHNssU+jHaP3BgDN80q3 AY2zPI3/G26DZnSDTn+v9EhCxo/uARP4sOLd3joCX975S1n8ylVyMUnFohrakUYZbc4V wixWIvhtS2G9XHK4i8wj3PgIHHHEb91k08dKVjsG6An8wzJJY80YkkybnfmrtnwEOWrZ i4xg== X-Gm-Message-State: AOJu0YxeBNu8OaGyyl7qk2tF9/wqKOTUTPu8vQQMgViwGdkdx5t/Vhm1 thS+rxPCjRUqudfIv3HvLCZTXHILK8E2b2T4hA1yn8Ti4RaNc2es X-Received: by 2002:a17:906:f9d6:b0:a36:47d8:f929 with SMTP id lj22-20020a170906f9d600b00a3647d8f929mr5607185ejb.65.1706886819388; Fri, 02 Feb 2024 07:13:39 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCWCjBGCTB/A2fg8wOQZElwKINdp+HCfzL+kK8/iCUWXYQcl0fn2oy30DMnG2C4irNBKwpvyBYdO/LSft4vxadFR8rSYPuvZYOEuylNpRd2bzgVJmOxPctYkYhxrsR0L64n6d7Js10mPdH6JHP818UfiJw8KugY8sTfkqi6S3lR6+B6x1OBLTznLmXY2a4XrnaHlbUicjTWA04OIKGFeVTtGTRYeEa4TsW282yxrvCAiZrv2xXJXyfOlxFgIAP7WljtWe0kmEN0vDZfOvVCd4UBv9T6R+mh86BGvVZ30vUQheap2pm3Q6X987tzUHvbDVooCuBLSyrJklp1ok+cP4uh95Ic/ Received: from localhost (fwdproxy-lla-002.fbsv.net. [2a03:2880:30ff:2::face:b00c]) by smtp.gmail.com with ESMTPSA id v12-20020a170906180c00b00a356c0fdd2csm962486eje.26.2024.02.02.07.13.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Feb 2024 07:13:39 -0800 (PST) From: Breno Leitao To: kuba@kernel.org, davem@davemloft.net, pabeni@redhat.com, edumazet@google.com, Andrew Morton , Mahesh Bandewar Cc: weiwan@google.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, horms@kernel.org, andrew@lunn.ch, Jiri Pirko Subject: [PATCH net-next] net: blackhole_dev: fix build warning for ethh set but not used Date: Fri, 2 Feb 2024 07:13:29 -0800 Message-Id: <20240202151329.878029-1-leitao@debian.org> X-Mailer: git-send-email 2.39.3 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Jiri Pirko --- 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