Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp2774870rdg; Mon, 16 Oct 2023 14:46:06 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGTnARzupMuE5SLwi2VFkX9fZmtFVQf27AyymIYd7eCmLLqgrvpBvgha/V/Pp0oc7WE0nGa X-Received: by 2002:a17:90b:3587:b0:27c:efe3:89dc with SMTP id mm7-20020a17090b358700b0027cefe389dcmr362291pjb.14.1697492766222; Mon, 16 Oct 2023 14:46:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697492766; cv=none; d=google.com; s=arc-20160816; b=eNK9gxVhp2dBTz0x22jhEDKympFkqqlgXSdoNWxYnv6fq9TBpHAw5pnBsVOjCuDI5x EVUnuIAN4CmG0mZZJjPTXfd0P8/C4sGW84093TD5j/qaqZViTfuzP8ob0rf0TmjwH8iD ng8U1wIOt052fN+LB80SSAPKUtgD0HRU1Z7qUVSYBEnpKyBl3AGuOpoZtrLFLRlqeDtZ Y9GiZI3dliqIGgIBl40a8PUUDiYHENuZRoTgta1igzoBAGj9QYeTTHYs7IxAFtXcBewm HWjedZPIX3Wwj+L4+hGBEx1qfYFLbzICooQudNnQWqw1QGhAKj9zjHuf4E0a2+qEFeyA fz5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from; bh=RjGwCRfeJ6jyUkUfij15uJxe6Br0BrgfpLSpLSGPlOQ=; fh=W75KIt5z29NZQuSJpsWFLRgwoWVSDt7JDSz2XKjQ91Y=; b=WHr9Ml6LEhaDrIX5cK3mCkrXuzbrJOHlfEb6K3a56VZQKjkashNht8EA6VKVRaZutJ 0VHmqi7egrfR8cx/dpuN6xxKc0npZCXQQub/8WW5Yx7F2EzNOJXwu+36vIzOQc9vraDs xQulNhQu5QXuKFZkhQTF9ceviA+RaQR925j5Pkn5ywiWJ+hSOox/qmC8qHOP3ExwZ7td z1wq6PC5d/4dwPlvXc1ae72UKmOp2Lsr2SHcnzEk4qXCwXiiX01y4BR7PZEl29N5mdOx lGbkFwrAB9qLPLnLwCFr58bCrJVxCMDaCsr/c1MlAi25CmjYVWjCJiocYDr2GkUbjT7J o9Sw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 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 lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id 19-20020a17090a1a5300b0027d559a84aasi155215pjl.154.2023.10.16.14.46.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Oct 2023 14:46:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 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 lipwig.vger.email (Postfix) with ESMTP id 95E51807C758; Mon, 16 Oct 2023 14:45:06 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234260AbjJPVo6 (ORCPT + 99 others); Mon, 16 Oct 2023 17:44:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45076 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234222AbjJPVow (ORCPT ); Mon, 16 Oct 2023 17:44:52 -0400 Received: from mail-oi1-f180.google.com (mail-oi1-f180.google.com [209.85.167.180]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 33496AC; Mon, 16 Oct 2023 14:44:50 -0700 (PDT) Received: by mail-oi1-f180.google.com with SMTP id 5614622812f47-3af608eb34bso3141374b6e.1; Mon, 16 Oct 2023 14:44:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697492689; x=1698097489; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=RjGwCRfeJ6jyUkUfij15uJxe6Br0BrgfpLSpLSGPlOQ=; b=qOUv+KLTDvJAV9s3tT6OVQBoQC6q01XK8pSkRiJ0+srqDTcqpU9WXljJ9oRVzj1FiC J/qc2SrR/k851nuTHhxWVxz1Jbxmf0u2I0XTP3JN9XMBvOd1W/4JSVISSBiBKtnCaOom zuB3fXNj2UQ3/QaTx0QgSywtVwHS9Yq5K191vKKR63KnvZsaGBt/wIAvEmfW8HB1EOWz QHpJ+s2IFnmq9fry2JIS28PzlMj157a7rEQFRM7SUTUX1uVIaBuOkZ7rMc5tsG0ZiVGh yXNXFqD7wMBC7CX/ketAKJnItbEyvkbnlxKcTmgOCcQPv9l7qNn4TSeQNRhg1+Nj9pyf NuKQ== X-Gm-Message-State: AOJu0Ywg0C4dtVgfUb2J5vcOO/7d1ll0UCqBKPmxA7E0cf6YeFKGoHG5 N1ma8tMsm9zDETb6uqwW/g== X-Received: by 2002:a54:478c:0:b0:3a8:80ea:f0c6 with SMTP id o12-20020a54478c000000b003a880eaf0c6mr591052oic.29.1697492689379; Mon, 16 Oct 2023 14:44:49 -0700 (PDT) Received: from robh_at_kernel.org (66-90-144-107.dyn.grandenetworks.net. [66.90.144.107]) by smtp.gmail.com with ESMTPSA id x10-20020a05680801ca00b003adfc72ed20sm31622oic.17.2023.10.16.14.44.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Oct 2023 14:44:48 -0700 (PDT) Received: (nullmailer pid 3823210 invoked by uid 1000); Mon, 16 Oct 2023 21:44:35 -0000 From: Rob Herring Date: Mon, 16 Oct 2023 16:44:20 -0500 Subject: [PATCH net-next 1/8] dt-bindings: net: Add missing (unevaluated|additional)Properties on child node schemas MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20231016-dt-net-cleanups-v1-1-a525a090b444@kernel.org> References: <20231016-dt-net-cleanups-v1-0-a525a090b444@kernel.org> In-Reply-To: <20231016-dt-net-cleanups-v1-0-a525a090b444@kernel.org> To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Krzysztof Kozlowski , Conor Dooley , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Andrew Lunn , Florian Fainelli , Vladimir Oltean , Matthias Brugger , AngeloGioacchino Del Regno , Woojung Huh , UNGLinuxDriver@microchip.com, Linus Walleij , =?UTF-8?Q?Alvin_=C5=A0ipraga?= , =?UTF-8?B?Q2zDqW1lbnQgTMOpZ2Vy?= , Geert Uytterhoeven , Magnus Damm , Maxime Ripard , =?UTF-8?B?bsOnIMOcTkFM?= , Landen Chao , DENG Qingfang , Sean Wang , Daniel Golle , John Crispin , Gerhard Engleder , Heiner Kallweit , Sergey Shtylyov , Sergei Shtylyov , Justin Chen , Florian Fainelli , Grygorii Strashko , Sekhar Nori , Claudiu Manoil , Alexandre Belloni Cc: Vladimir Oltean , netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-renesas-soc@vger.kernel.org, bcm-kernel-feedback-list@broadcom.com X-Mailer: b4 0.13-dev X-Spam-Status: No, score=-1.0 required=5.0 tests=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 lipwig.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 (lipwig.vger.email [0.0.0.0]); Mon, 16 Oct 2023 14:45:06 -0700 (PDT) Just as unevaluatedProperties or additionalProperties are required at the top level of schemas, they should (and will) also be required for child node schemas. That ensures only documented properties are present for any node. Add unevaluatedProperties or additionalProperties as appropriate. Signed-off-by: Rob Herring --- .../devicetree/bindings/net/allwinner,sun8i-a83t-emac.yaml | 2 ++ Documentation/devicetree/bindings/net/dsa/brcm,sf2.yaml | 1 + Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml | 2 ++ .../devicetree/bindings/net/dsa/microchip,lan937x.yaml | 1 + Documentation/devicetree/bindings/net/dsa/nxp,sja1105.yaml | 2 ++ Documentation/devicetree/bindings/net/dsa/qca8k.yaml | 1 + Documentation/devicetree/bindings/net/dsa/realtek.yaml | 2 ++ .../devicetree/bindings/net/dsa/renesas,rzn1-a5psw.yaml | 10 ++-------- Documentation/devicetree/bindings/net/engleder,tsnep.yaml | 1 + Documentation/devicetree/bindings/net/nxp,tja11xx.yaml | 1 + 10 files changed, 15 insertions(+), 8 deletions(-) diff --git a/Documentation/devicetree/bindings/net/allwinner,sun8i-a83t-emac.yaml b/Documentation/devicetree/bindings/net/allwinner,sun8i-a83t-emac.yaml index 4bfac9186886..7fe0352dff0f 100644 --- a/Documentation/devicetree/bindings/net/allwinner,sun8i-a83t-emac.yaml +++ b/Documentation/devicetree/bindings/net/allwinner,sun8i-a83t-emac.yaml @@ -158,6 +158,8 @@ allOf: patternProperties: "^ethernet-phy@[0-9a-f]$": type: object + $ref: ethernet-phy.yaml# + unevaluatedProperties: false description: Integrated PHY node diff --git a/Documentation/devicetree/bindings/net/dsa/brcm,sf2.yaml b/Documentation/devicetree/bindings/net/dsa/brcm,sf2.yaml index b06c416893ff..f21bdd0f408d 100644 --- a/Documentation/devicetree/bindings/net/dsa/brcm,sf2.yaml +++ b/Documentation/devicetree/bindings/net/dsa/brcm,sf2.yaml @@ -78,6 +78,7 @@ properties: ports: type: object + additionalProperties: true patternProperties: '^port@[0-9a-f]$': diff --git a/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml b/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml index e532c6b795f4..20f7ba4e2203 100644 --- a/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml +++ b/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml @@ -154,10 +154,12 @@ properties: patternProperties: "^(ethernet-)?ports$": type: object + additionalProperties: true patternProperties: "^(ethernet-)?port@[0-9]+$": type: object + additionalProperties: true properties: reg: diff --git a/Documentation/devicetree/bindings/net/dsa/microchip,lan937x.yaml b/Documentation/devicetree/bindings/net/dsa/microchip,lan937x.yaml index 8d7e878b84dc..6a4d90d550b6 100644 --- a/Documentation/devicetree/bindings/net/dsa/microchip,lan937x.yaml +++ b/Documentation/devicetree/bindings/net/dsa/microchip,lan937x.yaml @@ -37,6 +37,7 @@ properties: patternProperties: "^(ethernet-)?ports$": + additionalProperties: true patternProperties: "^(ethernet-)?port@[0-9]+$": allOf: diff --git a/Documentation/devicetree/bindings/net/dsa/nxp,sja1105.yaml b/Documentation/devicetree/bindings/net/dsa/nxp,sja1105.yaml index 4d5f5cc6d031..d179c6971193 100644 --- a/Documentation/devicetree/bindings/net/dsa/nxp,sja1105.yaml +++ b/Documentation/devicetree/bindings/net/dsa/nxp,sja1105.yaml @@ -43,6 +43,7 @@ properties: # PHY 1. mdios: type: object + additionalProperties: false properties: '#address-cells': @@ -74,6 +75,7 @@ properties: patternProperties: "^(ethernet-)?ports$": + additionalProperties: true patternProperties: "^(ethernet-)?port@[0-9]+$": allOf: diff --git a/Documentation/devicetree/bindings/net/dsa/qca8k.yaml b/Documentation/devicetree/bindings/net/dsa/qca8k.yaml index df64eebebe18..167398ab253a 100644 --- a/Documentation/devicetree/bindings/net/dsa/qca8k.yaml +++ b/Documentation/devicetree/bindings/net/dsa/qca8k.yaml @@ -73,6 +73,7 @@ $ref: dsa.yaml# patternProperties: "^(ethernet-)?ports$": type: object + additionalProperties: true patternProperties: "^(ethernet-)?port@[0-6]$": type: object diff --git a/Documentation/devicetree/bindings/net/dsa/realtek.yaml b/Documentation/devicetree/bindings/net/dsa/realtek.yaml index cfd69c2604ea..cce692f57b08 100644 --- a/Documentation/devicetree/bindings/net/dsa/realtek.yaml +++ b/Documentation/devicetree/bindings/net/dsa/realtek.yaml @@ -68,6 +68,8 @@ properties: interrupt-controller: type: object + additionalProperties: false + description: | This defines an interrupt controller with an IRQ line (typically a GPIO) that will demultiplex and handle the interrupt from the single diff --git a/Documentation/devicetree/bindings/net/dsa/renesas,rzn1-a5psw.yaml b/Documentation/devicetree/bindings/net/dsa/renesas,rzn1-a5psw.yaml index 833d2f68daa1..ea285ef3e64f 100644 --- a/Documentation/devicetree/bindings/net/dsa/renesas,rzn1-a5psw.yaml +++ b/Documentation/devicetree/bindings/net/dsa/renesas,rzn1-a5psw.yaml @@ -61,17 +61,11 @@ properties: ethernet-ports: type: object - properties: - '#address-cells': - const: 1 - '#size-cells': - const: 0 - + additionalProperties: true patternProperties: "^(ethernet-)?port@[0-4]$": type: object - description: Ethernet switch ports - + additionalProperties: true properties: pcs-handle: maxItems: 1 diff --git a/Documentation/devicetree/bindings/net/engleder,tsnep.yaml b/Documentation/devicetree/bindings/net/engleder,tsnep.yaml index 82a5d7927ca4..34fd24ff6a71 100644 --- a/Documentation/devicetree/bindings/net/engleder,tsnep.yaml +++ b/Documentation/devicetree/bindings/net/engleder,tsnep.yaml @@ -63,6 +63,7 @@ properties: mdio: type: object $ref: mdio.yaml# + unevaluatedProperties: false description: optional node for embedded MDIO controller required: diff --git a/Documentation/devicetree/bindings/net/nxp,tja11xx.yaml b/Documentation/devicetree/bindings/net/nxp,tja11xx.yaml index ab8867e6939b..85bfa45f5122 100644 --- a/Documentation/devicetree/bindings/net/nxp,tja11xx.yaml +++ b/Documentation/devicetree/bindings/net/nxp,tja11xx.yaml @@ -20,6 +20,7 @@ allOf: patternProperties: "^ethernet-phy@[0-9a-f]+$": type: object + additionalProperties: false description: | Some packages have multiple PHYs. Secondary PHY should be defines as subnode of the first (parent) PHY. -- 2.42.0