Commit 7e937cdf authored by Michal Wajdeczko's avatar Michal Wajdeczko
Browse files

drm/xe/sa: Tidy up coding style in init()



There is no need to use tile_to_xe() since we already got the xe.
And we should keep all variable declarations together, no need for
separate sa_manager declaration.

Signed-off-by: default avatarMichal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Matthew Brost <matthew.brost@intel.com>
Reviewed-by: default avatarMatthew Brost <matthew.brost@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20241220194205.995-5-michal.wajdeczko@intel.com
parent 97ee0e35
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -34,13 +34,12 @@ static void xe_sa_bo_manager_fini(struct drm_device *drm, void *arg)
struct xe_sa_manager *xe_sa_bo_manager_init(struct xe_tile *tile, u32 size, u32 align)
{
	struct xe_device *xe = tile_to_xe(tile);
	struct xe_sa_manager *sa_manager;
	u32 managed_size = size - SZ_4K;
	struct xe_bo *bo;
	int ret;

	struct xe_sa_manager *sa_manager = drmm_kzalloc(&tile_to_xe(tile)->drm,
							sizeof(*sa_manager),
							GFP_KERNEL);
	sa_manager = drmm_kzalloc(&xe->drm, sizeof(*sa_manager), GFP_KERNEL);
	if (!sa_manager)
		return ERR_PTR(-ENOMEM);