* [PATCH] staging: fbtft: fix space prohibited before that close parenthesis
@ 2026-10-31 4:23 Eric LI
2026-11-02 20:44 ` Andy Shevchenko
0 siblings, 1 reply; 3+ messages in thread
From: Eric LI @ 2026-10-31 4:23 UTC (permalink / raw)
To: Andy Shevchenko, Greg Kroah-Hartman
Cc: Eric LI, dri-devel, linux-fbdev, linux-staging, linux-kernel
Clean up the following checkpatch error and warning in fbtft-bus.c.
drivers/staging/fbtft/fbtft-bus.c:14: WARNING: macros should not use a trailing semicolon
drivers/staging/fbtft/fbtft-bus.c:65: ERROR: space prohibited before that close parenthesis ')'
drivers/staging/fbtft/fbtft-bus.c:67: ERROR: space prohibited before that close parenthesis ')'
The reason of that error is the modifier argument is optional to the
macro define_fbtft_write_reg. So, even if removing the space before close
parenthesis, another error "space required after that ','" occurs.
In this fix, I change that modifier argument as optional, so that
it is both ok to use that macro with or without modifier argument.
Signed-off-by: Eric LI <eric.lee0305@gmail.com>
---
drivers/staging/fbtft/fbtft-bus.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/fbtft/fbtft-bus.c b/drivers/staging/fbtft/fbtft-bus.c
index 30e436ff19e4..e483ecb10938 100644
--- a/drivers/staging/fbtft/fbtft-bus.c
+++ b/drivers/staging/fbtft/fbtft-bus.c
@@ -11,7 +11,7 @@
*
*****************************************************************************/
-#define define_fbtft_write_reg(func, buffer_type, data_type, modifier) \
+#define define_fbtft_write_reg(func, buffer_type, data_type, modifier...) \
void func(struct fbtft_par *par, int len, ...) \
{ \
va_list args; \
@@ -60,11 +60,11 @@ void func(struct fbtft_par *par, int len, ...) \
out: \
va_end(args); \
} \
-EXPORT_SYMBOL(func);
+EXPORT_SYMBOL(func)
-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_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);
void fbtft_write_reg8_bus9(struct fbtft_par *par, int len, ...)
{
--
2.34.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] staging: fbtft: fix space prohibited before that close parenthesis
2026-10-31 4:23 [PATCH] staging: fbtft: fix space prohibited before that close parenthesis Eric LI
@ 2026-11-02 20:44 ` Andy Shevchenko
2026-11-03 0:07 ` Eric Lee
0 siblings, 1 reply; 3+ messages in thread
From: Andy Shevchenko @ 2026-11-02 20:44 UTC (permalink / raw)
To: Eric LI
Cc: Andy Shevchenko, Greg Kroah-Hartman, dri-devel, linux-fbdev,
linux-staging, linux-kernel
On Sat, Oct 31, 2026 at 6:23 AM Eric LI <eric.lee0305@gmail.com> wrote:
>
> Clean up the following checkpatch error and warning in fbtft-bus.c.
> drivers/staging/fbtft/fbtft-bus.c:14: WARNING: macros should not use a trailing semicolon
> drivers/staging/fbtft/fbtft-bus.c:65: ERROR: space prohibited before that close parenthesis ')'
> drivers/staging/fbtft/fbtft-bus.c:67: ERROR: space prohibited before that close parenthesis ')'
>
> The reason of that error is the modifier argument is optional to the
> macro define_fbtft_write_reg. So, even if removing the space before close
> parenthesis, another error "space required after that ','" occurs.
>
> In this fix, I change that modifier argument as optional, so that
> it is both ok to use that macro with or without modifier argument.
It's not a fix, it does not fix anything.
Also study the mailing list archive (lore.kernel.org) to see what
happened to the similar patches in the past.
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] staging: fbtft: fix space prohibited before that close parenthesis
2026-11-02 20:44 ` Andy Shevchenko
@ 2026-11-03 0:07 ` Eric Lee
0 siblings, 0 replies; 3+ messages in thread
From: Eric Lee @ 2026-11-03 0:07 UTC (permalink / raw)
To: Andy Shevchenko
Cc: Andy Shevchenko, Greg Kroah-Hartman, dri-devel, linux-fbdev,
linux-staging, linux-kernel
On Nov 3, 2026, at 04:44, Andy Shevchenko <andy.shevchenko@gmail.com> wrote:
>
> It's not a fix, it does not fix anything.
> Also study the mailing list archive (lore.kernel.org) to see what
> happened to the similar patches in the past.
Thanks for your feedback. I did check the mailing list archive for the same
Checkpatch error in staging/fbtft.
They either removed the extra space between ‘,’ and ‘)’ that caused another
checkpatch error “space required after that ‘,’”,
or removed both ‘,’ and extra space before ‘)’ that caused build error.
The key difference in my change here is to make that argument “modifier” as
variable argument, not a positional argument anymore. After that, I could
safely remove both ‘,’ and extra space before ‘)’, without further checkpatch
error.
It passed my build and verificaton based on the file "fbtft-bus.i”.
It is fine for me if you think that it is not worth removing that checkpatch error.
--
Best Regard,
Eric LI
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-11-03 0:07 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-31 4:23 [PATCH] staging: fbtft: fix space prohibited before that close parenthesis Eric LI
2026-11-02 20:44 ` Andy Shevchenko
2026-11-03 0:07 ` Eric Lee
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®