Re: [PATCH 6/7] drm/i915/audio: switch to kernel unsigned int types

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

 



On Tue, Jun 12, 2018 at 12:19:34PM +0300, Jani Nikula wrote:
> We have fairly mixed uintN_t vs. uN usage throughout the driver, but try
> to stick to kernel types at least where it's more prevalent.
> 
> Signed-off-by: Jani Nikula <jani.nikula@xxxxxxxxx>
> ---
>  drivers/gpu/drm/i915/intel_audio.c | 36 ++++++++++++++++++------------------
>  1 file changed, 18 insertions(+), 18 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_audio.c b/drivers/gpu/drm/i915/intel_audio.c
> index 3ea566f99450..4e4c0ec44f35 100644
> --- a/drivers/gpu/drm/i915/intel_audio.c
> +++ b/drivers/gpu/drm/i915/intel_audio.c
> @@ -198,13 +198,13 @@ static int audio_config_hdmi_get_n(const struct intel_crtc_state *crtc_state,
>  }
>  
>  static bool intel_eld_uptodate(struct drm_connector *connector,
> -			       i915_reg_t reg_eldv, uint32_t bits_eldv,
> -			       i915_reg_t reg_elda, uint32_t bits_elda,
> +			       i915_reg_t reg_eldv, u32 bits_eldv,
> +			       i915_reg_t reg_elda, u32 bits_elda,
>  			       i915_reg_t reg_edid)
>  {
>  	struct drm_i915_private *dev_priv = to_i915(connector->dev);
> -	uint8_t *eld = connector->eld;
> -	uint32_t tmp;
> +	u8 *eld = connector->eld;

Drive by observation: could make all of these eld pointers const u32 *

> +	u32 tmp;
>  	int i;
>  
>  	tmp = I915_READ(reg_eldv);
> @@ -218,7 +218,7 @@ static bool intel_eld_uptodate(struct drm_connector *connector,
>  	I915_WRITE(reg_elda, tmp);
>  
>  	for (i = 0; i < drm_eld_size(eld) / 4; i++)
> -		if (I915_READ(reg_edid) != *((uint32_t *)eld + i))
> +		if (I915_READ(reg_edid) != *((u32 *)eld + i))
>  			return false;
>  
>  	return true;
-- 
Ville Syrjälä
Intel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




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

  Powered by Linux