Commit 6ecccc09 authored by Bhavin Sharma's avatar Bhavin Sharma Committed by Alex Deucher
Browse files

drm/amd/pm: remove redundant tools_size check



The check for tools_size being non-zero is redundant as tools_size is
explicitly set to a non-zero value (0x19000). Removing the if condition
simplifies the code without altering functionality.

Signed-off-by: default avatarBhavin Sharma <bhavin.sharma@siliconsignals.io>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 2abf2f70
Loading
Loading
Loading
Loading
+11 −13
Original line number Diff line number Diff line
@@ -257,7 +257,6 @@ static int vega12_smu_init(struct pp_hwmgr *hwmgr)
	priv->smu_tables.entry[TABLE_WATERMARKS].size = sizeof(Watermarks_t);

	tools_size = 0x19000;
	if (tools_size) {
	ret = amdgpu_bo_create_kernel((struct amdgpu_device *)hwmgr->adev,
				      tools_size,
				      PAGE_SIZE,
@@ -270,7 +269,6 @@ static int vega12_smu_init(struct pp_hwmgr *hwmgr)

	priv->smu_tables.entry[TABLE_PMSTATUSLOG].version = 0x01;
	priv->smu_tables.entry[TABLE_PMSTATUSLOG].size = tools_size;
	}

	/* allocate space for AVFS Fuse table */
	ret = amdgpu_bo_create_kernel((struct amdgpu_device *)hwmgr->adev,