From: Claude Code Review Bot <claude-review@example.com>
To: dri-devel-reviews@example.com
Subject: Claude review: Re: [PATCH] staging: fbtft: fix macro whitespace errors
Date: Fri, 27 Feb 2026 11:42:54 +1000 [thread overview]
Message-ID: <review-patch1-aaCIqUXPB75vR6rK@smile.fi.intel.com> (raw)
In-Reply-To: <aaCIqUXPB75vR6rK@smile.fi.intel.com>
Patch Review
**Result: NAK — breaks compilation**
The macro `define_fbtft_write_reg` is defined with exactly 4 parameters (line 14 of `fbtft-bus.c`):
```c
#define define_fbtft_write_reg(func, buffer_type, data_type, modifier)
```
The `modifier` parameter is used throughout the macro body as a function-like call, for example:
```c
buf[i] = modifier((data_type)va_arg(args, unsigned int));
```
When `modifier` is passed as empty (e.g., `define_fbtft_write_reg(fbtft_write_reg8_bus8, u8, u8, )`), the expansion becomes simply `((u8)va_arg(args, unsigned int))` — an identity operation. This is intentional: `fbtft_write_reg8_bus8` needs no byte-order conversion, while `fbtft_write_reg16_bus8` passes `cpu_to_be16` as the modifier.
The patch changes:
```c
-define_fbtft_write_reg(fbtft_write_reg8_bus8, u8, u8, )
+define_fbtft_write_reg(fbtft_write_reg8_bus8, u8, u8)
```
This reduces the argument count from 4 to 3, which will produce a compilation error like:
```
error: macro "define_fbtft_write_reg" requires 4 arguments, but only 3 given
```
The same issue applies to the second hunk:
```c
-define_fbtft_write_reg(fbtft_write_reg16_bus16, u16, u16, )
+define_fbtft_write_reg(fbtft_write_reg16_bus16, u16, u16)
```
The checkpatch.pl warning about "space before closing parenthesis" is a **false positive** in this context. The trailing `, )` is the C preprocessor's way of passing an empty argument to a macro — it is not a style issue.
**If the goal is to silence the checkpatch warning**, the correct approach would be to refactor the macro to use variadic arguments (`__VA_ARGS__`) or to define a no-op identity macro (e.g., `#define FBTFT_IDENTITY(x) (x)`) and pass that instead of an empty argument. Simply deleting the argument is not valid.
---
Generated by Claude Code Patch Reviewer
next prev parent reply other threads:[~2026-02-27 1:42 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-26 17:25 [PATCH] staging: fbtft: fix macro whitespace errors dhyan19022009
2026-02-26 17:53 ` Andy Shevchenko
2026-02-27 1:42 ` Claude review: " Claude Code Review Bot
2026-02-27 1:42 ` Claude Code Review Bot [this message]
2026-02-26 21:36 ` kernel test robot
2026-02-26 23:35 ` kernel test robot
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-aaCIqUXPB75vR6rK@smile.fi.intel.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