From: Claude Code Review Bot <claude-review@example.com>
To: dri-devel-reviews@example.com
Subject: Claude review: Re: [PATCH] staging: fbtft: avoid empty macro argument
Date: Tue, 31 Mar 2026 17:56:51 +1000 [thread overview]
Message-ID: <review-patch1-CAHp75VdGieY2qTZ_HeODxLMW8P2E3O9O27K6RRJoujxB3NZ-DA@mail.gmail.com> (raw)
In-Reply-To: <CAHp75VdGieY2qTZ_HeODxLMW8P2E3O9O27K6RRJoujxB3NZ-DA@mail.gmail.com>
Patch Review
**Missing commit message body.** The patch has no description at all — just a Signed-off-by. It should explain *why* this change is being made (e.g., "Empty macro arguments are undefined behavior per ISO C99 §6.10.3 and trigger warnings with `-Wmissing-macro-arg`" or similar). A reviewer or future reader of `git log` needs to understand the motivation.
**The fix itself is correct.** The `modifier` parameter appears in three places in the macro body:
```c
buf[i] = modifier((data_type)va_arg(args, unsigned int));
*buf = modifier((data_type)va_arg(args, unsigned int));
*buf++ = modifier((data_type)va_arg(args, unsigned int));
```
Using `fbtft_nop(x)` defined as `(x)` correctly preserves the original semantics — it's an identity transformation, matching what the empty argument was implicitly doing.
**Naming/style nit:** The name `fbtft_nop` is slightly misleading — "nop" typically implies "no operation" (i.e., a statement with no effect), whereas this is an identity *function*. Something like `fbtft_identity` would be more descriptive, though this is minor and a matter of taste.
**Minor: `#define` placement is fine.** Placing the `#define` between the macro definition and its first use is reasonable. Since this is a file-scoped macro only used in this translation unit, it doesn't need to go in a header.
**Recommendation:** The patch needs a proper commit message. The code change itself is a reasonable cleanup. With a commit message added, this would be acceptable.
---
Generated by Claude Code Patch Reviewer
prev parent reply other threads:[~2026-03-31 7:56 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-28 16:01 [PATCH] staging: fbtft: avoid empty macro argument amanohina1
2026-03-28 17:49 ` Andy Shevchenko
2026-03-31 7:56 ` Claude review: " Claude Code Review Bot
2026-03-31 7:56 ` 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-CAHp75VdGieY2qTZ_HeODxLMW8P2E3O9O27K6RRJoujxB3NZ-DA@mail.gmail.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