* [PATCH v2] staging: fbtft: Fix line length warning
@ 2026-10-26 4:45 himanshu bakshi
2026-10-26 9:20 ` Andy Shevchenko
0 siblings, 1 reply; 10+ messages in thread
From: himanshu bakshi @ 2026-10-26 4:45 UTC (permalink / raw)
To: andy
Cc: gregkh, dri-devel, linux-fbdev, linux-staging, linux-kernel,
Himanshu Bakshi
From: Himanshu Bakshi <himanshu.bakshi478@gmail.com>
Split the line in fbtft_init_dbg macro to keep it within the limit of 100
columns and address the checkpatch warning. Also aligned backslashes (\)
for the macro. Added a temproray variable for platform data.
Signed-off-by: Himanshu Bakshi <himanshu.bakshi478@gmail.com>
---
drivers/staging/fbtft/fbtft.h | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/drivers/staging/fbtft/fbtft.h b/drivers/staging/fbtft/fbtft.h
index fd7f8fc2afba..ceaa9a3906ef 100644
--- a/drivers/staging/fbtft/fbtft.h
+++ b/drivers/staging/fbtft/fbtft.h
@@ -421,12 +421,11 @@ 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); \
+#define fbtft_init_dbg(dev, format, arg...) \
+do { \
+ struct fbtft_platform_data *pdata = dev_get_platdata((dev)); \
+ if (unlikely(pdata && (pdata->display.debug & DEBUG_DRIVER_INIT_FUNCTIONS))) \
+ dev_info(dev, format, ##arg); \
} while (0)
#define fbtft_par_dbg(level, par, format, arg...) \
--
2.56.0
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: [PATCH v2] staging: fbtft: Fix line length warning
2026-10-26 4:45 [PATCH v2] staging: fbtft: Fix line length warning himanshu bakshi
@ 2026-10-26 9:20 ` Andy Shevchenko
2026-10-26 9:28 ` Himanshu Bakshi
0 siblings, 1 reply; 10+ messages in thread
From: Andy Shevchenko @ 2026-10-26 9:20 UTC (permalink / raw)
To: himanshu bakshi
Cc: andy, gregkh, dri-devel, linux-fbdev, linux-staging, linux-kernel
On Mon, Oct 26, 2026 at 10:15:23AM +0530, himanshu bakshi wrote:
> From: Himanshu Bakshi <himanshu.bakshi478@gmail.com>
>
> Split the line in fbtft_init_dbg macro to keep it within the limit of 100
> columns and address the checkpatch warning. Also aligned backslashes (\)
> for the macro. Added a temproray variable for platform data.
>
> Signed-off-by: Himanshu Bakshi <himanshu.bakshi478@gmail.com>
> ---
Where is the changelog?
Why do you think this patch is anyhow useful (based on the previous discussion
and your observations)?
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v2] staging: fbtft: Fix line length warning
2026-10-26 9:20 ` Andy Shevchenko
@ 2026-10-26 9:28 ` Himanshu Bakshi
0 siblings, 0 replies; 10+ messages in thread
From: Himanshu Bakshi @ 2026-10-26 9:28 UTC (permalink / raw)
To: Andy Shevchenko
Cc: andy, gregkh, dri-devel, linux-fbdev, linux-staging, linux-kernel
On Mon, Oct 26, 2026 at 2:50 PM Andy Shevchenko
<andriy.shevchenko@intel.com> wrote:
> Where is the changelog?
> Why do you think this patch is anyhow useful (based on the previous discussion
> and your observations)?
Based on the discussion with Dan Carpenter (error27@gmail.com)
It was decided that since this macro is not being used throughout
the whole kernel, the macro itself be deleted since it has the
replacement being used.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH v2] staging: fbtft: Fix line length warning
@ 2026-10-25 16:40 himanshu bakshi
2026-10-25 21:02 ` Andy Shevchenko
2026-10-26 5:48 ` Dan Carpenter
0 siblings, 2 replies; 10+ messages in thread
From: himanshu bakshi @ 2026-10-25 16:40 UTC (permalink / raw)
To: andy
Cc: gregkh, dri-devel, linux-fbdev, linux-staging, linux-kernel,
Himanshu Bakshi
From: Himanshu Bakshi <himanshu.bakshi478@gmail.com>
Hi Andy,
I have made sure that the \ (backslash) is properly aligned to the same
column as the rest of the macro. I have also taken into account your
advice and hence added a local variable for platform data.
After some thorough searching through the respective directory, I have
not found any calls for fbtft_init_dbg. This might be because it's a
helper macro that might be useful as the driver progresses.
I have also noticed that some other macros around this one have simple
style issues and if you would like, I can send another different patch
cleaning up those too.
I have also done minimal testing by using the macro once to make sure it
compiles and has no errors, if you would like, I can also run any
standalone tests for this macro.
Thanks and Regards,
Himanshu Bakshi
Signed-off-by: Himanshu Bakshi <himanshu.bakshi478@gmail.com>
---
drivers/staging/fbtft/fbtft.h | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/drivers/staging/fbtft/fbtft.h b/drivers/staging/fbtft/fbtft.h
index fd7f8fc2afba..ceaa9a3906ef 100644
--- a/drivers/staging/fbtft/fbtft.h
+++ b/drivers/staging/fbtft/fbtft.h
@@ -421,12 +421,11 @@ 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); \
+#define fbtft_init_dbg(dev, format, arg...) \
+do { \
+ struct fbtft_platform_data *pdata = dev_get_platdata((dev)); \
+ if (unlikely(pdata && (pdata->display.debug & DEBUG_DRIVER_INIT_FUNCTIONS))) \
+ dev_info(dev, format, ##arg); \
} while (0)
#define fbtft_par_dbg(level, par, format, arg...) \
--
2.56.0
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: [PATCH v2] staging: fbtft: Fix line length warning
2026-10-25 16:40 himanshu bakshi
@ 2026-10-25 21:02 ` Andy Shevchenko
2026-10-26 5:48 ` Dan Carpenter
1 sibling, 0 replies; 10+ messages in thread
From: Andy Shevchenko @ 2026-10-25 21:02 UTC (permalink / raw)
To: himanshu bakshi
Cc: andy, gregkh, dri-devel, linux-fbdev, linux-staging, linux-kernel
On Sun, Oct 25, 2026 at 10:10:03PM +0530, himanshu bakshi wrote:
> From: Himanshu Bakshi <himanshu.bakshi478@gmail.com>
>
> Hi Andy,
>
> I have made sure that the \ (backslash) is properly aligned to the same
> column as the rest of the macro. I have also taken into account your
> advice and hence added a local variable for platform data.
>
> After some thorough searching through the respective directory, I have
> not found any calls for fbtft_init_dbg. This might be because it's a
> helper macro that might be useful as the driver progresses.
>
> I have also noticed that some other macros around this one have simple
> style issues and if you would like, I can send another different patch
> cleaning up those too.
>
> I have also done minimal testing by using the macro once to make sure it
> compiles and has no errors, if you would like, I can also run any
> standalone tests for this macro.
>
> Thanks and Regards,
> Himanshu Bakshi
It's not a commit message. Please, make commit message be appropriate and
any comments like above is better to be sent in the reply of the previous
discussion (v1 round in this case, for instance).
> Signed-off-by: Himanshu Bakshi <himanshu.bakshi478@gmail.com>
> ---
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v2] staging: fbtft: Fix line length warning
2026-10-25 16:40 himanshu bakshi
2026-10-25 21:02 ` Andy Shevchenko
@ 2026-10-26 5:48 ` Dan Carpenter
2026-10-26 5:53 ` Himanshu Bakshi
1 sibling, 1 reply; 10+ messages in thread
From: Dan Carpenter @ 2026-10-26 5:48 UTC (permalink / raw)
To: himanshu bakshi
Cc: andy, gregkh, dri-devel, linux-fbdev, linux-staging, linux-kernel
On Sun, Oct 25, 2026 at 10:10:03PM +0530, himanshu bakshi wrote:
> From: Himanshu Bakshi <himanshu.bakshi478@gmail.com>
>
> Hi Andy,
>
We don't need this in a commit message.
Also I would prefer to delete these weirdo debug messages. The
normal dev_dbg() messages are good enough. Plus, is this even
used?
regards,
dan carpenter
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v2] staging: fbtft: Fix line length warning
2026-10-26 5:48 ` Dan Carpenter
@ 2026-10-26 5:53 ` Himanshu Bakshi
2026-10-26 6:02 ` Dan Carpenter
0 siblings, 1 reply; 10+ messages in thread
From: Himanshu Bakshi @ 2026-10-26 5:53 UTC (permalink / raw)
To: Dan Carpenter
Cc: andy, gregkh, dri-devel, linux-fbdev, linux-staging, linux-kernel
Hi Dan and Andy,
I have sent over the comment on the v1 message chain and
also sent over the revised patch separately as v2, I will be glad
if you will go through it.
Thanks and regards,
Himanshu Bakshi
On Mon, Oct 26, 2026 at 11:18 AM Dan Carpenter <error27@gmail.com> wrote:
>
> On Sun, Oct 25, 2026 at 10:10:03PM +0530, himanshu bakshi wrote:
> > From: Himanshu Bakshi <himanshu.bakshi478@gmail.com>
> >
> > Hi Andy,
> >
>
> We don't need this in a commit message.
>
> Also I would prefer to delete these weirdo debug messages. The
> normal dev_dbg() messages are good enough. Plus, is this even
> used?
>
> regards,
> dan carpenter
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v2] staging: fbtft: Fix line length warning
2026-10-26 5:53 ` Himanshu Bakshi
@ 2026-10-26 6:02 ` Dan Carpenter
2026-10-26 6:16 ` Himanshu Bakshi
0 siblings, 1 reply; 10+ messages in thread
From: Dan Carpenter @ 2026-10-26 6:02 UTC (permalink / raw)
To: Himanshu Bakshi
Cc: andy, gregkh, dri-devel, linux-fbdev, linux-staging, linux-kernel
On Mon, Oct 26, 2026 at 11:23:21AM +0530, Himanshu Bakshi wrote:
> Hi Dan and Andy,
>
> I have sent over the comment on the v1 message chain and
> also sent over the revised patch separately as v2, I will be glad
> if you will go through it.
The subject here says we are already discussing v2 so I'm confused.
You can go through my response and decide what still applies I guess...
regards,
dan carpenter
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v2] staging: fbtft: Fix line length warning
2026-10-26 6:02 ` Dan Carpenter
@ 2026-10-26 6:16 ` Himanshu Bakshi
2026-10-26 6:31 ` Dan Carpenter
0 siblings, 1 reply; 10+ messages in thread
From: Himanshu Bakshi @ 2026-10-26 6:16 UTC (permalink / raw)
To: Dan Carpenter
Cc: andy, gregkh, dri-devel, linux-fbdev, linux-staging, linux-kernel
Hi Dan and Andy,
I have not found any call site for fbtft_init_dbg and just assumed
that it might be useful later on as the driver develops. If you are
considering removal of the macro, please let me know, I can send
over a separate removal patch of the same.
I have also noticed that other helper macro just after this one
like fbtft_par_dbg and fbtft_par_dbg_hex have some minor style
issues too. If you want me to correct its style issue too, just let me
know.
Also, regarding the confusion of threads, I had sent over the patch
with a revised commit message as PATCH v2, which matches this
discussion's subject. (which I apologize for). And also sent over
the reply that I meant here in the original PATCH v1 email.
I hope you will forgive my incompetence,
Thanks and regards,
Himanshu Bakshi
On Mon, Oct 26, 2026 at 11:32 AM Dan Carpenter <error27@gmail.com> wrote:
>
> On Mon, Oct 26, 2026 at 11:23:21AM +0530, Himanshu Bakshi wrote:
> > Hi Dan and Andy,
> >
> > I have sent over the comment on the v1 message chain and
> > also sent over the revised patch separately as v2, I will be glad
> > if you will go through it.
>
> The subject here says we are already discussing v2 so I'm confused.
> You can go through my response and decide what still applies I guess...
>
> regards,
> dan carpenter
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v2] staging: fbtft: Fix line length warning
2026-10-26 6:16 ` Himanshu Bakshi
@ 2026-10-26 6:31 ` Dan Carpenter
0 siblings, 0 replies; 10+ messages in thread
From: Dan Carpenter @ 2026-10-26 6:31 UTC (permalink / raw)
To: Himanshu Bakshi
Cc: andy, gregkh, dri-devel, linux-fbdev, linux-staging, linux-kernel
On Mon, Oct 26, 2026 at 11:46:48AM +0530, Himanshu Bakshi wrote:
> Hi Dan and Andy,
>
> I have not found any call site for fbtft_init_dbg and just assumed
> that it might be useful later on as the driver develops. If you are
> considering removal of the macro, please let me know, I can send
> over a separate removal patch of the same.
Yes. Please do.
(also no top posting)
regards,
dan carpenter
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2026-10-26 9:28 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-26 4:45 [PATCH v2] staging: fbtft: Fix line length warning himanshu bakshi
2026-10-26 9:20 ` Andy Shevchenko
2026-10-26 9:28 ` Himanshu Bakshi
-- strict thread matches above, loose matches on Subject: below --
2026-10-25 16:40 himanshu bakshi
2026-10-25 21:02 ` Andy Shevchenko
2026-10-26 5:48 ` Dan Carpenter
2026-10-26 5:53 ` Himanshu Bakshi
2026-10-26 6:02 ` Dan Carpenter
2026-10-26 6:16 ` Himanshu Bakshi
2026-10-26 6:31 ` Dan Carpenter
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®