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/imagination: Restrict init_fw_trace_mask module param to read only
Date: Tue, 28 Apr 2026 15:07:03 +1000	[thread overview]
Message-ID: <review-patch2-20260427-ftrace_fix-v3-2-e081530759a8@imgtec.com> (raw)
In-Reply-To: <20260427-ftrace_fix-v3-2-e081530759a8@imgtec.com>

Patch Review

**Verdict: Good to merge.**

```c
-module_param_cb(init_fw_trace_mask, &pvr_fw_trace_init_mask_ops, &pvr_fw_trace_init_mask, 0600);
+module_param_cb(init_fw_trace_mask, &pvr_fw_trace_init_mask_ops, &pvr_fw_trace_init_mask, 0400);
```

This changes the sysfs permissions from `0600` (root read/write) to `0400` (root read-only). The rationale is sound: `pvr_fw_trace_init_mask` is only consumed once, during `pvr_fw_trace_init()`:

```c
fw_trace->group_mask = pvr_fw_trace_init_mask;
```

Writing to the sysfs parameter at runtime would update the variable but would **not** send a KCCB command to the firmware, so the change would be silently ignored. The debugfs `trace_mask` file (fixed in patch 1) calls `update_logtype()` which properly notifies the firmware. Making the parameter read-only prevents user confusion.

One minor note: the `pvr_fw_trace_init_mask_set` callback in `pvr_fw_trace_init_mask_ops` becomes dead code with `0400` permissions (the `.set` handler will never be called via sysfs). It's still used if someone passes the parameter on the module load command line, so it's not truly unused — but if the authors wanted to be thorough, they could set `.set = NULL` in the ops struct since `module_param_cb` with read-only permissions won't invoke it. This is a very minor observation, not a blocker.

---
Generated by Claude Code Patch Reviewer

  reply	other threads:[~2026-04-28  5:07 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-27  5:31 [PATCH v3 0/2] drm/imagination: FW trace bug fix and configuration update Brajesh Gupta
2026-04-27  5:31 ` [PATCH v3 1/2] drm/imagination: Fix segfault when updating ftrace mask Brajesh Gupta
2026-04-28  5:07   ` Claude review: " Claude Code Review Bot
2026-04-27  5:31 ` [PATCH v3 2/2] drm/imagination: Restrict init_fw_trace_mask module param to read only Brajesh Gupta
2026-04-28  5:07   ` Claude Code Review Bot [this message]
2026-04-27 13:00 ` [PATCH v3 0/2] drm/imagination: FW trace bug fix and configuration update Alessio Belle
2026-04-27 13:25 ` (subset) " Matt Coster
2026-04-27 13:28 ` Matt Coster
2026-04-28  5:07 ` 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-patch2-20260427-ftrace_fix-v3-2-e081530759a8@imgtec.com \
    --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