Re: [PATCH] drm/amd/amdgpu: Fix warnings in amdgpu_encoders.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Acked-by: Luben Tuikov <luben.tuikov@xxxxxxx>

Regards,
Luben

On 2023-05-17 09:11, Srinivasan Shanmugam wrote:
> 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@xxxxxxx>
> Cc: Christian König <christian.koenig@xxxxxxx>
> Signed-off-by: Srinivasan Shanmugam <srinivasan.shanmugam@xxxxxxx>
> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_encoders.c | 13 +++++++------
>  1 file changed, 7 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_encoders.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_encoders.c
> index c96e458ed088..93868ff01fb7 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_encoders.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_encoders.c
> @@ -71,6 +71,7 @@ void amdgpu_encoder_set_active_device(struct drm_encoder *encoder)
>  	drm_for_each_connector_iter(connector, &iter) {
>  		if (connector->encoder == encoder) {
>  			struct amdgpu_connector *amdgpu_connector = to_amdgpu_connector(connector);
> +
>  			amdgpu_encoder->active_device = amdgpu_encoder->devices & amdgpu_connector->devices;
>  			DRM_DEBUG_KMS("setting active device to %08x from %08x %08x for encoder %d\n",
>  				  amdgpu_encoder->active_device, amdgpu_encoder->devices,
> @@ -166,12 +167,12 @@ void amdgpu_panel_mode_fixup(struct drm_encoder *encoder,
>  {
>  	struct amdgpu_encoder *amdgpu_encoder = to_amdgpu_encoder(encoder);
>  	struct drm_display_mode *native_mode = &amdgpu_encoder->native_mode;
> -	unsigned hblank = native_mode->htotal - native_mode->hdisplay;
> -	unsigned vblank = native_mode->vtotal - native_mode->vdisplay;
> -	unsigned hover = native_mode->hsync_start - native_mode->hdisplay;
> -	unsigned vover = native_mode->vsync_start - native_mode->vdisplay;
> -	unsigned hsync_width = native_mode->hsync_end - native_mode->hsync_start;
> -	unsigned vsync_width = native_mode->vsync_end - native_mode->vsync_start;
> +	unsigned int hblank = native_mode->htotal - native_mode->hdisplay;
> +	unsigned int vblank = native_mode->vtotal - native_mode->vdisplay;
> +	unsigned int hover = native_mode->hsync_start - native_mode->hdisplay;
> +	unsigned int vover = native_mode->vsync_start - native_mode->vdisplay;
> +	unsigned int hsync_width = native_mode->hsync_end - native_mode->hsync_start;
> +	unsigned int vsync_width = native_mode->vsync_end - native_mode->vsync_start;
>  
>  	adjusted_mode->clock = native_mode->clock;
>  	adjusted_mode->flags = native_mode->flags;




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux