On Sat, May 09, 2026 at 06:28:29PM +0000, sashiko-bot@kernel.org wrote: > Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: > - [Medium] The use of `oneOf` in the `if` condition allows invalid configurations with exactly two SPI properties to silently bypass validation. > -- > > commit 61c42b03c451c90501fbc1f5dfb0ec651bc79cc8 > Author: Udaya Kiran Challa > > dt-bindings: rtc: epson,rx6110: Convert to DT Schema > > Convert the Epson RX6110 Real Time Clock devicetree binding > from the legacy text format to DT schema. > > > diff --git a/Documentation/devicetree/bindings/rtc/epson,rx6110.yaml b/Documentation/devicetree/bindings/rtc/epson,rx6110.yaml > > new file mode 100644 > > index 0000000000000..09578de45d8db > > --- /dev/null > > +++ b/Documentation/devicetree/bindings/rtc/epson,rx6110.yaml > > [ ... ] > > > +required: > > + - compatible > > + - reg > > + > > +if: > > + oneOf: > > + - required: > > + - spi-cs-high > > + - required: > > + - spi-cpha > > + - required: > > + - spi-cpol > > Does this oneOf condition allow invalid configurations with exactly two > SPI properties to silently bypass validation? > > In JSON schema, oneOf requires exactly one of the subschemas to evaluate > to true. If a device tree node provides exactly two of the three SPI > properties (e.g., spi-cs-high and spi-cpha, but omitting spi-cpol), the > node satisfies two of the required conditions. > > Because it matches two subschemas rather than one, the oneOf condition > evaluates to false. Consequently, the if condition fails, the then block > is skipped, and the schema successfully validates the incomplete node. > > Would it be better to use anyOf here instead, to correctly trigger the > requirement that all three properties must be present if at least one is > provided? ^^^ This is correct, I should have suggested anyOf not oneOf.