diff options
| author | Mario Limonciello <mario.limonciello@amd.com> | 2025-06-25 10:23:13 -0500 |
|---|---|---|
| committer | Alex Deucher <alexander.deucher@amd.com> | 2025-07-28 16:40:05 -0400 |
| commit | 34c9cd82dc62641b9038815ebc1a397f24d5a6e2 (patch) | |
| tree | c442abc54e2bd19d65abdf391670f63880176cdc /drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | |
| parent | drm/amd/display: ensure committing streams is seamless (diff) | |
| download | linux-34c9cd82dc62641b9038815ebc1a397f24d5a6e2.tar.gz linux-34c9cd82dc62641b9038815ebc1a397f24d5a6e2.zip | |
drm/amd/display: Drop unnecessary 'rc' variable in amdgpu_dm_backlight_get_level()
[Why]
amdgpu_dm_backlight_get_level() returns a boolean value but is assigned
to a variable named 'rc' which is generally used for return codes.
This can be confusing while looking at the code for other issues.
[How]
Drop the variable and just look directly at the return value of
amdgpu_dm_backlight_get_level() in the if statement.
Reviewed-by: Alex Hung <alex.hung@amd.com>
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Wayne Lin <wayne.lin@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c')
| -rw-r--r-- | drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c index 2a175fc0399c..bfe3ee4b07ff 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -4926,10 +4926,8 @@ static u32 amdgpu_dm_backlight_get_level(struct amdgpu_display_manager *dm, if (caps.aux_support) { u32 avg, peak; - bool rc; - rc = dc_link_get_backlight_level_nits(link, &avg, &peak); - if (!rc) + if (!dc_link_get_backlight_level_nits(link, &avg, &peak)) return dm->brightness[bl_idx]; return convert_brightness_to_user(&caps, avg); } |
