On Mon, Nov 23, 2026 at 04:11:53PM +0000, netd…@kernel.org wrote:
> Thank you for your contribution! Sashiko AI review found 1 potential > issue(s) to consider. > > Critical: 0 · High: 1 · Medium: 0 · Low: 0 > > If you believe none of the issues are legitimate, please reply to each > issue of Medium severity or higher and explain why the AI is wrong. > If any of them are legitimate and you plan to respin, please let patchwork > know by including "pw-bot: cr" as a separate line at the end of your reply > (one such reply per series is enough). > > - [High] The fix is incomplete because it skips a sibling DSA binding > that has the exact defect described in the commit message. > > -- > > dt-bindings: net: dsa: Flag unexpected ethernet ports > > Several DSA bindings reference dsa.yaml ports, use "additionalProperties: > true", and limit their port node pattern to a subset of unit addresses. > Because of that, port nodes with any other unit address pass validation > without a warning. The patch drops the unit address from the pattern and > limits the port reg value with a maximum instead. > > [ ... ] >
> > diff --git a/Documentation/devicetree/bindings/net/dsa/qca8k.yaml b/Documentation/devicetree/bindings/net/dsa/qca8k.yaml > > index 167398ab253aa..3840b336bdb93 100644 > > --- a/Documentation/devicetree/bindings/net/dsa/qca8k.yaml > > +++ b/Documentation/devicetree/bindings/net/dsa/qca8k.yaml > > @@ -75,13 +75,15 @@ patternProperties: > > type: object > > additionalProperties: true > > patternProperties: > > - "^(ethernet-)?port@[0-6]$": > > + "^(ethernet-)?port@": > > type: object > > description: Ethernet switch ports > > > > $ref: dsa-port.yaml# > > > > properties: > > + reg: > > + maximum: 6
> > [Severity: High] > Was renesas,rzn1-a5psw.yaml left out of this conversion on purpose? It > looks like it has the same problem the commit message describes. It > references dsa.yaml ports, its ethernet-ports node uses > additionalProperties: true, and its port pattern still limits the unit > address: > > Documentation/devicetree/bindings/net/dsa/renesas,rzn1-a5psw.yaml: > > allOf: > - $ref: dsa.yaml#/$defs/ethernet-ports > ... > ethernet-ports: > type: object > additionalProperties: true > patternProperties: > "^(ethernet-)?port@[0-4]$": > > Under a renesas,rzn1-a5psw switch, a node such as po…@5 or po…@7 does > not match this pattern. It does match the generic > "^(ethernet-)?port@[0-9a-f]+$" pattern in dsa.yaml, so only the generic > dsa-port.yaml checks apply and it passes validation. This hardware only > has ports 0-4 (4 ports plus 1 CPU port).
Yes.
> > Would the same change used here for qca8k.yaml work for that file too, > i.e. "^(ethernet-)?port@" plus reg: maximum: 4? > > nxp,netc-switch.yaml has a weaker form of the same gap: > > ethernet-ports: > type: object > patternProperties: > "^ethernet-port@[0-9a-f]$": > type: object > $ref: dsa-port.yaml# > > A node named po…@1 (no ethernet- prefix) or ethe…@10 does not > match this pattern. Instead it matches the > '^(ethernet-)?port@[0-9a-f]+$' pattern in ethernet-switch.yaml, which is > reached through $ref: dsa.yaml# and only applies type: object. > > Such a node skips the NETC port schema, including dsa-port.yaml and its > unevaluatedProperties: false, and passes without a warning. > > Should this patch cover nxp,netc-switch.yaml as well?
Yes. There's a whole other class of schemas here that don't put any restriction on the port numbers. Maybe they should, but doing so requires knowing how many ports there are. But that would be a separate improvement rather than fixing what looks like a constraint on number of ports but in reality isn't doing anything. And that could get messy when you have several variants with different numbers of ports covered by 1 schema. Rob