Received: by 2002:a05:7412:f690:b0:e2:908c:2ebd with SMTP id ej16csp311347rdb; Thu, 19 Oct 2023 05:28:46 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF4tk980BRipLxTRZhPdrQU0WTet1xOsgddXfQ/1PAyJ1YsRyDEGuB4b81VSGocNMi0ziiy X-Received: by 2002:a05:6a20:3c93:b0:17b:2e82:d4ba with SMTP id b19-20020a056a203c9300b0017b2e82d4bamr1884652pzj.3.1697718526593; Thu, 19 Oct 2023 05:28:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697718526; cv=none; d=google.com; s=arc-20160816; b=IEpfaKUV+usU4RUp2047R9eBoDeYB+tky2qoPlliWpuzc3QTsj24J/+2pyhRmIQ6Mp 2AJ/IsqzG5ffUgH6vHlivlASphU9oCnjUpjrc0fbbDrwHlNEUK6ds5W7w7Gyq3WfFiud J4AmyduYHLDlcUYzsYO1sOk7NHWTf5d49hbm9cCiOy7T1sBFFko8iSXAQB9GfDD51+DR aZmcGDiXzzB2CmSTX4gIAbx1ACfB+WmV+CJHuV2DwrcOWOnhvbsOMjmEHHmQBPW6AlzH hDpQUA0dEMXBi/F+v6r/f8pBKKvhF8PnxsbHF9/Z1RKbJSY91Zp9ZoO3Q0b2+pMb/SpK 1t2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=KAdaUAiW/PLAxqjMWUUOBL8HfrZqlFhYhyfomShrMW8=; fh=r2kJBDHKr5Dg1PoYj6bfgbakHbYE5z4E2WEQhslZZdU=; b=y83O8L/dcUkYkncVlbFSYelBKSl9hDgwYDuAEbBtcEc3yt28LxI7eRGa7cd1mjQ7+6 HQeoRgoYQ9tYxOytWxgGVQTNh9Al/uSvQg4DT2nUE1+7DA45ALhycDffrXLCKCR8FwND g0z2+UbXK9f6UGdaZ68x3xO5fcIjLTuYxUPZS0UiZ1ejRJzQ4nJor+LQO/IALcfmkj2c fE1DlNZnJq3UW1cDj1GfeVcn+JVkZZnexusEI8SxtybS4KgAH65GPkPBCFVzZCoNsZ2d Gj+RLT+ZXnaK17N+xD66zOF0V8mpikh1vRceN36VfvP+cVw7Ssq5f/68fxk/3vKhl9M6 QMzQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=kCo5OFMF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id a8-20020a63e408000000b005859cd26197si4184241pgi.455.2023.10.19.05.28.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Oct 2023 05:28:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=kCo5OFMF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id D9B8E8191670; Thu, 19 Oct 2023 05:28:43 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345451AbjJSM2g (ORCPT + 99 others); Thu, 19 Oct 2023 08:28:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33670 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233195AbjJSM2e (ORCPT ); Thu, 19 Oct 2023 08:28:34 -0400 Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [IPv6:2001:4d48:ad52:32c8:5054:ff:fe00:142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EB16EBE; Thu, 19 Oct 2023 05:28:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: 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-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=KAdaUAiW/PLAxqjMWUUOBL8HfrZqlFhYhyfomShrMW8=; b=kCo5OFMFje7kyh0bUXC/x92Ir2 b1s87iw/epDqvYES790GOuPO0fku4ZA8VcFd/q5/2PjYxHXU1Ai0byK90naR/9nbinCMPs+rxjLLL ohkIsXUyngQfbwQrdzHMeh1liHmWBCp2V8W4GeGrDBZJt2YqYqfQ1GtJwiZJD+OiUUqOGdXdUtwP5 mlhpCvrfF9QB3BxEoh+VyI+bbRtfnrMZ1u4mM/gGwkzmJDw3qcMl99vQWqFQ+IWLvCbwMwEa5RYhq SYDSgu8Bszfm/TotWw2Qj9tlyeLsWXg6U5gaoF/LQrotd1OAervoSh54XryDf9JNrPpNGeT8+CLVp S+oLYSog==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:57908) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1qtS8Y-00072G-24; Thu, 19 Oct 2023 13:28:26 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1qtS8Z-0000Rd-Tt; Thu, 19 Oct 2023 13:28:27 +0100 Date: Thu, 19 Oct 2023 13:28:27 +0100 From: "Russell King (Oracle)" To: Conor Dooley Cc: Rob Herring , Linus Walleij , 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: 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-repacking-scrunch-f2435c2fd7e8@spud> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231019-repacking-scrunch-f2435c2fd7e8@spud> Sender: Russell King (Oracle) X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,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 agentk.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 (agentk.vger.email [0.0.0.0]); Thu, 19 Oct 2023 05:28:44 -0700 (PDT) On Thu, Oct 19, 2023 at 01:03:41PM +0100, Conor Dooley wrote: > On Wed, Oct 18, 2023 at 05:32:48AM -0500, Rob Herring wrote: > > > > 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. > > > > > > 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=-m dt_binding_check' > > on your patch (DT_CHECKER_FLAGS is new in v5.13): > > > > yamllint warnings/errors: > > ./Documentation/devicetree/bindings/net/dsa/dsa.yaml:60:7: [warning] wrong indentation: expected 8 but found 6 (indentation) > > ./Documentation/devicetree/bindings/net/dsa/dsa.yaml:62:7: [warning] wrong indentation: expected 8 but found 6 (indentation) > > > > dtschema/dtc warnings/errors: > > Traceback (most recent call last): > > File "/usr/local/bin/dt-doc-validate", line 64, in > > ret |= check_doc(f) > > ^^^^^^^^^^^^ > > File "/usr/local/bin/dt-doc-validate", line 32, in check_doc > > for error in sorted(dtsch.iter_errors(), key=lambda 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 = 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:oneOf: [{'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 > diff --git a/Documentation/devicetree/bindings/net/dsa/dsa.yaml b/Documentation/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 > > - oneOf: > - - required: > - - ports > - - required: > - - ethernet-ports > +oneOf: > + - required: > + - ports > + - required: > + - ethernet-ports > > ... > > resolves both issues, but the older version of dt-schema definitely had > better error reporting in this case! And now I'm even more confused... your example in your other reply had six spaces before "- ports" and "- ethernet-ports" but here you're using four spaces. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!