From 3d78923bd07ad99a33b06eaa69194b35ac1637f1 Mon Sep 17 00:00:00 2001 From: Michal Wajdeczko Date: Wed, 15 Nov 2023 15:15:23 +0100 Subject: drm/xe/guc: Promote guc_to_gt/xe helpers to .h Duplicating these helpers in almost every .c file is a bad idea. Define them as inlines in .h file to allow proper reuse. Signed-off-by: Michal Wajdeczko Cc: Rodrigo Vivi Cc: Jani Nikula Reviewed-by: Matthew Brost Signed-off-by: Rodrigo Vivi --- drivers/gpu/drm/xe/xe_guc_submit.c | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'drivers/gpu/drm/xe/xe_guc_submit.c') diff --git a/drivers/gpu/drm/xe/xe_guc_submit.c b/drivers/gpu/drm/xe/xe_guc_submit.c index 8d5af11fb80d..b13c925c56ee 100644 --- a/drivers/gpu/drm/xe/xe_guc_submit.c +++ b/drivers/gpu/drm/xe/xe_guc_submit.c @@ -36,18 +36,6 @@ #include "xe_trace.h" #include "xe_vm.h" -static struct xe_gt * -guc_to_gt(struct xe_guc *guc) -{ - return container_of(guc, struct xe_gt, uc.guc); -} - -static struct xe_device * -guc_to_xe(struct xe_guc *guc) -{ - return gt_to_xe(guc_to_gt(guc)); -} - static struct xe_guc * exec_queue_to_guc(struct xe_exec_queue *q) { -- cgit v1.2.3