drm/xe: prefer snprintf over sprintf
authorBommu Krishnaiah <krishnaiah.bommu@intel.com>
Sat, 9 Dec 2023 23:59:48 +0000 (05:29 +0530)
committerRodrigo Vivi <rodrigo.vivi@intel.com>
Thu, 4 Apr 2024 18:54:51 +0000 (14:54 -0400)
commita3c86b6d7b1c8ffb46ffd34c3dbe9252da87956b
tree8a5189be7cb9f83c487f07e9372cfadeb142e201
parent972d01d0e357f3799203fa64ab696ac035e16803
drm/xe: prefer snprintf over sprintf

since the sprintf() function lacks built-in protection against buffer
overflows using the snprintf() function.

v2: Removed hard coded values and used sizeof()

Signed-off-by: Bommu Krishnaiah <krishnaiah.bommu@intel.com>
Cc: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
Cc: Tejas Upadhyay <tejas.upadhyay@intel.com>
Reviewed-by: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20231209235949.54524-2-krishnaiah.bommu@intel.com
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
drivers/gpu/drm/xe/xe_debugfs.c
drivers/gpu/drm/xe/xe_exec_queue.c
drivers/gpu/drm/xe/xe_gt_debugfs.c
drivers/gpu/drm/xe/xe_gt_idle.c
drivers/gpu/drm/xe/xe_hw_fence.c