From: Rob Herring <robh@kernel.org>
To: sashiko-reviews@lists.linux.dev
Cc: Ramshouriesh R <rshouriesh@gmail.com>,
conor+dt@kernel.org, devicetree@vger.kernel.org,
media-ci@linuxtv.org
Subject: Re: [PATCH v6 1/2] media: dt-bindings: Add Himax HM1092 NIR sensor
Date: Mon, 3 Aug 2026 09:32:41 -0500 [thread overview]
Message-ID: <20260803143241.GA3364728-robh@kernel.org> (raw)
In-Reply-To: <20260801130150.5BDB41F00AC4@smtp.kernel.org>
On Sat, Aug 01, 2026 at 01:01:49PM +0000, sashiko-bot@kernel.org wrote:
> Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
> - [Medium] The schema fails to restrict the `data-lanes` property to a single lane, allowing physically invalid device tree configurations to silently pass validation.
> --
>
> --- Patch [1]: [PATCH v6 1/2] media: dt-bindings: Add Himax HM1092 NIR sensor ---
> commit ee5879a0923ec6b56edc74d8a66ff697b111ae09
> Author: Ramshouriesh R <rshouriesh@gmail.com>
>
> media: dt-bindings: Add Himax HM1092 NIR sensor
>
> This commit adds a device tree binding schema for the Himax HM1092, a 1
> megapixel monochrome near-infrared CMOS image sensor. The sensor is described
> as outputting 10-bit RAW data over a single MIPI CSI-2 data lane.
>
> > diff --git a/Documentation/devicetree/bindings/media/i2c/himax,hm1092.yaml b/Documentation/devicetree/bindings/media/i2c/himax,hm1092.yaml
> > new file mode 100644
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/media/i2c/himax,hm1092.yaml
> [ ... ]
> > + port:
> > + $ref: /schemas/graph.yaml#/$defs/port-base
> > + additionalProperties: false
> > +
> > + properties:
> > + endpoint:
> > + $ref: /schemas/media/video-interfaces.yaml#
> > + unevaluatedProperties: false
> > +
> > + required:
> > + - link-frequencies
>
> [Severity: Medium]
> The commit message mentions the sensor outputs over a single MIPI CSI-2 data
> lane, but does this schema restrict the data-lanes property to a single lane?
>
> Without explicitly defining a data-lanes property constraint (such as
> maxItems: 1 or items: - const: 1) in this endpoint block, the schema inherits
> the permissive defaults from video-interfaces.yaml. This would allow device
> trees specifying physically impossible multi-lane configurations
> (e.g., data-lanes = <1 2>;) to silently pass schema validation.
data-lanes should not be present, but that's probably an issue on a
number of bindings. There's not a great way to so this other than using
'additionalProperties' instead and listing all the properties used from
video-interfaces.yaml. But then you have to list 'remote-endpoint'
everywhere which is not great either. I'd rather just allow the property
even if it doesn't make sense for the h/w.
Rob
next prev parent reply other threads:[~2026-08-03 14:32 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-01 12:54 [PATCH v6 0/2] media: Add Himax HM1092 mono NIR sensor driver Ramshouriesh R
2026-08-01 12:54 ` [PATCH v6 1/2] media: dt-bindings: Add Himax HM1092 NIR sensor Ramshouriesh R
2026-08-01 13:01 ` sashiko-bot
2026-08-03 14:32 ` Rob Herring [this message]
2026-08-03 17:17 ` Ramshouriesh R
2026-08-01 12:54 ` [PATCH v6 2/2] media: i2c: hm1092: add Himax HM1092 mono NIR sensor driver Ramshouriesh R
2026-08-01 13:10 ` sashiko-bot
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=20260803143241.GA3364728-robh@kernel.org \
--to=robh@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=media-ci@linuxtv.org \
--cc=rshouriesh@gmail.com \
--cc=sashiko-reviews@lists.linux.dev \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox