Received: by 2002:a05:7412:f690:b0:e2:908c:2ebd with SMTP id ej16csp298281rdb; Thu, 19 Oct 2023 05:06:21 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF05FVvGeq2zwfUXbJ6IONCA/3mp/0OM16gIHiyT4qbce9syK1xqOY2SIHaAClIUxlKQcGS X-Received: by 2002:a05:6a21:4842:b0:171:75ef:d636 with SMTP id au2-20020a056a21484200b0017175efd636mr1675061pzc.21.1697717181101; Thu, 19 Oct 2023 05:06:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697717181; cv=none; d=google.com; s=arc-20160816; b=Mjj1MLYnMN4vCLT/XdbldDD1tzfqebMa/jEo+aCDpch1K5eqTpLVYh5IUb+FDYocC7 T/8BVUX8urz7NgRdiUqQAWw1jSaWL5vXfoglrCuOC/G4EP0ssDQOTnxopVhec/R0gDTp E1JbLbtfaaJ2wwj8bkOSKRDvRKOKPOXEk/PvOxLMC5TmZQ5C9J/VMbAVrQ4JqsWFKGTs pe/9CV3in+omgAWXIU7cTtZRKyFMda61KrT79gKPP/qfnfmelETuN6b87X720X9xj7dp SfFos6WRW3t+fPt+0y56A2bXeVPJoaWmRWHioNy5afBlinqgWQi0s4P4U6DJoPDky/bl 4dGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=3yMHvwKri2RrV276GJw3xMVaZ8RE4JRSgogSlW+qjYs=; fh=U8Rc47KcSAHTwkmU7Wjtc4WMNUoqnYqtSZpL7e4mXOM=; b=C50cOthDj7zbvPEX/L6R6lnt5TXxnXqVb3p4fViQ5LZ+YHyVRnxji5SazL997+wZ4Q 138cAoS5c8vJ3QcQDQtN37wodBExBdTCnHpTHfUX1LHiKa70+2SrqLhh0C9n1lmHHlsW s9Sizkw6P7KZUaE8UMG4fdOkTDyVkxboUt389Ga+N2gvoeJBmDT5DKsUsVSC3my9jSUp OMBsef3mAd5hmwBus+PBLV4vXagwtp6ap0bWW5AFcQfLpLCUbC7Z0MwFHYMnptxcLe+h 0J4V1o/X0OjNs5Z7jm6muPTHH4LYwYjcMac7kgHF3cm6ftjlCHvLnqIhgUUBqsC/NeYw dfNg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=jSqk6R0t; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id ng8-20020a17090b1a8800b00277617e4539si2091725pjb.97.2023.10.19.05.06.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Oct 2023 05:06:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=jSqk6R0t; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 48E8F83700E7; Thu, 19 Oct 2023 05:05:44 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345576AbjJSME6 (ORCPT + 99 others); Thu, 19 Oct 2023 08:04:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41626 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235398AbjJSMEj (ORCPT ); Thu, 19 Oct 2023 08:04:39 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C78D81BCE for ; Thu, 19 Oct 2023 05:03:48 -0700 (PDT) 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 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="KPoA9a73TBHTsk2t" Content-Disposition: inline In-Reply-To: <169762516670.391804.7528295251386913602.robh@kernel.org> X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Thu, 19 Oct 2023 05:05:44 -0700 (PDT) --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--