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 C92AECDB465 for ; Thu, 19 Oct 2023 12:04:21 +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=J3t01s0RN5EZpa//CSgZc5BOxnYF96yBuQvWi4wbxnk=; b=h+oM71zYsmzK0hPP/c1/B9+uIp +ltZLX0+Oo0l1sH4XOXnGOpxaSWsrt/sso/wl8zMnUkXQVXiuTo1mQtkxokiF9k0p/jbZqV+fJ80r GYtBFDnW9zEbgyKJPAYlZdw1juLD+jGt4KKB2XkQYdAZaBycWckuHGSuiMoHML+DkFhfMceryhIj7 rUJR5OQaLGWJUucFq885cSrcADv+CPwO9cgJhqo1T53Qnc3JSWcb/WUoeRGutZEsF8ZbaJW/rNDWk jxh/dpWo6M2Etkljch5dymEVZ2NZPBAE5G8LMJ7w6vSOg0U2qsO4CGOFdUlP+lW2Hhv9vqcqwaz8u ZADdG2kQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qtRkl-00HFeN-1G; Thu, 19 Oct 2023 12:03:51 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qtRki-00HFdH-38 for linux-arm-kernel@lists.infradead.org; Thu, 19 Oct 2023 12:03:50 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 5230A60FCB; Thu, 19 Oct 2023 12:03:48 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 537CBC433C7; Thu, 19 Oct 2023 12:03:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1697717028; bh=7RwRDPja+BFl9I42gPB9G48QdL9q0Wc22SuWBEjhfrw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=jSqk6R0t7Y2nETGpH7m/j95dxlR5uEG7sj/AkGv0RjujwZtpE5racGJ6z03J+Ivyp FRyYqp9SN62PNV427KXcQ9l64TMw1qFrMGnVqCW+j1R2Oztqtc3FOB1Dnd9TIGvkn1 iyMzYLXDKIjaxWLsER1xm3fznuDSSxfrglKoxoo7pc16hpyJFJWrlvOHn6e0Y4Mr4x WoE7d6F0VMne7e9R2NGZV7OTGAvYm5H7uK5PuPsSeDaQNMoAgvVWdh/1gqHUVLPEWv xuY8kShvwVrXUmjPj1a38GUjK40tBgfCDHEY5f3sA6sqWrUD9Ur51LKxrEQilI70S+ HcpQM1c2Sp65Q== Date: Thu, 19 Oct 2023 13:03:41 +0100 From: Conor Dooley To: Rob Herring Cc: Linus Walleij , Christian Marangi , Andrew Lunn , Florian Fainelli , linux-arm-kernel@lists.infradead.org, Krzysztof Kozlowski , Russell King , 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-repacking-scrunch-f2435c2fd7e8@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> MIME-Version: 1.0 In-Reply-To: <169762516670.391804.7528295251386913602.robh@kernel.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231019_050349_108506_EADC92B3 X-CRM114-Status: GOOD ( 20.57 ) 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="===============0626884298091459925==" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org --===============0626884298091459925== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="KPoA9a73TBHTsk2t" Content-Disposition: inline --KPoA9a73TBHTsk2t Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Oct 18, 2023 at 05:32:48AM -0500, Rob Herring wrote: >=20 > On Wed, 18 Oct 2023 11:03:40 +0200, Linus Walleij wrote: > > 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. > >=20 > > Suggested-by: Rob Herring > > Signed-off-by: Linus Walleij > > --- > > Documentation/devicetree/bindings/net/dsa/dsa.yaml | 6 ++++++ > > 1 file changed, 6 insertions(+) > >=20 >=20 > My bot found errors running 'make DT_CHECKER_FLAGS=3D-m dt_binding_check' > on your patch (DT_CHECKER_FLAGS is new in v5.13): >=20 > yamllint warnings/errors: > ./Documentation/devicetree/bindings/net/dsa/dsa.yaml:60:7: [warning] wron= g indentation: expected 8 but found 6 (indentation) > ./Documentation/devicetree/bindings/net/dsa/dsa.yaml:62:7: [warning] wron= g indentation: expected 8 but found 6 (indentation) >=20 > dtschema/dtc warnings/errors: > Traceback (most recent call last): > File "/usr/local/bin/dt-doc-validate", line 64, in > ret |=3D check_doc(f) > ^^^^^^^^^^^^ > File "/usr/local/bin/dt-doc-validate", line 32, in check_doc > for error in sorted(dtsch.iter_errors(), key=3Dlambda e: e.linecol): > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > File "/usr/local/lib/python3.11/dist-packages/dtschema/schema.py", line= 125, in iter_errors > self.annotate_error(scherr, meta_schema, scherr.schema_path) > File "/usr/local/lib/python3.11/dist-packages/dtschema/schema.py", line= 104, in annotate_error > schema =3D schema[p] > ~~~~~~^^^ > KeyError: 'type' Locally, on an older version of dt-schema, I see /stuff/linux-dt/Documentation/devicetree/bindings/net/dsa/dsa.yaml: $defs: = 'oneOf' should not be valid under {'$ref': '#/definitions/json-schema-prop-= names'} hint: A json-schema keyword was found in $defs key. from schema $id: http://devicetree.org/meta-schemas/core.yaml# /stuff/linux-dt/Documentation/devicetree/bindings/net/dsa/dsa.yaml: $defs:o= neOf: [{'required': ['ports']}, {'required': ['ethernet-ports']}] is not of= type 'object' hint: $defs entries must contain schemas from schema $id: http://devicetree.org/meta-schemas/core.yaml# SCHEMA Documentation/devicetree/bindings/processed-schema.json On the latest version I see the error from the bot. Doing=20 diff --git a/Documentation/devicetree/bindings/net/dsa/dsa.yaml b/Documenta= tion/devicetree/bindings/net/dsa/dsa.yaml index bd6948e4fd9e..25e5950d51ae 100644 --- a/Documentation/devicetree/bindings/net/dsa/dsa.yaml +++ b/Documentation/devicetree/bindings/net/dsa/dsa.yaml @@ -55,10 +55,10 @@ $defs: $ref: dsa-port.yaml# unevaluatedProperties: false =20 - oneOf: - - required: - - ports - - required: - - ethernet-ports +oneOf: + - required: + - ports + - required: + - ethernet-ports =20 ... resolves both issues, but the older version of dt-schema definitely had better error reporting in this case! --KPoA9a73TBHTsk2t Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCZTEbHQAKCRB4tDGHoIJi 0pEpAQCU4hd9BQ874qBY0UwVcMAKHvyY/RN4cl/j41XZ9MKAEgD+MkLFIYAED1qk QbcQNLASFWw6gdEZTkwIvwbJAoBlsA4= =DneM -----END PGP SIGNATURE----- --KPoA9a73TBHTsk2t-- --===============0626884298091459925== 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 --===============0626884298091459925==--