[PATCH 0/4] Cleanup and fixes in drmm_add_action_or_reset usage
Himal Prasad Ghimiray
himal.prasad.ghimiray at intel.com
Mon Apr 8 14:49:40 UTC 2024
drmm_add_action_or_reset automatically triggers the corresponding action
if there's a failure. However, certain functions were previously relying
on return codes to trigger cleanup, leading to redundant calls. Removed
these functions to prevent multiple invocations.
In case of a failure, drmm_add_action_or_reset automatically triggers a
warning message, such as 'failed to add action "action_name" for
"drm_device".' Despite this, the driver was redundantly issuing similar
warning messages upon failure, offering no additional value. Removed few
of these redundant warnings calls.
Cc: Rodrigo Vivi <rodrigo.vivi at intel.com>
Cc: Tejas Upadhyay <tejas.upadhyay at intel.com>
Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio at intel.com>
Cc: Niranjana Vishwanathapura <niranjana.vishwanathapura at intel.com>
Himal Prasad Ghimiray (4):
drm/xe: Simplify function return using drmm_add_action_or_reset()
drm/xe: Incase of action add failure, remove sysfs only once.
drm/xe: Incase of action add failure, free_gsc_pkt only once.
drm/xe: Return NULL incase of drmm_add_action_or_reset failure
drivers/gpu/drm/xe/display/xe_display.c | 8 +------
drivers/gpu/drm/xe/xe_device.c | 6 +----
drivers/gpu/drm/xe/xe_gsc_proxy.c | 7 +-----
drivers/gpu/drm/xe/xe_gt.c | 6 +----
drivers/gpu/drm/xe/xe_gt_ccs_mode.c | 7 ++----
drivers/gpu/drm/xe/xe_guc_pc.c | 6 +----
drivers/gpu/drm/xe/xe_huc.c | 9 +-------
drivers/gpu/drm/xe/xe_hw_engine.c | 6 +----
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c | 22 +++++--------------
9 files changed, 14 insertions(+), 63 deletions(-)
--
2.25.1
More information about the Intel-xe
mailing list