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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 7F431CDB465 for ; Thu, 19 Oct 2023 12:47:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: In-Reply-To:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Reply-To:Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date :Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=h5WvnArD8WTVmKcWet2Q3lSpwYiDpmY5VjIjcCf9OKY=; b=kG5slXtdZgBr2uV4VOXqZb3X6g k/e+VcHlM5p8krc1oUT92+W/ALeGkELRKfaSoWikwup5T5UxzrfFVfU8WpRvrYybQ2kHZB9GogBu/ vbXOvB53JFr3VRZaOkBehz35j+v8czN3cBbqeqUr1ZeXnJoQst/S9RDx/yoJORsIl6xBv21S4AfWm qmAfdjjdaxdd3xqr6NWXYBS1OxB7B+L1iNYoQBZWpH0v2th+V0+h9CoprFQToLPY/yg+9jLbOResy feOykTYO1mWnZ4Whg0HeCgGkxm9sMmGRIT/YFdIxYovYChlXbrXSF8ci1kEKH0a6lQaV0yFfuyDzT QMFSHW5g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qtSQQ-00HMSc-2r; Thu, 19 Oct 2023 12:46:54 +0000 Received: from sin.source.kernel.org ([145.40.73.55]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qtSQK-00HMP9-2f for linux-arm-kernel@lists.infradead.org; Thu, 19 Oct 2023 12:46:50 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 9193CCE2C3C; Thu, 19 Oct 2023 12:46:44 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2D4F4C433C7; Thu, 19 Oct 2023 12:46:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1697719603; bh=zrChmdwZjapKXHOuDShzo54XNW6c5+Js5gqYUObtK/o=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=O/pjOKSw15Eyq52t9nl85klJ8UdBJwT/YwJwJS+3+usiTv2DShKdWaInjqc3GJBu+ On2MmXCrAFp44XHG2X55Os2Y3DDHncbNWMtbFB8F6peVVN4RyLmSfgvt39KYcVOkVp 9ygwmt/C+n0oHLdJj5fl2VqHRxsZgDDb6abF925Jn8yGcmYFTkNFLVbPJAXL+814dF mb/nJdZEIbkYb3dJhS+APNwFZH4GGhkOYbjyzYeqHOWwU9bZ7oXivEdvkVC+0j4jSn 5/T22RVnwa07bAzIKK1YarpkufcGDt0zrqKSDC2PoFcm9C4/IgHwiIQRJcR8Vdhhgu 5+3dfibFfiV1Q== Date: Thu, 19 Oct 2023 13:46:36 +0100 From: Conor Dooley To: "Russell King (Oracle)" Cc: Linus Walleij , Rob Herring , Christian Marangi , Andrew Lunn , Florian Fainelli , linux-arm-kernel@lists.infradead.org, Krzysztof Kozlowski , devicetree@vger.kernel.org, Conor Dooley , Sebastian Hesselbarth , Eric Dumazet , Vladimir Oltean , Rob Herring , netdev@vger.kernel.org, Jakub Kicinski , Paolo Abeni , "David S. Miller" , linux-kernel@vger.kernel.org, Gregory Clement Subject: Re: [PATCH net-next v4 1/7] dt-bindings: net: dsa: Require ports or ethernet-ports Message-ID: <20231019-friday-fabulous-4882c4048b8c@spud> References: <20231018-marvell-88e6152-wan-led-v4-0-3ee0c67383be@linaro.org> <20231018-marvell-88e6152-wan-led-v4-1-3ee0c67383be@linaro.org> <169762516670.391804.7528295251386913602.robh@kernel.org> <20231019-pulse-autopilot-166bb6c96090@spud> MIME-Version: 1.0 In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231019_054649_219803_ED45B9F5 X-CRM114-Status: GOOD ( 33.29 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============7729129133521530053==" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org --===============7729129133521530053== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="hRWpvk1HDqmaTX1z" Content-Disposition: inline --hRWpvk1HDqmaTX1z Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Oct 19, 2023 at 01:27:09PM +0100, Russell King (Oracle) wrote: > On Thu, Oct 19, 2023 at 12:58:46PM +0100, Conor Dooley wrote: > > On Thu, Oct 19, 2023 at 11:58:49AM +0100, Russell King (Oracle) wrote: > > > On Wed, Oct 18, 2023 at 01:11:45PM +0200, Linus Walleij wrote: > > > > On Wed, Oct 18, 2023 at 12:32=E2=80=AFPM Rob Herring wrote: > > > > > On Wed, 18 Oct 2023 11:03:40 +0200, Linus Walleij wrote: > > > >=20 > > > > > > Bindings using dsa.yaml#/$defs/ethernet-ports specify that > > > > > > a DSA switch node need to have a ports or ethernet-ports > > > > > > subnode, and that is actually required, so add requirements > > > > > > using oneOf. > > > > > > > > > > > > Suggested-by: Rob Herring > > > > > > Signed-off-by: Linus Walleij > > > > > > --- > > > > > > Documentation/devicetree/bindings/net/dsa/dsa.yaml | 6 ++++++ > > > > > > 1 file changed, 6 insertions(+) > > > > > > > > > > > > > > > > My bot found errors running 'make DT_CHECKER_FLAGS=3D-m dt_bindin= g_check' > > > > > on your patch (DT_CHECKER_FLAGS is new in v5.13): > > > > > > > > > > yamllint warnings/errors: > > > > > ./Documentation/devicetree/bindings/net/dsa/dsa.yaml:60:7: [warni= ng] wrong indentation: expected 8 but found 6 (indentation) > > > > > ./Documentation/devicetree/bindings/net/dsa/dsa.yaml:62:7: [warni= ng] wrong indentation: expected 8 but found 6 (indentation) > > > >=20 > > > > Really? > > > >=20 > > > > + oneOf: > > > > + - required: > > > > + - ports > > > > + - required: > > > > + - ethernet-ports > > > >=20 > > > > Two spaces after the oneOf, 2 spaces after a required as usual. > > > > I don't get it. > > >=20 > > > Given the other python errors spat out in Rob's report, I would sugge= st > > > that the "bot" is running a development version that hasn't been fully > > > tested, so anything it spits out is suspect. Maybe Rob can comment on > > > the validity of the warnings in the report. > >=20 > > In this case, I think it is correct. > > 2 spaces for the oneOf, 2 spaces the start of the required for the > > nested list, so: > > oneOf: > > - required: >=20 > This is a total of two spaces indentation. >=20 > > - ports >=20 > This is a total of six spaces indentation. >=20 > You mention 2 spaces for the oneOf, which explains why the "- required" > needs to be indented by two spaces. You also say 2 spaces for the > required nested list, but what about the other two spaces? I a word that might've made it more clear. It is 2 spaces for the oneOf and 2 spaces _from_ the start of the required for the nested list. In theory you might have a contrived example that looks like: oneOf: - required: - ports properties: ethernet-ports: false - required: - ethernet-ports properties: ports: false Maybe with that example you can see that each option of the oneOf contains a `required` and a `properties` component at 4 spaces of indent, and then in turn the required properties, being sub-components of `required` grow 2 more spaces for 6. > I guess if you're a YAML expert, this all makes sense, but to those of > us who aren't, these quirky "features" of it just seem totally > illogical. If I were a yaml expert, I would probably be able to use the correct terminology to explain this better, but hopefully the example is useful. --hRWpvk1HDqmaTX1z Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCZTElLAAKCRB4tDGHoIJi 0nGyAQCSissEbIBxRaCcFxF/SsIhIEna84/VQZA/TgqU6R+5eQEAqIrUvOveubc0 111rEtBQs+tzwLNM+TuvJiUKGztktg0= =HXqE -----END PGP SIGNATURE----- --hRWpvk1HDqmaTX1z-- --===============7729129133521530053== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel --===============7729129133521530053==--