]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
drm/amdkfd: fix the warning for potential insecure string
authorSunil Khatri <sunil.khatri@amd.com>
Fri, 6 Mar 2026 07:23:30 +0000 (12:53 +0530)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 6 Mar 2026 21:33:55 +0000 (16:33 -0500)
commit8c78845bf9b18d336e5b5d00c966176a3c3f9581
treec25a1c8e97f5070e2c068178ac0746dc9c88200e
parent210fa907a64496af6341c3455cb267d2b68dfb12
drm/amdkfd: fix the warning for potential insecure string

Below is the warning thrown by the clang compiler:
linux/drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_process.c:588:9: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
                                           stats_dir_filename);
                                           ^~~~~~~~~~~~~~~~~~
linux/drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_process.c:588:9: note: treat the string as an argument to avoid this
                                           stats_dir_filename);
                                           ^
                                           "%s",
linux/drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_process.c:635:18: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
                                           p->kobj, counters_dir_filename);
                                                    ^~~~~~~~~~~~~~~~~~~~~
linux/drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_process.c:635:18: note: treat the string as an argument to avoid this
                                           p->kobj, counters_dir_filename);
                                                    ^
                                                    "%s",

Signed-off-by: Sunil Khatri <sunil.khatri@amd.com>
CC: Philip Yang <philip.yang@amd.com>
CC: Felix Kuehling <felix.kuehling@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdkfd/kfd_process.c