drm/msm: fix %s null argument error
PATCH 1/1 drm/msm: fix %s null argument error
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.
--- drivers/gpu/drm/msm/disp/mdp5/mdp5_smp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/msm/disp/mdp5/mdp5_smp.c +1 -1
@@ -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; }
Signature · 1 line
2.45.2
Quoted 12 lines · Sherry Yang
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.
Quoted 6 lines
Fixes bc5289eed481 ("drm/msm/mdp5: add debugfs to show smp block status")Signed-off-by Sherry Yang <[email protected]>--- 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"
drivers/gpu/drm/msm/disp/mdp5/mdp5_smp.c void mdp5_smp_dump(struct mdp5_smp *smp, struct drm_printer *p, · line 357
Quoted 13 lines
drivers/gpu/drm/msm/disp/mdp5/mdp5_smp.c +1
-1@@ -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,
Quoted 21 lines · Abhinav Kumar
Quoted 6 lines · Sherry Yang
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=]Quoted 8 lines
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 <[email protected]>--- drivers/gpu/drm/msm/disp/mdp5/mdp5_smp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 1 line
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
Quoted 17 lines
drivers/gpu/drm/msm/disp/mdp5/mdp5_smp.c void mdp5_smp_dump(struct mdp5_smp *smp, struct drm_printer *p, · line 355
Quoted 12 lines
drivers/gpu/drm/msm/disp/mdp5/mdp5_smp.c +1
-1@@ -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 <[email protected]>
Dmitry Baryshkov
AppliedQuoted 9 lines · Sherry Yang
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,
Signature · 1 line
Dmitry Baryshkov <[email protected]>