diff options
author | Arnd Bergmann <arnd@arndb.de> | 2025-04-09 14:22:53 +0200 |
---|---|---|
committer | Matt Coster <matt.coster@imgtec.com> | 2025-04-24 10:51:55 +0100 |
commit | 3206a96675342badb0254558ba4b4c8764aa3ae7 (patch) | |
tree | af400600299139dbdc2c91ed3d3c8f0fd4f06a4b /scripts/lib/kdoc/kdoc_files.py | |
parent | 0228687423587d8ef448fc1d81f96539507aa5bb (diff) |
drm/imagination: avoid unused-const-variable warning
When CONFIG_DEBUG_FS is disabled, the stid_fmts[] array is not referenced
anywhere, causing a W=1 warning with gcc:
In file included from drivers/gpu/drm/imagination/pvr_fw_trace.c:7:
drivers/gpu/drm/imagination/pvr_rogue_fwif_sf.h:75:39: error: 'stid_fmts' defined but not used [-Werror=unused-const-variable=]
75 | static const struct rogue_km_stid_fmt stid_fmts[] = {
| ^~~~~~~~~
Rather than adding more #ifdef blocks, address this by changing the
existing #ifdef into equivalent IS_ENABLED() checks so gcc can see
where the symbol is used but still eliminate it from the object file.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Matt Coster <matt.coster@imgtec.com>
Link: https://lore.kernel.org/r/20250409122314.2848028-1-arnd@kernel.org
Signed-off-by: Matt Coster <matt.coster@imgtec.com>
Diffstat (limited to 'scripts/lib/kdoc/kdoc_files.py')
0 files changed, 0 insertions, 0 deletions