🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #10737

Re: [PATCH nf-next] selftests: netfilter: nf_queue: drop the no-op loop initializer

#10737
From: Hangbin Liu
Date: Wed, 04 Nov 2026 01:49
34 lines
9849 bytes
On Tue, Nov 03, 2026 at 11:54:18AM -0500, Sasha Levin wrote:
> The out-of-order verdict loop starts with "for (ooo_count; ...", and
> clang warns about the unused expression:
> 
>   nf_queue.c:354:10: warning: expression result unused [-Wunused-value]
> 
> Leave the initializer empty.
> 
> Signed-off-by: Sasha Levin <sashal@kernel.org>
> ---
> KernelCI's clang builds show this warning.
> 
>  tools/testing/selftests/net/netfilter/nf_queue.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/testing/selftests/net/netfilter/nf_queue.c b/tools/testing/selftests/net/netfilter/nf_queue.c
> index cca6c3cfa9e46..bc0b2f601a0a4 100644
> --- a/tools/testing/selftests/net/netfilter/nf_queue.c
> +++ b/tools/testing/selftests/net/netfilter/nf_queue.c
> @@ -351,7 +351,7 @@ static int mainloop(void)
>  		if (opts.out_of_order) {
>  			ooo_ids[ooo_count] = id;
>  			if (ooo_count >= 15) {
> -				for (ooo_count; ooo_count >= 0; ooo_count--) {
> +				for (; ooo_count >= 0; ooo_count--) {
>  					nlh = nfq_build_verdict(buf, ooo_ids[ooo_count],
>  								opts.queue_num, opts.verdict);
>  					if (mnl_socket_sendto(nl, nlh, nlh->nlmsg_len) < 0) {
> -- 
> 2.53.0
> 

Reviewed-by: Hangbin Liu <liuhangbin@kylinos.cn>
Technical Details
Message-ID: <auqPDIM0z0MbuBhS@fedora>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-356118-linux-kernel-netdev=dewy.ru
References: <20261103165419.687806-1-sashal@kernel.org> <20261103165419.687806-5-sashal@kernel.org>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-356118-linux-kernel-netdev=dewy.ru
From: hangbin.liu@linux.dev (Hangbin Liu)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH nf-next] selftests: netfilter: nf_queue: drop the no-op
 loop initializer
Date: Wed, 4 Nov 2026 09:49:00 +0800
Organization: Usenet Network
Message-ID: <auqPDIM0z0MbuBhS@fedora>
References: <20261103165419.687806-1-sashal@kernel.org>
 <20261103165419.687806-5-sashal@kernel.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Info: usenet.network;
	logging-data="3303440"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:ruFM2G+avGN3TV/oSNLey1bdeAM= sha256:HManpSFA0nwEruBphRB0FtOzFeHOD5iyRIDSSRpiJys=
	sha1:mRtvIWZ8u3ZkzspAb1atcrxmCuQ= sha256:DJU520vgKh3hPrYYLFMWkjplQulQeG5o2TmF21WvTpI=
Content-Disposition: inline
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
	by mail.dewy.ru (Postfix) with ESMTP id 143A0112AA1; Wed,  4 Nov 2026 04:49:42 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.05
X-Spam-Status: No, score=-3.05 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
	DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249,
	MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001,
	SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (1024-bit key)
	header.d=linux.dev
X-Received: from mail.dewy.ru ([127.0.0.1])
	by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id p6TdW3q3HXI3;
	Wed,  4 Nov 2026 04:49:38 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-356118-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=linux.dev
X-Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114])
	by mail.dewy.ru (Postfix) with ESMTPS id 950F61126ED; Wed,  4 Nov 2026 04:49:29 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by tor.lore.kernel.org (Postfix) with ESMTP id 7FA152AC50; Wed,  4 Nov 2026 01:49:18 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
	t=1793756955;
	b=Nhg6bzJ+BteHXW/dKXISDUKnWeMAqLWiQJl95XJ0Awp2axodBV6u/uEPIJJzxZDIenJw
	 oMVhEYaYNgIW+7kJcEKBwgEM53mIpLIPjV4SMcZKUV8L4Sq7syxo+h2485CCfjY/dLYQf
	 /RSI54e54oMB5s3nOA6E4tBHEsM5La0XPP6RCAaWF2B4zKLymYdJpGt7ipWEz7E9Vj+Xw
	 ycJMoFgUKcKlpKEY7qJpcBbce7VCX3m/JB5Qu3Gj9GeFpuCouxULYDEamptLGx/n5S4IZ
	 SwvfwRbCXWoNNtiCKHYYKgC+jx3xewJcBKWjE005CtOEqr69lLb/7oXwwpK0F/gnVfg==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1793756955;
	h=X-Original-To:Received:DMARC-Filter:X-Envelope-To:DKIM-Signature:
	 X-Envelope-To:Received:X-Mizu-Trace-ID:X-Migadu-Flow:Date:From:To:Cc:
	 Subject:Message-ID:References:X-Mailing-List:List-Id:List-Post:
	 List-Help:List-Subscribe:List-Unsubscribe:List-Owner:Precedence:
	 MIME-Version:Content-Type:Content-Disposition:In-Reply-To;
	bh=B9+nhlrF2Dcltc/b/gA0HI4sU+fSxvFt8AwHcya3lHg=;
	b=bA/JiN+8tulJfjw4yMJgWLVLBOuQJG9D3qkwSGTXREVnBeKiOHN/PCKQwqB7vCErPnZY
	 i2M7s3x2udoNdUxd13qGQ7awAS4JyAkozHlDjRmHRxFhPrggQQqWVQbr3BxyLNbXvqzAi
	 7oUH5vtD1c2djba9WJML5tznLFBKRdIkF2OjOAxXjcqEmBpv5LVIOJsv96b8XuxdZr68k
	 ti+6L7ZVX7BeB+dA2rRmGQSi9HhCttztoEHcHIpdslLDmTp9muUUrhT7PJEq2O+5FRGKw
	 wcYCJ7Yrv3gdUbxtuEqlAwHOtGcTHuglMpnKRo+dKOF8N9pFJ6xDFV5gQnw1WkXs+Gg==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=WmgCd1z2;
	dmarc=pass header.from=linux.dev;
	spf=pass smtp.mailfrom=linux.dev;
	arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id 24030606A33C;
	Wed,  4 Nov 2026 01:49:15 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (1024-bit key, unprotected) header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=WmgCd1z2
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=95.215.58.171
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1793756954;
	b=wMeIYwe+PZE4xwXvPIDF+xtzpDXIXFDHtC4d3khVt1PoPPqm21O7Z7GbsTej2XYKOBeg
	 558zt+bGJnRra4McFlAY3UNjkMtdMmLGrjpH4L0X37LIf/yOir+HoOJsVYFpqa9JfXpsB
	 OupA8WH3ePfxPBZJQrfHDwIU3YO32QQhYPY3AD1zYjhPc3rjAJzsZU62SqKdkMkiTRs0n
	 iraqpgrKSqPjeQ3eMoGX/dSUwV6dgkiyS3YqbBBWiymfs5FREguvFykzqz3w9tN6navvF
	 IP9bBKzR4BcMDJB7RQrMKk4iuhTOdbFy6CzzH0GVWacliqc8zvErC9AHwGMcow41l7g==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1793756954;
	h=DMARC-Filter:X-Envelope-To:DKIM-Signature:X-Envelope-To:Received:
	 X-Mizu-Trace-ID:X-Migadu-Flow:Date:From:To:Cc:Subject:Message-ID:
	 References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To;
	bh=B9+nhlrF2Dcltc/b/gA0HI4sU+fSxvFt8AwHcya3lHg=;
	b=PsJGGDNv9NKzhpj9CzqamswXfZ6zcvSRUXEam+EGFPgm69QzjeHuX2BrP5wrvE/+pnXn
	 gzyBnRfwicER0rcjsOEOeCzIWDj0u6tHIPD+qo5IFZiBvPJQLIXWC7T/NxPmQi8e3GV2C
	 y1TAyTzc5xRSpoFlz4yVdlEz/qa7MxH5o1MAz2herzFk9hIX7yod6DDpiaPGtFtgp+Trd
	 r3tGmrC9yltPPipkYu3gsA0lnZfRmZ+IJwFXtaeXZPPgqyquA0+Fvno0k6G7eey3Bua/v
	 F8yREsAiH/t81wDRMWMgxVxvpRnXyLQBbjBdTQnD6a5/RBWhHsHYk1pwfgG110W/TZA==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dmarc=pass header.from=linux.dev;
	spf=pass smtp.mailfrom=linux.dev;
	dkim=pass header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=WmgCd1z2;
	arc=none smtp.remote-ip=95.215.58.171
X-Received: from mta1.migadu.com (out-171.mta1.migadu.com [95.215.58.171])
	(using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
	 key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256)
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id F320C606A328
	for <netdev@vger.kernel.org>; Wed,  4 Nov 2026 01:49:12 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org F320C606A328
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev
X-Envelope-To: netdev@vger.kernel.org
X-DKIM-Signature: a=rsa-sha256; bh=ly87kVwc8IX3qQC1upPNiV4ixKwflXWdxxSQPtJr530=;
 c=simple/simple; d=linux.dev;
 h=from:to:subject:date:message-id:mime-version:content-type; s=key1;
 t=1793756950; v=1; x=1794361750;
 b=WmgCd1z2xEwibpWazqwjfNFUMb/ti3JB4RI5g7fyRZsn46BHNv976oy8pudR2GVmIAJJvRtf
 TrX/RUMKekNCUJ4umRhO8sDe3MsN0lQ17l2YjLPHJ85Ak4zEfIrw99VzIKMHFgKZKG5V32FMRE8
 5KvQHTjKsDF3UPgEh6FVAgSE=
X-Envelope-To: netdev@vger.kernel.org
X-Received: by mta11.migadu.com with ESMTPS id bf8193c6aca9eaae;
	Wed, 04 Nov 2026 01:49:10 +0000
X-Mizu-Trace-ID: bf8193c6aca9eaae
X-Migadu-Flow: FLOW_OUT
X-Cc: Pablo Neira Ayuso <pablo@netfilter.org>,
	Florian Westphal <fw@strlen.de>, Phil Sutter <phil@nwl.cc>,
	Fernando Fernandez Mancera <fmancera@suse.de>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@kernel.org>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Simon Horman <horms@kernel.org>, Shuah Khan <shuah@kernel.org>,
	Nathan Chancellor <nathan@kernel.org>,
	netfilter-devel@vger.kernel.org, coreteam@netfilter.org,
	netdev@vger.kernel.org, linux-kselftest@vger.kernel.org,
	llvm@lists.linux.dev, linux-kernel@vger.kernel.org
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list
X-In-Reply-To: <20261103165419.687806-5-sashal@kernel.org>