mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 1/1] drm/msm: fix %s null argument error
@ 2024-08-27 16:53 Sherry Yang
  2024-08-27 17:50 ` Abhinav Kumar
  2024-09-05  3:33 ` Dmitry Baryshkov
  0 siblings, 2 replies; 4+ messages in thread
From: Sherry Yang @ 2024-08-27 16:53 UTC (permalink / raw)
  To: robdclark, quic_abhinavk, dmitry.baryshkov, sean, marijn.suijten,
	airlied, daniel, ruanjinjie
  Cc: sherry.yang, linux-arm-msm, dri-devel, freedreno, linux-kernel

The following build error was triggered because of NULL string argument:

BUILDSTDERR: drivers/gpu/drm/msm/disp/mdp5/mdp5_smp.c: In function 'mdp5_smp_dump':
BUILDSTDERR: drivers/gpu/drm/msm/disp/mdp5/mdp5_smp.c:352:51: error: '%s' directive argument is null [-Werror=format-overflow=]
BUILDSTDERR:   352 |                         drm_printf(p, "%s:%d\t%d\t%s\n",
BUILDSTDERR:       |                                                   ^~
BUILDSTDERR: drivers/gpu/drm/msm/disp/mdp5/mdp5_smp.c:352:51: error: '%s' directive argument is null [-Werror=format-overflow=]

This happens from the commit a61ddb4393ad ("drm: enable (most) W=1
warnings by default across the subsystem"). Using "(null)" instead
to fix it.

Fixes: bc5289eed481 ("drm/msm/mdp5: add debugfs to show smp block status")
Signed-off-by: Sherry Yang <sherry.yang@oracle.com>
---
 drivers/gpu/drm/msm/disp/mdp5/mdp5_smp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/msm/disp/mdp5/mdp5_smp.c b/drivers/gpu/drm/msm/disp/mdp5/mdp5_smp.c
index 3a7f7edda96b..500b7dc895d0 100644
--- a/drivers/gpu/drm/msm/disp/mdp5/mdp5_smp.c
+++ b/drivers/gpu/drm/msm/disp/mdp5/mdp5_smp.c
@@ -351,7 +351,7 @@ void mdp5_smp_dump(struct mdp5_smp *smp, struct drm_printer *p,
 
 			drm_printf(p, "%s:%d\t%d\t%s\n",
 				pipe2name(pipe), j, inuse,
-				plane ? plane->name : NULL);
+				plane ? plane->name : "(null)");
 
 			total += inuse;
 		}
-- 
2.45.2


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

* Re: [PATCH 1/1] drm/msm: fix %s null argument error
  2024-08-27 16:53 [PATCH 1/1] drm/msm: fix %s null argument error Sherry Yang
@ 2024-08-27 17:50 ` Abhinav Kumar
  2024-08-27 18:48   ` Sherry Yang
  2024-09-05  3:33 ` Dmitry Baryshkov
  1 sibling, 1 reply; 4+ messages in thread
From: Abhinav Kumar @ 2024-08-27 17:50 UTC (permalink / raw)
  To: Sherry Yang, robdclark, dmitry.baryshkov, sean, marijn.suijten,
	airlied, daniel, ruanjinjie
  Cc: linux-arm-msm, dri-devel, freedreno, linux-kernel



On 8/27/2024 9:53 AM, Sherry Yang wrote:
> The following build error was triggered because of NULL string argument:
> 
> BUILDSTDERR: drivers/gpu/drm/msm/disp/mdp5/mdp5_smp.c: In function 'mdp5_smp_dump':
> BUILDSTDERR: drivers/gpu/drm/msm/disp/mdp5/mdp5_smp.c:352:51: error: '%s' directive argument is null [-Werror=format-overflow=]
> BUILDSTDERR:   352 |                         drm_printf(p, "%s:%d\t%d\t%s\n",
> BUILDSTDERR:       |                                                   ^~
> BUILDSTDERR: drivers/gpu/drm/msm/disp/mdp5/mdp5_smp.c:352:51: error: '%s' directive argument is null [-Werror=format-overflow=]
> 
> This happens from the commit a61ddb4393ad ("drm: enable (most) W=1
> warnings by default across the subsystem"). Using "(null)" instead
> to fix it.
> 
> Fixes: bc5289eed481 ("drm/msm/mdp5: add debugfs to show smp block status")
> Signed-off-by: Sherry Yang <sherry.yang@oracle.com>
> ---
>   drivers/gpu/drm/msm/disp/mdp5/mdp5_smp.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 

I am not sure how the patch got titled 1/1 and not just "PATCH". It 
should be just "PATCH"

> diff --git a/drivers/gpu/drm/msm/disp/mdp5/mdp5_smp.c b/drivers/gpu/drm/msm/disp/mdp5/mdp5_smp.c
> index 3a7f7edda96b..500b7dc895d0 100644
> --- a/drivers/gpu/drm/msm/disp/mdp5/mdp5_smp.c
> +++ b/drivers/gpu/drm/msm/disp/mdp5/mdp5_smp.c
> @@ -351,7 +351,7 @@ void mdp5_smp_dump(struct mdp5_smp *smp, struct drm_printer *p,
>   
>   			drm_printf(p, "%s:%d\t%d\t%s\n",
>   				pipe2name(pipe), j, inuse,
> -				plane ? plane->name : NULL);
> +				plane ? plane->name : "(null)");
>   
>   			total += inuse;
>   		}

Change itself looks fine to me,


Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com>

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

* Re: [PATCH 1/1] drm/msm: fix %s null argument error
  2024-08-27 17:50 ` Abhinav Kumar
@ 2024-08-27 18:48   ` Sherry Yang
  0 siblings, 0 replies; 4+ messages in thread
From: Sherry Yang @ 2024-08-27 18:48 UTC (permalink / raw)
  To: Abhinav Kumar
  Cc: robdclark, dmitry.baryshkov, sean, marijn.suijten, airlied,
	daniel, ruanjinjie, linux-arm-msm, dri-devel, freedreno,
	linux-kernel


> On Aug 27, 2024, at 10:50 AM, Abhinav Kumar <quic_abhinavk@quicinc.com> wrote:
> 
> 
> 
> On 8/27/2024 9:53 AM, Sherry Yang wrote:
>> The following build error was triggered because of NULL string argument:
>> BUILDSTDERR: drivers/gpu/drm/msm/disp/mdp5/mdp5_smp.c: In function 'mdp5_smp_dump':
>> BUILDSTDERR: drivers/gpu/drm/msm/disp/mdp5/mdp5_smp.c:352:51: error: '%s' directive argument is null [-Werror=format-overflow=]
>> BUILDSTDERR:   352 |                         drm_printf(p, "%s:%d\t%d\t%s\n",
>> BUILDSTDERR:       |                                                   ^~
>> BUILDSTDERR: drivers/gpu/drm/msm/disp/mdp5/mdp5_smp.c:352:51: error: '%s' directive argument is null [-Werror=format-overflow=]
>> This happens from the commit a61ddb4393ad ("drm: enable (most) W=1
>> warnings by default across the subsystem"). Using "(null)" instead
>> to fix it.
>> Fixes: bc5289eed481 ("drm/msm/mdp5: add debugfs to show smp block status")
>> Signed-off-by: Sherry Yang <sherry.yang@oracle.com>
>> ---
>>  drivers/gpu/drm/msm/disp/mdp5/mdp5_smp.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> I am not sure how the patch got titled 1/1 and not just "PATCH". It should be just "PATCH"

My bad. I generated the patch with parameter “--numbered” in “git format-patch”, it will output in [PATCH n/m] format, even with a single patch. Will drop it for single patch next time.

Thanks,
Sherry

> 
>> diff --git a/drivers/gpu/drm/msm/disp/mdp5/mdp5_smp.c b/drivers/gpu/drm/msm/disp/mdp5/mdp5_smp.c
>> index 3a7f7edda96b..500b7dc895d0 100644
>> --- a/drivers/gpu/drm/msm/disp/mdp5/mdp5_smp.c
>> +++ b/drivers/gpu/drm/msm/disp/mdp5/mdp5_smp.c
>> @@ -351,7 +351,7 @@ void mdp5_smp_dump(struct mdp5_smp *smp, struct drm_printer *p,
>>     drm_printf(p, "%s:%d\t%d\t%s\n",
>>   pipe2name(pipe), j, inuse,
>> - plane ? plane->name : NULL);
>> + plane ? plane->name : "(null)");
>>     total += inuse;
>>   }
> 
> Change itself looks fine to me,
> 
> 
> Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com>



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

* Re: [PATCH 1/1] drm/msm: fix %s null argument error
  2024-08-27 16:53 [PATCH 1/1] drm/msm: fix %s null argument error Sherry Yang
  2024-08-27 17:50 ` Abhinav Kumar
@ 2024-09-05  3:33 ` Dmitry Baryshkov
  1 sibling, 0 replies; 4+ messages in thread
From: Dmitry Baryshkov @ 2024-09-05  3:33 UTC (permalink / raw)
  To: robdclark, quic_abhinavk, sean, marijn.suijten, airlied, daniel,
	ruanjinjie, Sherry Yang
  Cc: linux-arm-msm, dri-devel, freedreno, linux-kernel


On Tue, 27 Aug 2024 09:53:37 -0700, Sherry Yang wrote:
> The following build error was triggered because of NULL string argument:
> 
> BUILDSTDERR: drivers/gpu/drm/msm/disp/mdp5/mdp5_smp.c: In function 'mdp5_smp_dump':
> BUILDSTDERR: drivers/gpu/drm/msm/disp/mdp5/mdp5_smp.c:352:51: error: '%s' directive argument is null [-Werror=format-overflow=]
> BUILDSTDERR:   352 |                         drm_printf(p, "%s:%d\t%d\t%s\n",
> BUILDSTDERR:       |                                                   ^~
> BUILDSTDERR: drivers/gpu/drm/msm/disp/mdp5/mdp5_smp.c:352:51: error: '%s' directive argument is null [-Werror=format-overflow=]
> 
> [...]

Applied, thanks!

[1/1] drm/msm: fix %s null argument error
      https://gitlab.freedesktop.org/lumag/msm/-/commit/25b85075150f

Best regards,
-- 
Dmitry Baryshkov <dmitry.baryshkov@linaro.org>

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

end of thread, other threads:[~2024-09-05  3:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-08-27 16:53 [PATCH 1/1] drm/msm: fix %s null argument error Sherry Yang
2024-08-27 17:50 ` Abhinav Kumar
2024-08-27 18:48   ` Sherry Yang
2024-09-05  3:33 ` Dmitry Baryshkov

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®