* [PATCH] drm/radeon: avoid printing NULL strings
@ 2026-05-15 9:10 Arnd Bergmann
0 siblings, 0 replies; only message in thread
From: Arnd Bergmann @ 2026-05-15 9:10 UTC (permalink / raw)
To: Alex Deucher, Christian König, David Airlie, Simona Vetter,
Dave Airlie, Jerome Glisse
Cc: Arnd Bergmann, Chris Down, Borislav Petkov (AMD), amd-gfx,
dri-devel, linux-kernel
From: Arnd Bergmann <arnd@arndb.de>
gcc-10 warns about some printf format strings that are used to
unconditionally print a NULL string pointer from some call
sites:
In function 'evergreen_surface_check',
inlined from 'evergreen_cs_track_validate_stencil' at drivers/gpu/drm/radeon/evergreen_cs.c:592:6,
inlined from 'evergreen_cs_track_check' at drivers/gpu/drm/radeon/evergreen_cs.c:995:8:
include/linux/dev_printk.h:156:24: error: '%s' directive argument is null [-Werror=format-overflow=]
156 | dev_printk_index_wrap(_dev_warn, KERN_WARNING, dev, dev_fmt(fmt), ##__VA_ARGS__)
This is harmless here because the kernel prints them as "(null)", but
still breaks the build when compiling with -Werror.
Pass empty strings instead to avoid these warnings.
Fixes: 285484e2d55e ("drm/radeon: add support for evergreen/ni tiling informations v11")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/gpu/drm/radeon/evergreen_cs.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/radeon/evergreen_cs.c b/drivers/gpu/drm/radeon/evergreen_cs.c
index daaeae6ba141..550e8f35c7d2 100644
--- a/drivers/gpu/drm/radeon/evergreen_cs.c
+++ b/drivers/gpu/drm/radeon/evergreen_cs.c
@@ -589,7 +589,7 @@ static int evergreen_cs_track_validate_stencil(struct radeon_cs_parser *p)
return r;
}
- r = evergreen_surface_check(p, &surf, NULL);
+ r = evergreen_surface_check(p, &surf, "");
if (r) {
/* old userspace doesn't compute proper depth/stencil alignment
* check that alignment against a bigger byte per elements and
@@ -818,7 +818,7 @@ static int evergreen_cs_track_validate_texture(struct radeon_cs_parser *p,
}
/* align height */
- evergreen_surface_check(p, &surf, NULL);
+ evergreen_surface_check(p, &surf, "");
surf.nby = ALIGN(surf.nby, surf.halign);
r = evergreen_surface_check(p, &surf, "texture");
@@ -881,7 +881,7 @@ static int evergreen_cs_track_validate_texture(struct radeon_cs_parser *p,
surf.mode = ARRAY_1D_TILED_THIN1;
}
/* recompute alignment */
- evergreen_surface_check(p, &surf, NULL);
+ evergreen_surface_check(p, &surf, "");
break;
case ARRAY_LINEAR_GENERAL:
case ARRAY_LINEAR_ALIGNED:
--
2.39.5
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-05-15 9:11 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-15 9:10 [PATCH] drm/radeon: avoid printing NULL strings Arnd Bergmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox