* [PATCH] staging: fbtft: fix macro whitespace errors
@ 2026-02-26 17:25 dhyan19022009
2026-02-26 17:53 ` Andy Shevchenko
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: dhyan19022009 @ 2026-02-26 17:25 UTC (permalink / raw)
To: Andy Shevchenko, Greg Kroah-Hartman
Cc: Jason Donenfeld, dri-devel, linux-fbdev, linux-staging,
linux-kernel, Dhyan K Prajapati
From: Dhyan K Prajapati <dhyan19022009@gmail.com>
Remove prohibited spaces before closing parentheses in macro calls in
fbtft-bus.c, reported by checkpatch.pl
Signed-off-by: Dhyan K Prajapati <dhyan19022009@gmail.com>
---
drivers/staging/fbtft/fbtft-bus.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/fbtft/fbtft-bus.c b/drivers/staging/fbtft/fbtft-bus.c
index 30e436ff1..409770891 100644
--- a/drivers/staging/fbtft/fbtft-bus.c
+++ b/drivers/staging/fbtft/fbtft-bus.c
@@ -62,9 +62,9 @@ out: \
} \
EXPORT_SYMBOL(func);
-define_fbtft_write_reg(fbtft_write_reg8_bus8, u8, u8, )
+define_fbtft_write_reg(fbtft_write_reg8_bus8, u8, u8)
define_fbtft_write_reg(fbtft_write_reg16_bus8, __be16, u16, cpu_to_be16)
-define_fbtft_write_reg(fbtft_write_reg16_bus16, u16, u16, )
+define_fbtft_write_reg(fbtft_write_reg16_bus16, u16, u16)
void fbtft_write_reg8_bus9(struct fbtft_par *par, int len, ...)
{
--
2.53.0
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH] staging: fbtft: fix macro whitespace errors
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
2026-02-26 21:36 ` kernel test robot
2026-02-26 23:35 ` kernel test robot
2 siblings, 2 replies; 6+ messages in thread
From: Andy Shevchenko @ 2026-02-26 17:53 UTC (permalink / raw)
To: dhyan19022009
Cc: Andy Shevchenko, Greg Kroah-Hartman, Jason Donenfeld, dri-devel,
linux-fbdev, linux-staging, linux-kernel
On Thu, Feb 26, 2026 at 10:55:31PM +0530, dhyan19022009@gmail.com wrote:
>
> Remove prohibited spaces before closing parentheses in macro calls in
> fbtft-bus.c, reported by checkpatch.pl
You haven't compiled this, have you?
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 6+ messages in thread
* Claude review: Re: [PATCH] staging: fbtft: fix macro whitespace errors
2026-02-26 17:53 ` Andy Shevchenko
@ 2026-02-27 1:42 ` Claude Code Review Bot
2026-02-27 1:42 ` Claude Code Review Bot
1 sibling, 0 replies; 6+ messages in thread
From: Claude Code Review Bot @ 2026-02-27 1:42 UTC (permalink / raw)
To: dri-devel-reviews
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Claude review: Re: [PATCH] staging: fbtft: fix macro whitespace errors
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
1 sibling, 0 replies; 6+ messages in thread
From: Claude Code Review Bot @ 2026-02-27 1:42 UTC (permalink / raw)
To: dri-devel-reviews
Overall Series Review
Subject: Re: [PATCH] staging: fbtft: fix macro whitespace errors
Author: Andy Shevchenko <andriy.shevchenko@intel.com>
Patches: 4
Reviewed: 2026-02-27T11:42:54.570254
---
**NAK — This patch is incorrect and will break compilation.**
This is a single patch that claims to fix "macro whitespace errors" reported by checkpatch.pl in the staging fbtft driver. However, the patch fundamentally misunderstands the code: what appears to be trailing whitespace before the closing parenthesis is actually an **intentionally empty macro argument**. Removing it changes a 4-argument macro invocation into a 3-argument one, which will cause a preprocessor error.
---
Generated by Claude Code Patch Reviewer
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] staging: fbtft: fix macro whitespace errors
2026-02-26 17:25 [PATCH] staging: fbtft: fix macro whitespace errors dhyan19022009
2026-02-26 17:53 ` Andy Shevchenko
@ 2026-02-26 21:36 ` kernel test robot
2026-02-26 23:35 ` kernel test robot
2 siblings, 0 replies; 6+ messages in thread
From: kernel test robot @ 2026-02-26 21:36 UTC (permalink / raw)
To: dhyan19022009, Andy Shevchenko, Greg Kroah-Hartman
Cc: oe-kbuild-all, Jason Donenfeld, dri-devel, linux-fbdev,
linux-staging, linux-kernel, Dhyan K Prajapati
Hi,
kernel test robot noticed the following build errors:
[auto build test ERROR on staging/staging-testing]
url: https://github.com/intel-lab-lkp/linux/commits/dhyan19022009-gmail-com/staging-fbtft-fix-macro-whitespace-errors/20260227-021646
base: staging/staging-testing
patch link: https://lore.kernel.org/r/20260226172531.13714-1-dhyan19022009%40gmail.com
patch subject: [PATCH] staging: fbtft: fix macro whitespace errors
config: parisc-randconfig-001-20260227 (https://download.01.org/0day-ci/archive/20260227/202602270527.UlXqo4xH-lkp@intel.com/config)
compiler: hppa-linux-gcc (GCC) 8.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260227/202602270527.UlXqo4xH-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202602270527.UlXqo4xH-lkp@intel.com/
All errors (new ones prefixed by >>):
>> drivers/staging/fbtft/fbtft-bus.c:65:53: error: macro "define_fbtft_write_reg" requires 4 arguments, but only 3 given
define_fbtft_write_reg(fbtft_write_reg8_bus8, u8, u8)
^
>> drivers/staging/fbtft/fbtft-bus.c:65:23: error: expected ';' before 'void'
define_fbtft_write_reg(fbtft_write_reg8_bus8, u8, u8)
^
;
drivers/staging/fbtft/fbtft-bus.c:67:57: error: macro "define_fbtft_write_reg" requires 4 arguments, but only 3 given
define_fbtft_write_reg(fbtft_write_reg16_bus16, u16, u16)
^
drivers/staging/fbtft/fbtft-bus.c:67:23: error: expected ';' before 'void'
define_fbtft_write_reg(fbtft_write_reg16_bus16, u16, u16)
^
;
drivers/staging/fbtft/fbtft-bus.c:69:1:
void fbtft_write_reg8_bus9(struct fbtft_par *par, int len, ...)
~~~~
vim +/define_fbtft_write_reg +65 drivers/staging/fbtft/fbtft-bus.c
64
> 65 define_fbtft_write_reg(fbtft_write_reg8_bus8, u8, u8)
66 define_fbtft_write_reg(fbtft_write_reg16_bus8, __be16, u16, cpu_to_be16)
67 define_fbtft_write_reg(fbtft_write_reg16_bus16, u16, u16)
68
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] staging: fbtft: fix macro whitespace errors
2026-02-26 17:25 [PATCH] staging: fbtft: fix macro whitespace errors dhyan19022009
2026-02-26 17:53 ` Andy Shevchenko
2026-02-26 21:36 ` kernel test robot
@ 2026-02-26 23:35 ` kernel test robot
2 siblings, 0 replies; 6+ messages in thread
From: kernel test robot @ 2026-02-26 23:35 UTC (permalink / raw)
To: dhyan19022009, Andy Shevchenko, Greg Kroah-Hartman
Cc: llvm, oe-kbuild-all, Jason Donenfeld, dri-devel, linux-fbdev,
linux-staging, linux-kernel, Dhyan K Prajapati
Hi,
kernel test robot noticed the following build errors:
[auto build test ERROR on staging/staging-testing]
url: https://github.com/intel-lab-lkp/linux/commits/dhyan19022009-gmail-com/staging-fbtft-fix-macro-whitespace-errors/20260227-021646
base: staging/staging-testing
patch link: https://lore.kernel.org/r/20260226172531.13714-1-dhyan19022009%40gmail.com
patch subject: [PATCH] staging: fbtft: fix macro whitespace errors
config: hexagon-allmodconfig (https://download.01.org/0day-ci/archive/20260227/202602270720.2J4j3gHF-lkp@intel.com/config)
compiler: clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260227/202602270720.2J4j3gHF-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202602270720.2J4j3gHF-lkp@intel.com/
All errors (new ones prefixed by >>):
>> drivers/staging/fbtft/fbtft-bus.c:65:53: error: too few arguments provided to function-like macro invocation
65 | define_fbtft_write_reg(fbtft_write_reg8_bus8, u8, u8)
| ^
drivers/staging/fbtft/fbtft-bus.c:14:9: note: macro 'define_fbtft_write_reg' defined here
14 | #define define_fbtft_write_reg(func, buffer_type, data_type, modifier) \
| ^
>> drivers/staging/fbtft/fbtft-bus.c:65:1: error: unknown type name 'define_fbtft_write_reg'
65 | define_fbtft_write_reg(fbtft_write_reg8_bus8, u8, u8)
| ^
drivers/staging/fbtft/fbtft-bus.c:67:57: error: too few arguments provided to function-like macro invocation
67 | define_fbtft_write_reg(fbtft_write_reg16_bus16, u16, u16)
| ^
drivers/staging/fbtft/fbtft-bus.c:14:9: note: macro 'define_fbtft_write_reg' defined here
14 | #define define_fbtft_write_reg(func, buffer_type, data_type, modifier) \
| ^
drivers/staging/fbtft/fbtft-bus.c:67:1: error: unknown type name 'define_fbtft_write_reg'
67 | define_fbtft_write_reg(fbtft_write_reg16_bus16, u16, u16)
| ^
4 errors generated.
vim +65 drivers/staging/fbtft/fbtft-bus.c
64
> 65 define_fbtft_write_reg(fbtft_write_reg8_bus8, u8, u8)
66 define_fbtft_write_reg(fbtft_write_reg16_bus8, __be16, u16, cpu_to_be16)
67 define_fbtft_write_reg(fbtft_write_reg16_bus16, u16, u16)
68
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2026-02-27 1:42 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2026-02-26 21:36 ` kernel test robot
2026-02-26 23:35 ` kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox