All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rob Herring <robh@kernel.org>
To: Vladimir Oltean <vladimir.oltean@nxp.com>
Cc: Conor Dooley <conor@kernel.org>,
	sashiko-reviews@lists.linux.dev, vkoul@kernel.org,
	neil.armstrong@linaro.org, conor+dt@kernel.org,
	linux-phy@lists.infradead.org, devicetree@vger.kernel.org,
	olteanv@gmail.com
Subject: Re: [PATCH v3 phy-next 14/16] dt-bindings: phy: lynx-10g: initial document
Date: Fri, 5 Jun 2026 15:24:58 -0500	[thread overview]
Message-ID: <20260605202458.GA6304-robh@kernel.org> (raw)
In-Reply-To: <20260605083737.yryq2a763zhnkjyq@skbuf>

On Fri, Jun 05, 2026 at 11:37:37AM +0300, Vladimir Oltean wrote:
> On Wed, Jun 03, 2026 at 04:50:39PM +0100, Conor Dooley wrote:
> > On Wed, Jun 03, 2026 at 04:38:25PM +0300, Vladimir Oltean wrote:
> > > On Wed, Jun 03, 2026 at 01:33:50PM +0000, sashiko-bot@kernel.org wrote:
> > > > Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
> > > > - [Medium] The `if` condition for enforcing the `big-endian` property incorrectly matches the `compatible` string array directly against an `enum`, which will always evaluate to false and cause the requirement to silently fail.
> > > > --
> > > > 
> > > > commit 8bd3982a89722b20a3686e42d4ab3b9f0711ae11
> > > > Author: Vladimir Oltean <vladimir.oltean@nxp.com>
> > > > 
> > > > dt-bindings: phy: lynx-10g: initial document
> > > > 
> > > > This commit adds the schema for the 10G Lynx SerDes used on most QorIQ and
> > > > Layerscape SoCs. It defines the valid compatible strings, PHY cell requirements,
> > > > and enforces SoC-specific constraints such as lane counts and endianness.
> > > > 
> > > > > diff --git a/Documentation/devicetree/bindings/phy/fsl,lynx-10g.yaml b/Documentation/devicetree/bindings/phy/fsl,lynx-10g.yaml
> > > > > new file mode 100644
> > > > > index 0000000000000..8cf6027a75b91
> > > > > --- /dev/null
> > > > > +++ b/Documentation/devicetree/bindings/phy/fsl,lynx-10g.yaml
> > > > > +  - if:
> > > > > +      properties:
> > > > > +        compatible:
> > > > > +          enum:
> > > > > +            - fsl,ls1046a-serdes1
> > > > > +            - fsl,ls1046a-serdes2
> > > > 
> > > > [Severity: Medium]
> > > > Does this conditional correctly enforce the big-endian property? 
> > > > 
> > > > Since the compatible property is a string array in device trees, evaluating it
> > > > directly against an enum always returns false. Should this use "contains:" 
> > > > with the enum, similar to the preceding if block, so dt_binding_check 
> > > > correctly enforces the requirement?
> > > 
> > > The tests I did suggest that it does enforce the requirement.
> > 
> > Yeah, sashiko just doesn't understand how this works without "contains".
> > "contains" is only actually required for validation purposes if there's
> > fallback compatibles and you're trying to get a partial match.

Not exactly. The missing part is the schema is fixed up so the above is 
converted to:

compatible:
  minItems: 1
  maxItems: 1
  items:
     - enum:
         - fsl,ls1046a-serdes1
         - fsl,ls1046a-serdes2

If we didn't do that, the above is not what we want here, but 'contains' 
is as that's the loosest condition and works regardless of how many 
entries compatible has. That's what you should do here.

This fixup used to be a lot more widespread when we used the DT YAML 
format and everything was decoded to an an array or matrix. The fixups 
saved a lot of boilerplate. That's less true now, so maybe getting rid 
of more fixups like this case would be better.

> Yeah, I have no clear understanding of the json-schema syntax either, I
> just copied from another place where it was clear that the intention was
> to have multiple matches on nodes having a single compatible string each.
> 
> But maybe it would be good from DT bindings maintainers to teach LLMs
> where they get things wrong in this repo?
> https://github.com/masoncl/review-prompts/blob/main/kernel/subsystem/dt-bindings.md

Yes, there's a few things it consistently gets wrong. I've looked at 
this and I can go write more instructions (and fix some things that seem 
wrong), but how do I know if it really works? First, I'd be testing with 
a different LLM as that's what I have access to. Second, how do I know 
if no warning is just the indeterminate nature of LLMs? What's really 
needed is for sashiko to incorporate feedback like any other developer. 
Otherwise, it's going to be like some certain reviewers we've banned.

Rob

-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

WARNING: multiple messages have this Message-ID (diff)
From: Rob Herring <robh@kernel.org>
To: Vladimir Oltean <vladimir.oltean@nxp.com>
Cc: Conor Dooley <conor@kernel.org>,
	sashiko-reviews@lists.linux.dev, vkoul@kernel.org,
	neil.armstrong@linaro.org, conor+dt@kernel.org,
	linux-phy@lists.infradead.org, devicetree@vger.kernel.org,
	olteanv@gmail.com
Subject: Re: [PATCH v3 phy-next 14/16] dt-bindings: phy: lynx-10g: initial document
Date: Fri, 5 Jun 2026 15:24:58 -0500	[thread overview]
Message-ID: <20260605202458.GA6304-robh@kernel.org> (raw)
In-Reply-To: <20260605083737.yryq2a763zhnkjyq@skbuf>

On Fri, Jun 05, 2026 at 11:37:37AM +0300, Vladimir Oltean wrote:
> On Wed, Jun 03, 2026 at 04:50:39PM +0100, Conor Dooley wrote:
> > On Wed, Jun 03, 2026 at 04:38:25PM +0300, Vladimir Oltean wrote:
> > > On Wed, Jun 03, 2026 at 01:33:50PM +0000, sashiko-bot@kernel.org wrote:
> > > > Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
> > > > - [Medium] The `if` condition for enforcing the `big-endian` property incorrectly matches the `compatible` string array directly against an `enum`, which will always evaluate to false and cause the requirement to silently fail.
> > > > --
> > > > 
> > > > commit 8bd3982a89722b20a3686e42d4ab3b9f0711ae11
> > > > Author: Vladimir Oltean <vladimir.oltean@nxp.com>
> > > > 
> > > > dt-bindings: phy: lynx-10g: initial document
> > > > 
> > > > This commit adds the schema for the 10G Lynx SerDes used on most QorIQ and
> > > > Layerscape SoCs. It defines the valid compatible strings, PHY cell requirements,
> > > > and enforces SoC-specific constraints such as lane counts and endianness.
> > > > 
> > > > > diff --git a/Documentation/devicetree/bindings/phy/fsl,lynx-10g.yaml b/Documentation/devicetree/bindings/phy/fsl,lynx-10g.yaml
> > > > > new file mode 100644
> > > > > index 0000000000000..8cf6027a75b91
> > > > > --- /dev/null
> > > > > +++ b/Documentation/devicetree/bindings/phy/fsl,lynx-10g.yaml
> > > > > +  - if:
> > > > > +      properties:
> > > > > +        compatible:
> > > > > +          enum:
> > > > > +            - fsl,ls1046a-serdes1
> > > > > +            - fsl,ls1046a-serdes2
> > > > 
> > > > [Severity: Medium]
> > > > Does this conditional correctly enforce the big-endian property? 
> > > > 
> > > > Since the compatible property is a string array in device trees, evaluating it
> > > > directly against an enum always returns false. Should this use "contains:" 
> > > > with the enum, similar to the preceding if block, so dt_binding_check 
> > > > correctly enforces the requirement?
> > > 
> > > The tests I did suggest that it does enforce the requirement.
> > 
> > Yeah, sashiko just doesn't understand how this works without "contains".
> > "contains" is only actually required for validation purposes if there's
> > fallback compatibles and you're trying to get a partial match.

Not exactly. The missing part is the schema is fixed up so the above is 
converted to:

compatible:
  minItems: 1
  maxItems: 1
  items:
     - enum:
         - fsl,ls1046a-serdes1
         - fsl,ls1046a-serdes2

If we didn't do that, the above is not what we want here, but 'contains' 
is as that's the loosest condition and works regardless of how many 
entries compatible has. That's what you should do here.

This fixup used to be a lot more widespread when we used the DT YAML 
format and everything was decoded to an an array or matrix. The fixups 
saved a lot of boilerplate. That's less true now, so maybe getting rid 
of more fixups like this case would be better.

> Yeah, I have no clear understanding of the json-schema syntax either, I
> just copied from another place where it was clear that the intention was
> to have multiple matches on nodes having a single compatible string each.
> 
> But maybe it would be good from DT bindings maintainers to teach LLMs
> where they get things wrong in this repo?
> https://github.com/masoncl/review-prompts/blob/main/kernel/subsystem/dt-bindings.md

Yes, there's a few things it consistently gets wrong. I've looked at 
this and I can go write more instructions (and fix some things that seem 
wrong), but how do I know if it really works? First, I'd be testing with 
a different LLM as that's what I have access to. Second, how do I know 
if no warning is just the indeterminate nature of LLMs? What's really 
needed is for sashiko to incorporate feedback like any other developer. 
Otherwise, it's going to be like some certain reviewers we've banned.

Rob

  reply	other threads:[~2026-06-05 20:25 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-03 13:18 [PATCH v3 phy-next 00/16] New Generic PHY driver for Lynx 10G SerDes Vladimir Oltean
2026-06-03 13:18 ` Vladimir Oltean
2026-06-03 13:18 ` [PATCH v3 phy-next 01/16] phy: lynx-28g: avoid returning NULL in of_xlate() function Vladimir Oltean
2026-06-03 13:18   ` Vladimir Oltean
2026-06-03 13:19 ` [PATCH v3 phy-next 02/16] phy: lynx-28g: reject probing on devices with unsupported OF nodes Vladimir Oltean
2026-06-03 13:19   ` Vladimir Oltean
2026-06-03 13:19 ` [PATCH v3 phy-next 03/16] phy: lynx-28g: move lane mode helpers to new core module Vladimir Oltean
2026-06-03 13:19   ` Vladimir Oltean
2026-06-03 13:19 ` [PATCH v3 phy-next 04/16] phy: lynx-28g: move data structures to core Vladimir Oltean
2026-06-03 13:19   ` Vladimir Oltean
2026-06-03 13:19 ` [PATCH v3 phy-next 05/16] phy: lynx-28g: common lynx_pll_get() Vladimir Oltean
2026-06-03 13:19   ` Vladimir Oltean
2026-06-03 13:19 ` [PATCH v3 phy-next 06/16] phy: lynx-28g: generalize protocol converter accessors Vladimir Oltean
2026-06-03 13:19   ` Vladimir Oltean
2026-06-03 13:19 ` [PATCH v3 phy-next 07/16] phy: lynx-28g: provide default lynx_lane_supports_mode() implementation Vladimir Oltean
2026-06-03 13:19   ` Vladimir Oltean
2026-06-03 13:19 ` [PATCH v3 phy-next 08/16] phy: lynx-28g: move struct lynx_info definitions downwards Vladimir Oltean
2026-06-03 13:19   ` Vladimir Oltean
2026-06-03 13:19 ` [PATCH v3 phy-next 09/16] phy: lynx-28g: make lynx_28g_pll_read_configuration() callable per PLL Vladimir Oltean
2026-06-03 13:19   ` Vladimir Oltean
2026-06-03 13:19 ` [PATCH v3 phy-next 10/16] phy: lynx-28g: common probe() and remove() Vladimir Oltean
2026-06-03 13:19   ` Vladimir Oltean
2026-06-03 13:19 ` [PATCH v3 phy-next 11/16] phy: lynx-28g: add support for big endian register maps Vladimir Oltean
2026-06-03 13:19   ` Vladimir Oltean
2026-06-03 13:19 ` [PATCH v3 phy-next 12/16] phy: lynx-28g: optimize read-modify-write operation Vladimir Oltean
2026-06-03 13:19   ` Vladimir Oltean
2026-06-03 13:20 ` Vladimir Oltean
2026-06-03 13:20   ` Vladimir Oltean
2026-06-03 13:20 ` [PATCH v3 phy-next 13/16] phy: lynx-28g: improve phy_validate() procedure Vladimir Oltean
2026-06-03 13:20   ` Vladimir Oltean
2026-06-03 13:20 ` [PATCH v3 phy-next 14/16] dt-bindings: phy: lynx-10g: initial document Vladimir Oltean
2026-06-03 13:20   ` Vladimir Oltean
2026-06-03 13:33   ` sashiko-bot
2026-06-03 13:33     ` sashiko-bot
2026-06-03 13:38     ` Vladimir Oltean
2026-06-03 13:38       ` Vladimir Oltean
2026-06-03 15:50       ` Conor Dooley
2026-06-03 15:50         ` Conor Dooley
2026-06-05  8:37         ` Vladimir Oltean
2026-06-05  8:37           ` Vladimir Oltean
2026-06-05 20:24           ` Rob Herring [this message]
2026-06-05 20:24             ` Rob Herring
2026-06-05 20:26   ` Rob Herring (Arm)
2026-06-05 20:26     ` Rob Herring (Arm)
2026-06-03 13:21 ` [PATCH v3 phy-next 15/16] phy: lynx-10g: new driver Vladimir Oltean
2026-06-03 13:21   ` Vladimir Oltean
2026-06-03 13:21 ` [PATCH v3 phy-next 16/16] MAINTAINERS: expand Lynx 28G entry to cover Lynx 10G SerDes Vladimir Oltean
2026-06-03 13:21   ` Vladimir Oltean

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260605202458.GA6304-robh@kernel.org \
    --to=robh@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=conor@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-phy@lists.infradead.org \
    --cc=neil.armstrong@linaro.org \
    --cc=olteanv@gmail.com \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=vkoul@kernel.org \
    --cc=vladimir.oltean@nxp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.