Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1281855rwb; Thu, 1 Dec 2022 15:12:05 -0800 (PST) X-Google-Smtp-Source: AA0mqf7j70kinmQXaSzkfOy0MS0djFVvDW4PNz5bLqrMVgK3E2VQcOsWaKLfipzRi0tD65+Fea9S X-Received: by 2002:a05:6402:2025:b0:46b:b19a:252e with SMTP id ay5-20020a056402202500b0046bb19a252emr8907055edb.188.1669936325037; Thu, 01 Dec 2022 15:12:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669936325; cv=none; d=google.com; s=arc-20160816; b=pP4vP3tZuFZJ9VejpoT5MRHLUev4U04E1a+IDplY1hULdhKt7IPAjEdrTsLKvnZo+d N0+kcEYfzJ9bU31n/MHkr3mYmg6iyyCbJWVbiL8KY4gX+SgHRSn5utnov7rlCJ11rcYU LHyh8bwvDPEp+JDfONOCnEudziaL/KR7vTBA3urPadHypFKo/Gl9s7lRXTcHFsawOLfs xG/Cu5+le0+MeDoNYLPLVRRwLbpDsdJTc6z3T2yftZQH0WCAb6UmNNzEcBMzVM3E73pC mrBX3YmmiI/gY7QvzT9Ug+FL50ZFA/1x4zeawJVxgAHy/SizcBCDl58cEEURp2MtaGfs 0c4g== 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; bh=3XoZ57KQ2t8KQq59VcUGCIObJJ9YFC3Bj9uQynJzeWk=; b=C98PKzC6irEIv5Lx+WYS+iJf5iSBU/4pWZ9PxtSe4Y6NItAklZr4m8JyDNXQmLiKbE UYTNYb97SKYPlGPn/R4WUQLELsd2we8xZSAS5zkVR0qJ7/1m7fjloWZ6vfOu+2IMODrV txFLNB8NS4I9iF6Qg/u8doGfQKNvSWAp9n7Mj15t3vEKrhi7BHBhEO5fjTEUEk0FgMyS dJDcSvh/N6fCcnkpJznxRHjDnaEh5J0Apq/9tBZejV6MIw1U9jLHgW62jJagH+iqMvPV xV4GlBWNLQQGB2pcXqmBLholjYeOhRZcIR9UerRUpDfMhQHqsCjpim1lt7Ubzd+iv4Wr rE0g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id be8-20020a1709070a4800b0073d5f9aa5e9si366627ejc.327.2022.12.01.15.11.45; Thu, 01 Dec 2022 15:12:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231342AbiLAWdR (ORCPT + 81 others); Thu, 1 Dec 2022 17:33:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51356 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229773AbiLAWdO (ORCPT ); Thu, 1 Dec 2022 17:33:14 -0500 Received: from mail-oi1-f171.google.com (mail-oi1-f171.google.com [209.85.167.171]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4643355AA0; Thu, 1 Dec 2022 14:33:12 -0800 (PST) Received: by mail-oi1-f171.google.com with SMTP id n205so3616683oib.1; Thu, 01 Dec 2022 14:33:12 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=3XoZ57KQ2t8KQq59VcUGCIObJJ9YFC3Bj9uQynJzeWk=; b=OrFp+q9RYDcxNJSGmPBiAFyIE/I37hOn9ENTizHxhEqliMSqisQgqFFkeplOSFdGSK 9rP8jDc7SK9POFnQuTxI9u2lG64hMtarzWn8GtXvvWirdIx0ELqT13nmcC/aRc3MMw/q rfCX8vPlL6RTJ1Co0UMRRGq7+9Vjx3axobbxMDmsOnBj3E9lvod154OUlEMRBz181OS4 zUKeCIgdaTQb4yBBPNXtjcTWVgdZvHcsNvmhWc0Ad2r7Zl5h55KOv99dOBdz4ya86fSg NDVMSjke09GrmvrpLYOU5EIf7GJ9Gw8WQX1SxzEwvMrX1Jzg4Cvi4MdCA0H3qZyAV8+P djjg== X-Gm-Message-State: ANoB5plD/DtDpXdboNmjnI9lP83iTs1xbg+H7EmM2tmUGxq+ddH360bQ 7Q9HnTSM0CeXpZS9AxeKKQ== X-Received: by 2002:aca:1e05:0:b0:354:2c4e:bc6e with SMTP id m5-20020aca1e05000000b003542c4ebc6emr35484670oic.85.1669933991378; Thu, 01 Dec 2022 14:33:11 -0800 (PST) Received: from robh_at_kernel.org (66-90-144-107.dyn.grandenetworks.net. [66.90.144.107]) by smtp.gmail.com with ESMTPSA id b19-20020a9d6b93000000b0066c34486aa7sm2593598otq.73.2022.12.01.14.33.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Dec 2022 14:33:10 -0800 (PST) Received: (nullmailer pid 1565634 invoked by uid 1000); Thu, 01 Dec 2022 22:33:09 -0000 Date: Thu, 1 Dec 2022 16:33:09 -0600 From: Rob Herring To: Colin Foster Cc: linux-renesas-soc@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, netdev@vger.kernel.org, John Crispin , Alexandre Belloni , Claudiu Manoil , Marek Vasut , Sean Wang , DENG Qingfang , Landen Chao , =?UTF-8?B?bsOnIMOcTkFM?= , Vivien Didelot , =?UTF-8?B?Q2zDqW1lbnQgTMOpZ2Vy?= , =?UTF-8?Q?Alvin_=C5=A0ipraga?= , Linus Walleij , UNGLinuxDriver@microchip.com, Woojung Huh , Matthias Brugger , Kurt Kanzenbach , Krzysztof Kozlowski , Paolo Abeni , Jakub Kicinski , Eric Dumazet , "David S. Miller" , Vladimir Oltean , Florian Fainelli , Andrew Lunn , George McCollister Subject: Re: [PATCH v3 net-next 04/10] dt-bindings: net: dsa: allow additional ethernet-port properties Message-ID: <20221201223309.GA1555093-robh@kernel.org> References: <20221127224734.885526-1-colin.foster@in-advantage.com> <20221127224734.885526-5-colin.foster@in-advantage.com> <20221128232759.GB1513198-robh@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00, FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 28, 2022 at 11:21:18PM -0800, Colin Foster wrote: > On Mon, Nov 28, 2022 at 05:27:59PM -0600, Rob Herring wrote: > > On Sun, Nov 27, 2022 at 02:47:28PM -0800, Colin Foster wrote: > > > Explicitly allow additional properties for both the ethernet-port and > > > ethernet-ports properties. This specifically will allow the qca8k.yaml > > > binding to use shared properties. > > > > > > Signed-off-by: Colin Foster > > > --- > > > > > > v2 -> v3 > > > * No change > > > > > > v1 -> v2 > > > * New patch > > > > > > --- > > > Documentation/devicetree/bindings/net/dsa/dsa.yaml | 4 +++- > > > 1 file changed, 3 insertions(+), 1 deletion(-) > > > > > > diff --git a/Documentation/devicetree/bindings/net/dsa/dsa.yaml b/Documentation/devicetree/bindings/net/dsa/dsa.yaml > > > index bd1f0f7c14a8..87475c2ab092 100644 > > > --- a/Documentation/devicetree/bindings/net/dsa/dsa.yaml > > > +++ b/Documentation/devicetree/bindings/net/dsa/dsa.yaml > > > @@ -38,6 +38,8 @@ patternProperties: > > > '#size-cells': > > > const: 0 > > > > > > + additionalProperties: true > > > + > > > > Where then do we restrict adding properties to ethernet-ports nodes? > > > > > patternProperties: > > > "^(ethernet-)?port@[0-9]+$": > > > type: object > > > @@ -45,7 +47,7 @@ patternProperties: > > > > > > $ref: dsa-port.yaml# > > > > > > - unevaluatedProperties: false > > > + unevaluatedProperties: true > > > > Same question for ethernet-port nodes. > > For ethernet-port nodes, the qca8k has unevaluatedProperties: false. But > the fact that you're asking this question means I probably misunderstood > something... The above is the case where you aren't adding extra properties (IIRC), so 'unevaluatedProperties: false' should be correct. 'unevaluatedProperties: true' is never correct in bindings. If you ref a schema that sets it to true, you can't override it. So qca8k, should reference dsa-port.yaml, define its extra properties and set 'unevaluatedProperties: false'. > For the ethernet-ports node, I'm curious if my other follow-up answers > that question where I realized dsa.yaml should, under the base > definition, have additionalPrpoerties: false. But again, my guess is > that isn't the case. That one looks correct. Rob