public inbox for drm-ai-reviews@public-inbox.freedesktop.org
 help / color / mirror / Atom feed
From: Claude Code Review Bot <claude-review@example.com>
To: dri-devel-reviews@example.com
Subject: Claude review: dt-bindings: Consolidate "sram" property definition
Date: Sat, 16 May 2026 14:53:57 +1000	[thread overview]
Message-ID: <review-patch1-20260511165942.2774868-1-robh@kernel.org> (raw)
In-Reply-To: <20260511165942.2774868-1-robh@kernel.org>

Patch Review

**New file: `sram-consumer.yaml`**

The new common schema is clean and follows the established pattern:

```yaml
select: true

properties:
  sram:
    description:
      Phandles to one or more reserved on-chip SRAM regions...
    $ref: /schemas/types.yaml#/definitions/phandle-array
    items:
      maxItems: 1

additionalProperties: true
```

This is consistent with how `nvmem-consumer.yaml`, `leds-consumer.yaml`, and similar schemas are structured. No issues.

**Single-phandle consumers (imx8qxp-dc, cnm-wave521c, nxp-imx8-jpeg, mediatek-net, ti-icssg-prueth, ti-icssm-prueth, stm32-dcmi, rockchip-vdec, stm32-spi, amlogic-meson-mx-ao-arc)**

These all follow the same pattern — removing `$ref: /schemas/types.yaml#/definitions/phandle` and replacing with (or keeping) `maxItems: 1`. Since the common schema now provides the type definition as `phandle-array`, and `maxItems: 1` constrains it to a single entry, validation behavior is preserved. The description cleanups (removing generic "phandle to SRAM" boilerplate) are appropriate since the common schema now carries the generic description.

No issues with any of these.

**Multi-phandle consumers (msm/gpu.yaml, ti-k3-dsp-rproc, ti-k3-r5f-rproc, xlnx-zynqmp-r5fss)**

These remove `$ref: /schemas/types.yaml#/definitions/phandle-array` and `items: maxItems: 1`, keeping only `minItems`/`maxItems` constraints and device-specific descriptions. The common schema now provides the type and inner-item constraint. Correct.

**stericsson,dma40.yaml — minor concern**

This change is slightly different from the others:

```yaml
# Before:
sram:
  $ref: /schemas/types.yaml#/definitions/phandle-array
  description: A phandle array with inner size 1 (no arg cells).
    First phandle is the LCPA ...
    Second phandle is the  LCLA ...
  maxItems: 2
  items:
    maxItems: 1

# After:
sram:
  items:
    - description: LCPA (Logical Channel Parameter Address) memory.
    - description: LCLA (Logical Channel Link base Address) memory.
```

The explicit `maxItems: 2` is removed, relying on the two-element tuple-style `items` list to implicitly set it. This works correctly in dt-schema (tuple `items` implicitly constrains the array length). However, unlike the other changes, the after version uses `items` as a tuple (array of schemas) while the common schema uses `items` as a single schema (`items: { maxItems: 1 }`). Both forms are valid and non-conflicting in JSON Schema — the common schema's `items: { maxItems: 1 }` validates that every element has at most 1 cell, and the per-device tuple provides per-position descriptions. But this is the one case where two different `items` forms coexist on the same property from different schemas, which is worth a quick sanity check that dt-schema handles it correctly (it should, but it's the most nuanced change in the series).

**Nit:** The original dma40 description has a double space (`the  LCLA`) which is preserved in the new per-item description — not introduced by this patch, so not a concern, but could be fixed opportunistically.

**Summary:** Clean, well-motivated de-duplication following established dt-bindings patterns. The stericsson DMA40 tuple-vs-schema `items` interaction is the only thing worth confirming, but it should work correctly per JSON Schema semantics.

---
Generated by Claude Code Patch Reviewer

      parent reply	other threads:[~2026-05-16  4:53 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-11 16:59 [PATCH] dt-bindings: Consolidate "sram" property definition Rob Herring (Arm)
2026-05-11 18:55 ` Linus Walleij
2026-05-11 23:09 ` Jakub Kicinski
2026-05-12  0:46 ` Mark Brown
2026-05-12  2:57 ` Liu Ying
2026-05-12  9:15 ` Lorenzo Bianconi
2026-05-13  8:22 ` Vinod Koul
2026-05-13 13:26 ` Dmitry Baryshkov
2026-05-13 17:59 ` Krzysztof Kozlowski
2026-05-14 15:18 ` Shah, Tanmay
2026-05-16  4:53 ` Claude review: " Claude Code Review Bot
2026-05-16  4:53 ` Claude Code Review Bot [this message]

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=review-patch1-20260511165942.2774868-1-robh@kernel.org \
    --to=claude-review@example.com \
    --cc=dri-devel-reviews@example.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox