diff options
author | Geert Uytterhoeven <geert+renesas@glider.be> | 2024-07-30 17:58:12 +0200 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2024-08-13 10:27:15 -0400 |
commit | c6dbab46324b1742b50dc2fb5c1fee2c28129439 (patch) | |
tree | 829fbc176b1777b1fc196f7fbf7056abaa05d8f2 /drivers/gpu/drm/amd/amdgpu/amdgpu_psp_ta.c | |
parent | 020620424b27bababf7f53d00692ab919c357a3f (diff) |
drm/radeon/r100: Handle unknown family in r100_cp_init_microcode()
With -Werror:
In function ‘r100_cp_init_microcode’,
inlined from ‘r100_cp_init’ at drivers/gpu/drm/radeon/r100.c:1136:7:
include/linux/printk.h:465:44: error: ‘%s’ directive argument is null [-Werror=format-overflow=]
465 | #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__)
| ^
include/linux/printk.h:437:17: note: in definition of macro ‘printk_index_wrap’
437 | _p_func(_fmt, ##__VA_ARGS__); \
| ^~~~~~~
include/linux/printk.h:508:9: note: in expansion of macro ‘printk’
508 | printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~
drivers/gpu/drm/radeon/r100.c:1062:17: note: in expansion of macro ‘pr_err’
1062 | pr_err("radeon_cp: Failed to load firmware \"%s\"\n", fw_name);
| ^~~~~~
Fix this by converting the if/else if/... construct into a proper
switch() statement with a default to handle the error case.
As a bonus, the generated code is ca. 100 bytes smaller (with gcc 11.4.0
targeting arm32).
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_psp_ta.c')
0 files changed, 0 insertions, 0 deletions