diff options
author | Mario Limonciello <mario.limonciello@amd.com> | 2023-09-29 22:14:17 -0500 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2023-10-04 18:39:52 -0400 |
commit | b8e6aec14691b44e6a26d25052a2f4fa8c5f7b28 (patch) | |
tree | 66ff7951e300071fc8dbceba98e5c47e6e3af734 /drivers/gpu/drm/amd/amdgpu | |
parent | 7752ccf85b929a22e658ec145283e8f31232f4bb (diff) |
drm/amd: Drop all hand-built MIN and MAX macros in the amdgpu base driver
Several files declare MIN() or MAX() macros that ignore the types of the
values being compared. Drop these macros and switch to min() min_t(),
and max() from `linux/minmax.h`.
Suggested-by: Hamza Mahfooz <Hamza.Mahfooz@amd.com>
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h index fb16814e769b..4bb7e46f7619 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h @@ -1328,8 +1328,6 @@ int emu_soc_asic_init(struct amdgpu_device *adev); for (i = ffs(inst_mask); i-- != 0; \ i = ffs(inst_mask & BIT_MASK_UPPER(i + 1))) -#define MIN(X, Y) ((X) < (Y) ? (X) : (Y)) - /* Common functions */ bool amdgpu_device_has_job_running(struct amdgpu_device *adev); bool amdgpu_device_should_recover_gpu(struct amdgpu_device *adev); |