Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/amd/amdgpu: Fix warnings in amdgpu_encoders.c

Fix below checkpatch warnings:

WARNING: Missing a blank line after declarations
+ struct amdgpu_connector *amdgpu_connector = to_amdgpu_connector(connector);
+ amdgpu_encoder->active_device = amdgpu_encoder->devices & amdgpu_connector->devices;

WARNING: Prefer 'unsigned int' to bare use of 'unsigned'

Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: Christian König <christian.koenig@amd.com>
Signed-off-by: Srinivasan Shanmugam <srinivasan.shanmugam@amd.com>
Acked-by: Luben Tuikov <luben.tuikov@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Srinivasan Shanmugam and committed by
Alex Deucher
29f187f7 f2cd6b26

+7 -6
+7 -6
drivers/gpu/drm/amd/amdgpu/amdgpu_encoders.c
··· 70 70 drm_for_each_connector_iter(connector, &iter) { 71 71 if (connector->encoder == encoder) { 72 72 struct amdgpu_connector *amdgpu_connector = to_amdgpu_connector(connector); 73 + 73 74 amdgpu_encoder->active_device = amdgpu_encoder->devices & amdgpu_connector->devices; 74 75 DRM_DEBUG_KMS("setting active device to %08x from %08x %08x for encoder %d\n", 75 76 amdgpu_encoder->active_device, amdgpu_encoder->devices, ··· 166 165 { 167 166 struct amdgpu_encoder *amdgpu_encoder = to_amdgpu_encoder(encoder); 168 167 struct drm_display_mode *native_mode = &amdgpu_encoder->native_mode; 169 - unsigned hblank = native_mode->htotal - native_mode->hdisplay; 170 - unsigned vblank = native_mode->vtotal - native_mode->vdisplay; 171 - unsigned hover = native_mode->hsync_start - native_mode->hdisplay; 172 - unsigned vover = native_mode->vsync_start - native_mode->vdisplay; 173 - unsigned hsync_width = native_mode->hsync_end - native_mode->hsync_start; 174 - unsigned vsync_width = native_mode->vsync_end - native_mode->vsync_start; 168 + unsigned int hblank = native_mode->htotal - native_mode->hdisplay; 169 + unsigned int vblank = native_mode->vtotal - native_mode->vdisplay; 170 + unsigned int hover = native_mode->hsync_start - native_mode->hdisplay; 171 + unsigned int vover = native_mode->vsync_start - native_mode->vdisplay; 172 + unsigned int hsync_width = native_mode->hsync_end - native_mode->hsync_start; 173 + unsigned int vsync_width = native_mode->vsync_end - native_mode->vsync_start; 175 174 176 175 adjusted_mode->clock = native_mode->clock; 177 176 adjusted_mode->flags = native_mode->flags;