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: drm/exynos/gem: Fix printk specifier for gem_object.size and dma_addr
Date: Sun, 12 Apr 2026 13:01:45 +1000	[thread overview]
Message-ID: <review-patch1-20260408064936.1342321-1-wenst@chromium.org> (raw)
In-Reply-To: <20260408064936.1342321-1-wenst@chromium.org>

Patch Review

**Verdict: Looks good.**

Two changes are made in two call sites (`exynos_drm_alloc_buf` and `exynos_drm_free_buf`):

1. **`size` format: `%lx` → `%zx`** — Correct. `drm_gem_object.size` is `size_t` (confirmed in `include/drm/drm_gem.h:341`), and `%zx` is the proper format specifier for `size_t`. This eliminates the warning on architectures where `size_t != unsigned long` (e.g., 32-bit ARM).

2. **`dma_addr` format: `%lx` with cast → `%pad` by reference** — Correct and an improvement. Per `Documentation/core-api/printk-formats.rst:257`, `%pad` is the canonical kernel format for `dma_addr_t`, and it is passed by reference (hence the `&exynos_gem->dma_addr`). This removes the lossy `(unsigned long)` cast that would truncate the address on 32-bit platforms with 64-bit DMA addresses (e.g., `CONFIG_ARCH_DMA_ADDR_T_64BIT`).

```diff
-	DRM_DEV_DEBUG_KMS(drm_dev_dma_dev(dev), "dma_addr(0x%lx), size(0x%lx)\n",
-			(unsigned long)exynos_gem->dma_addr, exynos_gem->base.size);
+	DRM_DEV_DEBUG_KMS(drm_dev_dma_dev(dev), "dma_addr(%pad), size(0x%zx)\n",
+			  &exynos_gem->dma_addr, exynos_gem->base.size);
```

Minor note: `%pad` already prints the `0x` prefix (the kernel documentation shows `0x01234567`), so the output format changes slightly from `dma_addr(0x...)` to `dma_addr(0x...)` — this is fine and arguably more correct since it avoids a double `0x` if one was ever added.

The alignment fix (extra space to align under `drm_dev_dma_dev`) is also a nice touch.

**Reviewed-by worthy.** The commit message is clear, references the Fixes tag and the build robot report, and the code change is mechanical and correct.

---
Generated by Claude Code Patch Reviewer

  reply	other threads:[~2026-04-12  3:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-08  6:49 [PATCH] drm/exynos/gem: Fix printk specifier for gem_object.size and dma_addr Chen-Yu Tsai
2026-04-12  3:01 ` Claude Code Review Bot [this message]
2026-04-12  3:01 ` Claude review: " Claude Code Review 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=review-patch1-20260408064936.1342321-1-wenst@chromium.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