From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.zx2c4.com (lists.zx2c4.com [165.227.139.114]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id BB891CA1017 for ; Sat, 6 Sep 2025 01:05:47 +0000 (UTC) Received: by lists.zx2c4.com (ZX2C4 Mail Server) with ESMTP id cddedb8c; Sat, 6 Sep 2025 00:13:43 +0000 (UTC) Received: from sea.source.kernel.org (sea.source.kernel.org [172.234.252.31]) by lists.zx2c4.com (ZX2C4 Mail Server) with ESMTPS id f11cf20d (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO) for ; Sat, 6 Sep 2025 00:13:42 +0000 (UTC) Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sea.source.kernel.org (Postfix) with ESMTP id 6E85D41AFA; Sat, 6 Sep 2025 00:13:40 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 929A8C4CEF9; Sat, 6 Sep 2025 00:13:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1757117620; bh=lfRboB7bumkTY5UA/5ig05h1f+VRUpHDj+9wKIkuPIA=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=ZaMxEwCSuLkPnEoo2hozEE94zgWUOfaFEZgsZJuxNbSgqD1IDbqiUeRZzEXSW5oLw lzW1lyj+i4NXOia0LGC29IX8Oto1ePDvPWlqI+Zud96WaBGWeuIxSKafRbbJcxYc8v YjHbX+zSVnTxDJBLC8xSY3hqizm9z4d+zZesYG51RQkmBOyKuTejRq0dvqxKQUVUyw 7vmdF06RSJfibuuWdxECwMKec/lJ3JFg3pg25jxqzBnInhnunKy/Krg25zFyD0Tsai 2+ePOXVVNvFL8UQuq7nZFYt3p5uw5YeKsFeFxZboMJRkqgzf5OP7hzK+J9hMEwQTRG iFrUm0OFkNWdQ== Date: Fri, 5 Sep 2025 17:13:38 -0700 From: Jakub Kicinski To: =?UTF-8?B?QXNiasO4cm4=?= Sloth =?UTF-8?B?VMO4bm5lc2Vu?= Cc: "Jason A. Donenfeld" , "David S. Miller" , Eric Dumazet , Paolo Abeni , Donald Hunter , Simon Horman , Jacob Keller , Andrew Lunn , wireguard@lists.zx2c4.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net-next 04/11] tools: ynl-gen: define count iterator in print_dump() Message-ID: <20250905171338.046e35f2@kernel.org> In-Reply-To: <20250904220156.1006541-4-ast@fiberby.net> References: <20250904-wg-ynl-prep@fiberby.net> <20250904220156.1006541-4-ast@fiberby.net> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: wireguard@lists.zx2c4.com X-Mailman-Version: 2.1.30rc1 Precedence: list List-Id: Development discussion of WireGuard List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: wireguard-bounces@lists.zx2c4.com Sender: "WireGuard" On Thu, 4 Sep 2025 22:01:27 +0000 Asbj=C3=B8rn Sloth T=C3=B8nnesen wrote: > In wireguard_get_device_dump(), as generated by print_dump(), > it didn't generate a declaration of `unsigned int i`: >=20 > $ make -C tools/net/ynl/generated wireguard-user.o > -e CC wireguard-user.o > wireguard-user.c: In function =E2=80=98wireguard_get_device_dump=E2=80=99: > wireguard-user.c:502:22: error: =E2=80=98i=E2=80=99 undeclared (first use= in this fn) > 502 | for (i =3D 0; i < req->_count.peers; i++) > | ^ >=20 > Copy the logic from print_req() as it correctly generated the > iterator in wireguard_set_device(). Reviewed-by: Jakub Kicinski