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/pm/legacy-dpm | |
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/pm/legacy-dpm')
-rw-r--r-- | drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c b/drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c index 02e69ccff3ba..fc8e4ac6c8e7 100644 --- a/drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c +++ b/drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c @@ -6600,7 +6600,7 @@ static int si_dpm_get_fan_speed_pwm(void *handle, tmp64 = (u64)duty * 255; do_div(tmp64, duty100); - *speed = MIN((u32)tmp64, 255); + *speed = min_t(u32, tmp64, 255); return 0; } |