mirror of
https://github.com/torvalds/linux.git
synced 2026-04-30 20:42:33 -04:00
drm/amd/display: Remove else after return in 'dm_crtc_get_scanoutpos()'
Conform to Linux kernel coding style. Reported by checkpatch: WARNING: else is not generally useful after a break or return Expressions under 'else' branch in function 'dm_crtc_get_scanoutpos' are executed whenever the expression in 'if' is False. Otherwise, return from function occurs. Therefore, there is no need in 'else', and it has been removed. Cc: Alex Deucher <alexander.deucher@amd.com> Cc: Harry Wentland <harry.wentland@amd.com> Cc: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com> Cc: Aurabindo Pillai <aurabindo.pillai@amd.com> Signed-off-by: Srinivasan Shanmugam <srinivasan.shanmugam@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Reviewed-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
committed by
Alex Deucher
parent
44a4f50d50
commit
0c2d77beed
@@ -264,32 +264,32 @@ static int dm_crtc_get_scanoutpos(struct amdgpu_device *adev, int crtc,
|
||||
u32 *vbl, u32 *position)
|
||||
{
|
||||
u32 v_blank_start, v_blank_end, h_position, v_position;
|
||||
struct amdgpu_crtc *acrtc = NULL;
|
||||
|
||||
if ((crtc < 0) || (crtc >= adev->mode_info.num_crtc))
|
||||
return -EINVAL;
|
||||
else {
|
||||
struct amdgpu_crtc *acrtc = adev->mode_info.crtcs[crtc];
|
||||
|
||||
if (acrtc->dm_irq_params.stream == NULL) {
|
||||
DRM_ERROR("dc_stream_state is NULL for crtc '%d'!\n",
|
||||
crtc);
|
||||
return 0;
|
||||
}
|
||||
acrtc = adev->mode_info.crtcs[crtc];
|
||||
|
||||
/*
|
||||
* TODO rework base driver to use values directly.
|
||||
* for now parse it back into reg-format
|
||||
*/
|
||||
dc_stream_get_scanoutpos(acrtc->dm_irq_params.stream,
|
||||
&v_blank_start,
|
||||
&v_blank_end,
|
||||
&h_position,
|
||||
&v_position);
|
||||
|
||||
*position = v_position | (h_position << 16);
|
||||
*vbl = v_blank_start | (v_blank_end << 16);
|
||||
if (!acrtc->dm_irq_params.stream) {
|
||||
DRM_ERROR("dc_stream_state is NULL for crtc '%d'!\n",
|
||||
crtc);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* TODO rework base driver to use values directly.
|
||||
* for now parse it back into reg-format
|
||||
*/
|
||||
dc_stream_get_scanoutpos(acrtc->dm_irq_params.stream,
|
||||
&v_blank_start,
|
||||
&v_blank_end,
|
||||
&h_position,
|
||||
&v_position);
|
||||
|
||||
*position = v_position | (h_position << 16);
|
||||
*vbl = v_blank_start | (v_blank_end << 16);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user