[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y6S5Ple5SURq0QSU@colin-ia-desktop>
Date: Thu, 22 Dec 2022 12:08:30 -0800
From: Colin Foster <colin.foster@...advantage.com>
To: Rob Herring <robh@...nel.org>
Cc: Arınç ÜNAL <arinc.unal@...nc9.com>,
linux-renesas-soc@...r.kernel.org,
linux-mediatek@...ts.infradead.org,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
devicetree@...r.kernel.org, netdev@...r.kernel.org,
John Crispin <john@...ozen.org>,
Alexandre Belloni <alexandre.belloni@...tlin.com>,
Claudiu Manoil <claudiu.manoil@....com>,
Marek Vasut <marex@...x.de>,
Sean Wang <sean.wang@...iatek.com>,
DENG Qingfang <dqfext@...il.com>,
Landen Chao <Landen.Chao@...iatek.com>,
Vivien Didelot <vivien.didelot@...il.com>,
Clément Léger <clement.leger@...tlin.com>,
Alvin Šipraga <alsi@...g-olufsen.dk>,
Linus Walleij <linus.walleij@...aro.org>,
UNGLinuxDriver@...rochip.com,
Woojung Huh <woojung.huh@...rochip.com>,
Matthias Brugger <matthias.bgg@...il.com>,
Kurt Kanzenbach <kurt@...utronix.de>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
Paolo Abeni <pabeni@...hat.com>,
Jakub Kicinski <kuba@...nel.org>,
Eric Dumazet <edumazet@...gle.com>,
"David S. Miller" <davem@...emloft.net>,
Vladimir Oltean <olteanv@...il.com>,
Florian Fainelli <f.fainelli@...il.com>,
Andrew Lunn <andrew@...n.ch>,
George McCollister <george.mccollister@...il.com>
Subject: Re: [PATCH v5 net-next 04/10] dt-bindings: net: dsa: utilize base
definitions for standard dsa switches
On Mon, Dec 12, 2022 at 10:55:19AM -0800, Colin Foster wrote:
> Hi Rob, Arınç,
>
> On Mon, Dec 12, 2022 at 10:51:47AM -0600, Rob Herring wrote:
> > On Mon, Dec 12, 2022 at 12:28:06PM +0300, Arınç ÜNAL wrote:
> > > On 10.12.2022 21:02, Colin Foster wrote:
> > > > Hi Arınç,
> > > > On Sat, Dec 10, 2022 at 07:24:42PM +0300, Arınç ÜNAL wrote:
> > > > > On 10.12.2022 06:30, Colin Foster wrote:
> > > > --- a/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
> > > > +++ b/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yam
> > > > @@ -156,8 +156,7 @@ patternProperties:
> > > >
> > > > patternProperties:
> > > > "^(ethernet-)?port@[0-9]+$":
> > > > - type: object
> > > > -
> > > > + $ref: dsa-port.yaml#
> > > > properties:
> > > > reg:
> > > > description:
> > > > @@ -165,7 +164,6 @@ patternProperties:
> > > > for user ports.
> > > >
> > > > allOf:
> > > > - - $ref: dsa-port.yaml#
> > > > - if:
> > > > required: [ ethernet ]
> > > > then:
> > > >
> > > >
> > > >
> > > > This one has me [still] scratching my head...
> > >
> > > Right there with you. In addition to this, having or deleting type object
> > > on/from "^(ethernet-)?ports$" and "^(ethernet-)?port@[0-9]+$" on dsa.yaml
> > > doesn't cause any warnings (checked with make dt_binding_check
> > > DT_SCHEMA_FILES=net/dsa) which makes me question why it's there in the first
> > > place.
> >
> >
> > That check probably doesn't consider an ref being under an 'allOf'.
> > Perhaps what is missing in understanding is every schema at the
> > top-level has an implicit 'type: object'. But nothing is ever implicit
> > in json-schema which will silently ignore keywords which don't make
> > sense for an instance type. Instead of a bunch of boilerplate, the
> > processed schema has 'type' added in lots of cases such as this one.
> >
> > Rob
>
> What do you suggest on this set? I think this is the only outstanding
> issue, and Jakub brought up the possibility of applying end of today
> (maybe 5-6 hours from now in the US).
>
> It seems like there's an issue with the dt_bindings_check that causes
> the "allOf: $ref" to throw a warning when it shouldn't. So removing the
> "type: object" was supposed to be correct, but throws warnings.
>
> It seems like keeping this patch as-is and updating it when the check
> gets fixed might be an acceptable path, but I'd understand if you
> disagree and prefer a resubmission.
Heads up on my plan for this. I plan to re-submit this on Monday after
the merge window with the change where I move the $ref: dsa-port.yaml#
to outside the allOf: section, and remove the object type as the above
code suggests. Hopefully that's the right step to take.
Powered by blists - more mailing lists