public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH net-next v1 07/10] net: dsa: microchip: warn about not supported synclko properties on KSZ9893 chips
       [not found]               ` <YvgMnfSkEeD8jwIG@lunn.ch>
@ 2022-08-14  4:26                 ` Oleksij Rempel
  2022-08-14  8:04                   ` Vladimir Oltean
  0 siblings, 1 reply; 2+ messages in thread
From: Oleksij Rempel @ 2022-08-14  4:26 UTC (permalink / raw)
  To: Andrew Lunn
  Cc: Woojung Huh, Florian Fainelli, David S. Miller, netdev,
	linux-kernel, UNGLinuxDriver, Eric Dumazet, Vladimir Oltean,
	kernel, Jakub Kicinski, Paolo Abeni, Vivien Didelot, Rob Herring,
	devicetree

Ccing Rob Herring.

On Sat, Aug 13, 2022 at 10:42:05PM +0200, Andrew Lunn wrote:
> On Sat, Aug 13, 2022 at 06:18:50PM +0200, Oleksij Rempel wrote:
> > On Sat, Aug 13, 2022 at 05:11:45PM +0200, Andrew Lunn wrote:
> > > On Sat, Aug 13, 2022 at 04:32:15PM +0200, Oleksij Rempel wrote:
> > > > On Fri, Aug 05, 2022 at 04:42:34PM +0300, Vladimir Oltean wrote:
> > > > > On Fri, Aug 05, 2022 at 01:56:01PM +0200, Oleksij Rempel wrote:
> > > > > > Hm, if we will have any random not support OF property in the switch
> > > > > > node. We won't be able to warn about it anyway. So, if it is present
> > > > > > but not supported, we will just ignore it.
> > > > > > 
> > > > > > I'll drop this patch.
> > > > > 
> > > > > To continue, I think the right way to go about this is to edit the
> > > > > dt-schema to say that these properties are only applicable to certain
> > > > > compatible strings, rather than for all. Then due to the
> > > > > "unevaluatedProperties: false", you'd get the warnings you want, at
> > > > > validation time.
> > > > 
> > > > Hm, with "unevaluatedProperties: false" i have no warnings. Even if I
> > > > create examples with random strings as properties. Are there some new
> > > > json libraries i should use?
> > > 
> > > Try
> > > 
> > > additionalProperties: False
> > 
> > Yes, it works. But in this case I'll do more changes. Just wont to make
> > sure I do not fix not broken things.
> 
> I've been working on converting some old SoCs bindings from .txt to
> .yaml. My observations is that the yaml is sometimes more restrictive
> than what the drivers actually imposes. So you might need to change
> perfectly working .dts files to get it warning free. Or you just
> accept the warnings and move on. At lot will depend on the number of
> warnings and how easy it is to see real problems mixed in with
> warnings you never intend to fix.

Heh :) Currently with "unevaluatedProperties: false" restrictions do not
work at all. At least for me. For example with this change I have no
warnings:
diff --git a/Documentation/devicetree/bindings/net/dsa/nxp,sja1105.yaml b/Documentation/devicetree/bindings/net/dsa/nxp,sja1105.yaml
index 1e26d876d1463..da38ad98a152f 100644
--- a/Documentation/devicetree/bindings/net/dsa/nxp,sja1105.yaml
+++ b/Documentation/devicetree/bindings/net/dsa/nxp,sja1105.yaml
@@ -120,6 +120,7 @@ examples:
             ethernet-switch@1 {
                     reg = <0x1>;
                     compatible = "nxp,sja1105t";
+                    something-random-here;
 
                     ethernet-ports {
                             #address-cells = <1>;

make dt_binding_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/net/dsa/nxp,sja1105.yaml

So the main question is, is it broken for all or just for me? If it is
just me, what i'm doing wrong?

Regards,
Oleksij
-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH net-next v1 07/10] net: dsa: microchip: warn about not supported synclko properties on KSZ9893 chips
  2022-08-14  4:26                 ` [PATCH net-next v1 07/10] net: dsa: microchip: warn about not supported synclko properties on KSZ9893 chips Oleksij Rempel
@ 2022-08-14  8:04                   ` Vladimir Oltean
  0 siblings, 0 replies; 2+ messages in thread
From: Vladimir Oltean @ 2022-08-14  8:04 UTC (permalink / raw)
  To: Oleksij Rempel
  Cc: Andrew Lunn, Woojung Huh, Florian Fainelli, David S. Miller,
	netdev, linux-kernel, UNGLinuxDriver, Eric Dumazet, kernel,
	Jakub Kicinski, Paolo Abeni, Vivien Didelot, Rob Herring,
	devicetree

On Sun, Aug 14, 2022 at 06:26:08AM +0200, Oleksij Rempel wrote:
> Heh :) Currently with "unevaluatedProperties: false" restrictions do not
> work at all. At least for me. For example with this change I have no
> warnings:
> diff --git a/Documentation/devicetree/bindings/net/dsa/nxp,sja1105.yaml b/Documentation/devicetree/bindings/net/dsa/nxp,sja1105.yaml
> index 1e26d876d1463..da38ad98a152f 100644
> --- a/Documentation/devicetree/bindings/net/dsa/nxp,sja1105.yaml
> +++ b/Documentation/devicetree/bindings/net/dsa/nxp,sja1105.yaml
> @@ -120,6 +120,7 @@ examples:
>              ethernet-switch@1 {
>                      reg = <0x1>;
>                      compatible = "nxp,sja1105t";
> +                    something-random-here;
>  
>                      ethernet-ports {
>                              #address-cells = <1>;
> 
> make dt_binding_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/net/dsa/nxp,sja1105.yaml
> 
> So the main question is, is it broken for all or just for me? If it is
> just me, what i'm doing wrong?

Might it be due to the additionalProperties: true from spi-peripheral-props.yaml?

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-08-14  8:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20220729130346.2961889-1-o.rempel@pengutronix.de>
     [not found] ` <20220729130346.2961889-8-o.rempel@pengutronix.de>
     [not found]   ` <20220802113633.73rxlb2kmihivwpx@skbuf>
     [not found]     ` <20220805115601.GB10667@pengutronix.de>
     [not found]       ` <20220805134234.ps4qfjiachzm7jv4@skbuf>
     [not found]         ` <20220813143215.GA12534@pengutronix.de>
     [not found]           ` <Yve/MSMc/4klJPFL@lunn.ch>
     [not found]             ` <20220813161850.GB12534@pengutronix.de>
     [not found]               ` <YvgMnfSkEeD8jwIG@lunn.ch>
2022-08-14  4:26                 ` [PATCH net-next v1 07/10] net: dsa: microchip: warn about not supported synclko properties on KSZ9893 chips Oleksij Rempel
2022-08-14  8:04                   ` Vladimir Oltean

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox