All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 1/1] staging: fbtft: Consider type of init sequence values in fbtft_init_display()
@ 2022-03-04 19:34 Andy Shevchenko
  2022-03-08 10:18 ` Andy Shevchenko
  2022-03-14 17:28   ` Greg Kroah-Hartman
  0 siblings, 2 replies; 10+ messages in thread
From: Andy Shevchenko @ 2022-03-04 19:34 UTC (permalink / raw)
  To: Greg Kroah-Hartman, dri-devel, linux-fbdev, linux-staging, linux-kernel
  Cc: Andy Shevchenko

In the fbtft_init_display() the init sequence is printed for
the debug purposes. Unfortunately the current code doesn't take
into account that values in the buffer are of the s16 type.

Consider that and replace the printing code with fbtft_par_dbg_hex()
call.

Fixes: b888897014a9 ("staging/fbtft: Remove all strcpy() uses")
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/staging/fbtft/fbtft-core.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/fbtft/fbtft-core.c b/drivers/staging/fbtft/fbtft-core.c
index 4a35347b3020..b28a059ad3b4 100644
--- a/drivers/staging/fbtft/fbtft-core.c
+++ b/drivers/staging/fbtft/fbtft-core.c
@@ -1035,10 +1035,9 @@ int fbtft_init_display(struct fbtft_par *par)
 			for (j = 0; par->init_sequence[i + 1 + j] >= 0; j++)
 				;
 
-			fbtft_par_dbg(DEBUG_INIT_DISPLAY, par,
-				      "init: write(0x%02X) %*ph\n",
-				      par->init_sequence[i], j,
-				      &par->init_sequence[i + 1]);
+			fbtft_par_dbg_hex(DEBUG_INIT_DISPLAY, par, par->info->device,
+					  s16, &par->init_sequence[i + 1], j,
+					  "init: write(0x%02X)", par->init_sequence[i]);
 
 			/* Write */
 			j = 0;
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH v1 1/1] staging: fbtft: Consider type of init sequence values in fbtft_init_display()
  2022-03-04 19:34 [PATCH v1 1/1] staging: fbtft: Consider type of init sequence values in fbtft_init_display() Andy Shevchenko
@ 2022-03-08 10:18 ` Andy Shevchenko
  2022-03-08 10:46     ` Greg Kroah-Hartman
  2022-03-14 17:28   ` Greg Kroah-Hartman
  1 sibling, 1 reply; 10+ messages in thread
From: Andy Shevchenko @ 2022-03-08 10:18 UTC (permalink / raw)
  To: Greg Kroah-Hartman, dri-devel, linux-fbdev, linux-staging, linux-kernel
  Cc: Helge Deller

+Cc: Helge

Maybe you can pick this up?

On Fri, Mar 04, 2022 at 09:34:14PM +0200, Andy Shevchenko wrote:
> In the fbtft_init_display() the init sequence is printed for
> the debug purposes. Unfortunately the current code doesn't take
> into account that values in the buffer are of the s16 type.
> 
> Consider that and replace the printing code with fbtft_par_dbg_hex()
> call.
> 
> Fixes: b888897014a9 ("staging/fbtft: Remove all strcpy() uses")
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
>  drivers/staging/fbtft/fbtft-core.c | 7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/staging/fbtft/fbtft-core.c b/drivers/staging/fbtft/fbtft-core.c
> index 4a35347b3020..b28a059ad3b4 100644
> --- a/drivers/staging/fbtft/fbtft-core.c
> +++ b/drivers/staging/fbtft/fbtft-core.c
> @@ -1035,10 +1035,9 @@ int fbtft_init_display(struct fbtft_par *par)
>  			for (j = 0; par->init_sequence[i + 1 + j] >= 0; j++)
>  				;
>  
> -			fbtft_par_dbg(DEBUG_INIT_DISPLAY, par,
> -				      "init: write(0x%02X) %*ph\n",
> -				      par->init_sequence[i], j,
> -				      &par->init_sequence[i + 1]);
> +			fbtft_par_dbg_hex(DEBUG_INIT_DISPLAY, par, par->info->device,
> +					  s16, &par->init_sequence[i + 1], j,
> +					  "init: write(0x%02X)", par->init_sequence[i]);
>  
>  			/* Write */
>  			j = 0;
> -- 
> 2.34.1
> 

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v1 1/1] staging: fbtft: Consider type of init sequence values in fbtft_init_display()
  2022-03-08 10:18 ` Andy Shevchenko
@ 2022-03-08 10:46     ` Greg Kroah-Hartman
  0 siblings, 0 replies; 10+ messages in thread
From: Greg Kroah-Hartman @ 2022-03-08 10:46 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: dri-devel, linux-fbdev, linux-staging, linux-kernel, Helge Deller

On Tue, Mar 08, 2022 at 12:18:25PM +0200, Andy Shevchenko wrote:
> +Cc: Helge
> 
> Maybe you can pick this up?
> 
> On Fri, Mar 04, 2022 at 09:34:14PM +0200, Andy Shevchenko wrote:

You sent this less than a week ago!  Please relax, staging driver
patches are way down my list of priorities at the moment.  Wait at least
2 weeks before trying to get someone else to take patches for this
subsystem.

relax...

greg k-h

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v1 1/1] staging: fbtft: Consider type of init sequence values in fbtft_init_display()
@ 2022-03-08 10:46     ` Greg Kroah-Hartman
  0 siblings, 0 replies; 10+ messages in thread
From: Greg Kroah-Hartman @ 2022-03-08 10:46 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: linux-fbdev, linux-staging, linux-kernel, dri-devel, Helge Deller

On Tue, Mar 08, 2022 at 12:18:25PM +0200, Andy Shevchenko wrote:
> +Cc: Helge
> 
> Maybe you can pick this up?
> 
> On Fri, Mar 04, 2022 at 09:34:14PM +0200, Andy Shevchenko wrote:

You sent this less than a week ago!  Please relax, staging driver
patches are way down my list of priorities at the moment.  Wait at least
2 weeks before trying to get someone else to take patches for this
subsystem.

relax...

greg k-h

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v1 1/1] staging: fbtft: Consider type of init sequence values in fbtft_init_display()
  2022-03-08 10:46     ` Greg Kroah-Hartman
@ 2022-03-08 12:13       ` Andy Shevchenko
  -1 siblings, 0 replies; 10+ messages in thread
From: Andy Shevchenko @ 2022-03-08 12:13 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: dri-devel, linux-fbdev, linux-staging, linux-kernel, Helge Deller

On Tue, Mar 08, 2022 at 11:46:32AM +0100, Greg Kroah-Hartman wrote:
> On Tue, Mar 08, 2022 at 12:18:25PM +0200, Andy Shevchenko wrote:
> > +Cc: Helge
> > 
> > Maybe you can pick this up?
> > 
> > On Fri, Mar 04, 2022 at 09:34:14PM +0200, Andy Shevchenko wrote:
> 
> You sent this less than a week ago!  Please relax, staging driver
> patches are way down my list of priorities at the moment.  Wait at least
> 2 weeks before trying to get someone else to take patches for this
> subsystem.
> 
> relax...

Ah, okay. Sorry, I was browsing my long mailbox and haven't paid attention on
the date I had sent this one on.

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v1 1/1] staging: fbtft: Consider type of init sequence values in fbtft_init_display()
@ 2022-03-08 12:13       ` Andy Shevchenko
  0 siblings, 0 replies; 10+ messages in thread
From: Andy Shevchenko @ 2022-03-08 12:13 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: linux-fbdev, linux-staging, linux-kernel, dri-devel, Helge Deller

On Tue, Mar 08, 2022 at 11:46:32AM +0100, Greg Kroah-Hartman wrote:
> On Tue, Mar 08, 2022 at 12:18:25PM +0200, Andy Shevchenko wrote:
> > +Cc: Helge
> > 
> > Maybe you can pick this up?
> > 
> > On Fri, Mar 04, 2022 at 09:34:14PM +0200, Andy Shevchenko wrote:
> 
> You sent this less than a week ago!  Please relax, staging driver
> patches are way down my list of priorities at the moment.  Wait at least
> 2 weeks before trying to get someone else to take patches for this
> subsystem.
> 
> relax...

Ah, okay. Sorry, I was browsing my long mailbox and haven't paid attention on
the date I had sent this one on.

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v1 1/1] staging: fbtft: Consider type of init sequence values in fbtft_init_display()
  2022-03-04 19:34 [PATCH v1 1/1] staging: fbtft: Consider type of init sequence values in fbtft_init_display() Andy Shevchenko
@ 2022-03-14 17:28   ` Greg Kroah-Hartman
  2022-03-14 17:28   ` Greg Kroah-Hartman
  1 sibling, 0 replies; 10+ messages in thread
From: Greg Kroah-Hartman @ 2022-03-14 17:28 UTC (permalink / raw)
  To: Andy Shevchenko; +Cc: dri-devel, linux-fbdev, linux-staging, linux-kernel

On Fri, Mar 04, 2022 at 09:34:14PM +0200, Andy Shevchenko wrote:
> In the fbtft_init_display() the init sequence is printed for
> the debug purposes. Unfortunately the current code doesn't take
> into account that values in the buffer are of the s16 type.
> 
> Consider that and replace the printing code with fbtft_par_dbg_hex()
> call.
> 
> Fixes: b888897014a9 ("staging/fbtft: Remove all strcpy() uses")
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
>  drivers/staging/fbtft/fbtft-core.c | 7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/staging/fbtft/fbtft-core.c b/drivers/staging/fbtft/fbtft-core.c
> index 4a35347b3020..b28a059ad3b4 100644
> --- a/drivers/staging/fbtft/fbtft-core.c
> +++ b/drivers/staging/fbtft/fbtft-core.c
> @@ -1035,10 +1035,9 @@ int fbtft_init_display(struct fbtft_par *par)
>  			for (j = 0; par->init_sequence[i + 1 + j] >= 0; j++)
>  				;
>  
> -			fbtft_par_dbg(DEBUG_INIT_DISPLAY, par,
> -				      "init: write(0x%02X) %*ph\n",
> -				      par->init_sequence[i], j,
> -				      &par->init_sequence[i + 1]);
> +			fbtft_par_dbg_hex(DEBUG_INIT_DISPLAY, par, par->info->device,
> +					  s16, &par->init_sequence[i + 1], j,
> +					  "init: write(0x%02X)", par->init_sequence[i]);
>  
>  			/* Write */
>  			j = 0;
> -- 
> 2.34.1
> 
> 

Any reason you didn't test build this?

drivers/staging/fbtft/fbtft-core.c: In function ‘fbtft_init_display’:
drivers/staging/fbtft/fbtft-core.c:1038:48: error: passing argument 3 of ‘fbtft_dbg_hex’ discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
 1038 |                                           s16, &par->init_sequence[i + 1], j,
      |                                                ^~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/staging/fbtft/fbtft.h:441:50: note: in definition of macro ‘fbtft_par_dbg_hex’
  441 |                 fbtft_dbg_hex(dev, sizeof(type), buf,\
      |                                                  ^~~
drivers/staging/fbtft/fbtft-core.c:52:26: note: expected ‘void *’ but argument is of type ‘const s16 *’ {aka ‘const short int *’}
   52 |                    void *buf, size_t len, const char *fmt, ...)
      |                    ~~~~~~^~~
  LD [M]  drivers/staging/gdm724x/gdmulte.o
cc1: all warnings being treated as errors

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v1 1/1] staging: fbtft: Consider type of init sequence values in fbtft_init_display()
@ 2022-03-14 17:28   ` Greg Kroah-Hartman
  0 siblings, 0 replies; 10+ messages in thread
From: Greg Kroah-Hartman @ 2022-03-14 17:28 UTC (permalink / raw)
  To: Andy Shevchenko; +Cc: linux-fbdev, linux-staging, linux-kernel, dri-devel

On Fri, Mar 04, 2022 at 09:34:14PM +0200, Andy Shevchenko wrote:
> In the fbtft_init_display() the init sequence is printed for
> the debug purposes. Unfortunately the current code doesn't take
> into account that values in the buffer are of the s16 type.
> 
> Consider that and replace the printing code with fbtft_par_dbg_hex()
> call.
> 
> Fixes: b888897014a9 ("staging/fbtft: Remove all strcpy() uses")
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
>  drivers/staging/fbtft/fbtft-core.c | 7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/staging/fbtft/fbtft-core.c b/drivers/staging/fbtft/fbtft-core.c
> index 4a35347b3020..b28a059ad3b4 100644
> --- a/drivers/staging/fbtft/fbtft-core.c
> +++ b/drivers/staging/fbtft/fbtft-core.c
> @@ -1035,10 +1035,9 @@ int fbtft_init_display(struct fbtft_par *par)
>  			for (j = 0; par->init_sequence[i + 1 + j] >= 0; j++)
>  				;
>  
> -			fbtft_par_dbg(DEBUG_INIT_DISPLAY, par,
> -				      "init: write(0x%02X) %*ph\n",
> -				      par->init_sequence[i], j,
> -				      &par->init_sequence[i + 1]);
> +			fbtft_par_dbg_hex(DEBUG_INIT_DISPLAY, par, par->info->device,
> +					  s16, &par->init_sequence[i + 1], j,
> +					  "init: write(0x%02X)", par->init_sequence[i]);
>  
>  			/* Write */
>  			j = 0;
> -- 
> 2.34.1
> 
> 

Any reason you didn't test build this?

drivers/staging/fbtft/fbtft-core.c: In function ‘fbtft_init_display’:
drivers/staging/fbtft/fbtft-core.c:1038:48: error: passing argument 3 of ‘fbtft_dbg_hex’ discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
 1038 |                                           s16, &par->init_sequence[i + 1], j,
      |                                                ^~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/staging/fbtft/fbtft.h:441:50: note: in definition of macro ‘fbtft_par_dbg_hex’
  441 |                 fbtft_dbg_hex(dev, sizeof(type), buf,\
      |                                                  ^~~
drivers/staging/fbtft/fbtft-core.c:52:26: note: expected ‘void *’ but argument is of type ‘const s16 *’ {aka ‘const short int *’}
   52 |                    void *buf, size_t len, const char *fmt, ...)
      |                    ~~~~~~^~~
  LD [M]  drivers/staging/gdm724x/gdmulte.o
cc1: all warnings being treated as errors

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v1 1/1] staging: fbtft: Consider type of init sequence values in fbtft_init_display()
  2022-03-14 17:28   ` Greg Kroah-Hartman
@ 2022-03-16 16:51     ` Andy Shevchenko
  -1 siblings, 0 replies; 10+ messages in thread
From: Andy Shevchenko @ 2022-03-16 16:51 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: linux-fbdev, linux-staging, linux-kernel, dri-devel

On Mon, Mar 14, 2022 at 06:28:41PM +0100, Greg Kroah-Hartman wrote:
> On Fri, Mar 04, 2022 at 09:34:14PM +0200, Andy Shevchenko wrote:

...

> Any reason you didn't test build this?

My test build doesn't include the WERROR for this driver, so I missed the
warning. Sorry for that. Now fixed.

> drivers/staging/fbtft/fbtft-core.c: In function ‘fbtft_init_display’:
> drivers/staging/fbtft/fbtft-core.c:1038:48: error: passing argument 3 of ‘fbtft_dbg_hex’ discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
>  1038 |                                           s16, &par->init_sequence[i + 1], j,
>       |                                                ^~~~~~~~~~~~~~~~~~~~~~~~~~
> drivers/staging/fbtft/fbtft.h:441:50: note: in definition of macro ‘fbtft_par_dbg_hex’
>   441 |                 fbtft_dbg_hex(dev, sizeof(type), buf,\
>       |                                                  ^~~
> drivers/staging/fbtft/fbtft-core.c:52:26: note: expected ‘void *’ but argument is of type ‘const s16 *’ {aka ‘const short int *’}
>    52 |                    void *buf, size_t len, const char *fmt, ...)
>       |                    ~~~~~~^~~
>   LD [M]  drivers/staging/gdm724x/gdmulte.o
> cc1: all warnings being treated as errors

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v1 1/1] staging: fbtft: Consider type of init sequence values in fbtft_init_display()
@ 2022-03-16 16:51     ` Andy Shevchenko
  0 siblings, 0 replies; 10+ messages in thread
From: Andy Shevchenko @ 2022-03-16 16:51 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: dri-devel, linux-fbdev, linux-staging, linux-kernel

On Mon, Mar 14, 2022 at 06:28:41PM +0100, Greg Kroah-Hartman wrote:
> On Fri, Mar 04, 2022 at 09:34:14PM +0200, Andy Shevchenko wrote:

...

> Any reason you didn't test build this?

My test build doesn't include the WERROR for this driver, so I missed the
warning. Sorry for that. Now fixed.

> drivers/staging/fbtft/fbtft-core.c: In function ‘fbtft_init_display’:
> drivers/staging/fbtft/fbtft-core.c:1038:48: error: passing argument 3 of ‘fbtft_dbg_hex’ discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
>  1038 |                                           s16, &par->init_sequence[i + 1], j,
>       |                                                ^~~~~~~~~~~~~~~~~~~~~~~~~~
> drivers/staging/fbtft/fbtft.h:441:50: note: in definition of macro ‘fbtft_par_dbg_hex’
>   441 |                 fbtft_dbg_hex(dev, sizeof(type), buf,\
>       |                                                  ^~~
> drivers/staging/fbtft/fbtft-core.c:52:26: note: expected ‘void *’ but argument is of type ‘const s16 *’ {aka ‘const short int *’}
>    52 |                    void *buf, size_t len, const char *fmt, ...)
>       |                    ~~~~~~^~~
>   LD [M]  drivers/staging/gdm724x/gdmulte.o
> cc1: all warnings being treated as errors

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2022-03-16 16:52 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-04 19:34 [PATCH v1 1/1] staging: fbtft: Consider type of init sequence values in fbtft_init_display() Andy Shevchenko
2022-03-08 10:18 ` Andy Shevchenko
2022-03-08 10:46   ` Greg Kroah-Hartman
2022-03-08 10:46     ` Greg Kroah-Hartman
2022-03-08 12:13     ` Andy Shevchenko
2022-03-08 12:13       ` Andy Shevchenko
2022-03-14 17:28 ` Greg Kroah-Hartman
2022-03-14 17:28   ` Greg Kroah-Hartman
2022-03-16 16:51   ` Andy Shevchenko
2022-03-16 16:51     ` Andy Shevchenko

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.