* [PATCH] staging: fbtft: Remove unused macro
@ 2026-10-26 8:18 himanshu bakshi
2026-10-26 8:51 ` Dan Carpenter
2026-10-26 9:23 ` Andy Shevchenko
0 siblings, 2 replies; 6+ messages in thread
From: himanshu bakshi @ 2026-10-26 8:18 UTC (permalink / raw)
To: andy, gregkh
Cc: dennylin0707, cenzhang, dri-devel, linux-fbdev, linux-staging,
linux-kernel, dan.carpenter, Himanshu Bakshi
From: Himanshu Bakshi <himanshu.bakshi478@gmail.com>
fbtft_init_dbg is not used in drivers/staging/fbtft directory and
since dev_dbg messages are good enough, fbtft_init_dbg should be
removed. After compiling the driver, there are no undefined macro
issues.
Signed-off-by: Himanshu Bakshi <himanshu.bakshi478@gmail.com>
---
drivers/staging/fbtft/fbtft.h | 7 -------
1 file changed, 7 deletions(-)
diff --git a/drivers/staging/fbtft/fbtft.h b/drivers/staging/fbtft/fbtft.h
index 40a7567df1eb..16459e4e0ba0 100644
--- a/drivers/staging/fbtft/fbtft.h
+++ b/drivers/staging/fbtft/fbtft.h
@@ -420,13 +420,6 @@ module_spi_driver(fbtft_driver_spi_driver);
#define DEBUG_REQUEST_GPIOS_MATCH BIT(30)
#define DEBUG_VERIFY_GPIOS BIT(31)
-#define fbtft_init_dbg(dev, format, arg...) \
-do { \
- if (unlikely((dev)->platform_data && \
- (((struct fbtft_platform_data *)(dev)->platform_data)->display.debug & DEBUG_DRIVER_INIT_FUNCTIONS))) \
- dev_info(dev, format, ##arg); \
-} while (0)
-
#define fbtft_par_dbg(level, par, format, arg...) \
do { \
if (unlikely((par)->debug & (level))) \
--
2.56.0
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] staging: fbtft: Remove unused macro
2026-10-26 8:18 [PATCH] staging: fbtft: Remove unused macro himanshu bakshi
@ 2026-10-26 8:51 ` Dan Carpenter
2026-10-26 9:24 ` Himanshu Bakshi
2026-10-26 9:23 ` Andy Shevchenko
1 sibling, 1 reply; 6+ messages in thread
From: Dan Carpenter @ 2026-10-26 8:51 UTC (permalink / raw)
To: himanshu bakshi
Cc: andy, gregkh, dennylin0707, cenzhang, dri-devel, linux-fbdev,
linux-staging, linux-kernel, dan.carpenter
On Mon, Oct 26, 2026 at 01:48:32PM +0530, himanshu bakshi wrote:
> From: Himanshu Bakshi <himanshu.bakshi478@gmail.com>
>
> fbtft_init_dbg is not used in drivers/staging/fbtft directory and
> since dev_dbg messages are good enough, fbtft_init_dbg should be
> removed. After compiling the driver, there are no undefined macro
> issues.
This commit message is sort of acceptable but a better commit message
would be:
"The fbtft_init_dbg() macro is not used, so delete it."
1. () after the macro name to show it works as a function.
2. We care about the whole kernel not just drivers/staging/fbtft.
3. No need to discuss dev_dbg(). That is unrelated.
4. No need to discuss compiling the driver since that is assumed.
Otherwise it looks fine.
Reviewed-by: Dan Carpenter <error27@gmail.com>
regards,
dan carpenter
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] staging: fbtft: Remove unused macro
2026-10-26 8:51 ` Dan Carpenter
@ 2026-10-26 9:24 ` Himanshu Bakshi
0 siblings, 0 replies; 6+ messages in thread
From: Himanshu Bakshi @ 2026-10-26 9:24 UTC (permalink / raw)
To: Dan Carpenter
Cc: andy, gregkh, dennylin0707, cenzhang, dri-devel, linux-fbdev,
linux-staging, linux-kernel, dan.carpenter
On Mon, Oct 26, 2026 at 2:21 PM Dan Carpenter <error27@gmail.com> wrote:
> This commit message is sort of acceptable but a better commit message
> would be:
>
> "The fbtft_init_dbg() macro is not used, so delete it."
>
> 1. () after the macro name to show it works as a function.
> 2. We care about the whole kernel not just drivers/staging/fbtft.
> 3. No need to discuss dev_dbg(). That is unrelated.
> 4. No need to discuss compiling the driver since that is assumed.
>
> Otherwise it looks fine.
>
> Reviewed-by: Dan Carpenter <error27@gmail.com>
>
> regards,
> dan carpenter
Hi Dan,
Thank you so much for the review. I cannot find any call site for this
macro in the overall kernel anywhere and hence it is safe to remove
it. I have sent over the PATCH v2 with all the changes that you
suggested and will be glad if you take a look at it.
Thanks and regards,
Himanshu Bakshi
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] staging: fbtft: Remove unused macro
2026-10-26 8:18 [PATCH] staging: fbtft: Remove unused macro himanshu bakshi
2026-10-26 8:51 ` Dan Carpenter
@ 2026-10-26 9:23 ` Andy Shevchenko
2026-10-26 9:24 ` Andy Shevchenko
2026-10-26 9:32 ` Himanshu Bakshi
1 sibling, 2 replies; 6+ messages in thread
From: Andy Shevchenko @ 2026-10-26 9:23 UTC (permalink / raw)
To: himanshu bakshi
Cc: andy, gregkh, dennylin0707, cenzhang, dri-devel, linux-fbdev,
linux-staging, linux-kernel, dan.carpenter
On Mon, Oct 26, 2026 at 01:48:32PM +0530, himanshu bakshi wrote:
> From: Himanshu Bakshi <himanshu.bakshi478@gmail.com>
>
> fbtft_init_dbg is not used in drivers/staging/fbtft directory and
We refer to the functions and semantically similar macros as
func() or macro() in the text and comments.
> since dev_dbg messages are good enough, fbtft_init_dbg should be
Ditto for both dev_dbg() and fbtft_init_dbg().
> removed. After compiling the driver, there are no undefined macro
> issues.
> Signed-off-by: Himanshu Bakshi <himanshu.bakshi478@gmail.com>
> ---
It doesn't say how you tested this, though.
...
Code wise LGTM.
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] staging: fbtft: Remove unused macro
2026-10-26 9:23 ` Andy Shevchenko
@ 2026-10-26 9:24 ` Andy Shevchenko
2026-10-26 9:32 ` Himanshu Bakshi
1 sibling, 0 replies; 6+ messages in thread
From: Andy Shevchenko @ 2026-10-26 9:24 UTC (permalink / raw)
To: himanshu bakshi
Cc: andy, gregkh, dennylin0707, cenzhang, dri-devel, linux-fbdev,
linux-staging, linux-kernel, dan.carpenter
On Mon, Oct 26, 2026 at 11:23:17AM +0200, Andy Shevchenko wrote:
> On Mon, Oct 26, 2026 at 01:48:32PM +0530, himanshu bakshi wrote:
> >
> > fbtft_init_dbg is not used in drivers/staging/fbtft directory and
>
> We refer to the functions and semantically similar macros as
> func() or macro() in the text and comments.
>
> > since dev_dbg messages are good enough, fbtft_init_dbg should be
>
> Ditto for both dev_dbg() and fbtft_init_dbg().
>
> > removed. After compiling the driver, there are no undefined macro
> > issues.
>
> > Signed-off-by: Himanshu Bakshi <himanshu.bakshi478@gmail.com>
> > ---
>
> It doesn't say how you tested this, though.
Ah, after reading Dan's email I noticed that the last sentence in the commit
message actually should be located here, in the comment block.
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] staging: fbtft: Remove unused macro
2026-10-26 9:23 ` Andy Shevchenko
2026-10-26 9:24 ` Andy Shevchenko
@ 2026-10-26 9:32 ` Himanshu Bakshi
1 sibling, 0 replies; 6+ messages in thread
From: Himanshu Bakshi @ 2026-10-26 9:32 UTC (permalink / raw)
To: Andy Shevchenko
Cc: andy, gregkh, dennylin0707, cenzhang, dri-devel, linux-fbdev,
linux-staging, linux-kernel, dan.carpenter
Hi Andy,
On Mon, Oct 26, 2026 at 2:53 PM Andy Shevchenko
<andriy.shevchenko@intel.com> wrote:
> > removed. After compiling the driver, there are no undefined macro
> > issues.
>
> > Signed-off-by: Himanshu Bakshi <himanshu.bakshi478@gmail.com>
> > ---
>
> It doesn't say how you tested this, though.
I believe there is no need for test since its a macro deletion and there is
no call for fbtft_init_dbg() which should be apparent from the kernel
and driver being compiled successfully...
Thanks and regards,
Himanshu Bakshi
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2026-10-26 9:32 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-26 8:18 [PATCH] staging: fbtft: Remove unused macro himanshu bakshi
2026-10-26 8:51 ` Dan Carpenter
2026-10-26 9:24 ` Himanshu Bakshi
2026-10-26 9:23 ` Andy Shevchenko
2026-10-26 9:24 ` Andy Shevchenko
2026-10-26 9:32 ` Himanshu Bakshi
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®