From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BBD04801; Sat, 6 Sep 2025 00:13:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757117620; cv=none; b=V/TiCl23gaYmqIUgHo2NhHU4o91PaC/c4tJZ8jthh/Su67mUN30i50zH6sgi5NyrTMQV46OlKaChW5HScTIKW8MXEbef2Mn4bV4kdqPKgtimFVKyVWoMlC90zmWcszQIB8s1dRv0/CCwcBmwQJJye3hjjC9NeXN/g34dhlH/YZo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757117620; c=relaxed/simple; bh=lfRboB7bumkTY5UA/5ig05h1f+VRUpHDj+9wKIkuPIA=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Q068SFiLzUw984fidvmmnDpT3JjUGaKKYz0OvgnOFumAO0kVkt8ezVSs6DRoKRAH/V/PL9LCtZKwTaN7fM0UTiimHGAI2taAtpzOlEjd/yy282cvODxrt9zJQyfjglxrfJTf0JLTdFS+tLWf/JNSwMOENeCC6r5hAXdgJzzoEKA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ZaMxEwCS; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ZaMxEwCS" 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> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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