[PATCH v3 0/2] drm/xe : avoid the risky function sprintf

Bommu Krishnaiah krishnaiah.bommu at intel.com
Fri Mar 22 09:28:23 UTC 2024


These errors were highlighted by Static analyzer. Used snprintf instead of sprint.
Static analyzer Reported "Calling risky function (DC.STRING_BUFFER)”

v2: Removed hard coded values abd used sizeof()
v3: for sysfs used sysfs_emit over sprint

Bommu Krishnaiah (2):
  drm/xe: prefer snprintf over sprintf
  drm/xe/xe_hw_engine_class_sysfs: prefer sysfs_emit over sprintf for
    sysfs

 drivers/gpu/drm/xe/xe_debugfs.c               |  2 +-
 drivers/gpu/drm/xe/xe_exec_queue.c            | 12 +++----
 drivers/gpu/drm/xe/xe_gt_debugfs.c            |  2 +-
 drivers/gpu/drm/xe/xe_gt_idle.c               |  4 +--
 drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c | 36 +++++++++----------
 drivers/gpu/drm/xe/xe_hw_fence.c              |  2 +-
 6 files changed, 29 insertions(+), 29 deletions(-)

-- 
2.25.1



More information about the Intel-xe mailing list