Re: [Intel-gfx] [PATCH 03/17] drm/i915/sdvo: switch to kernel types

2019-01-16 Thread Souza, Jose
On Wed, 2019-01-16 at 11:15 +0200, Jani Nikula wrote:
> Mixed C99 and kernel types use is getting ugly.   Prefer kernel
> types.
> 
> sed -i 's/\buint\(8\|16\|32\|64\)_t\b/u\1/g'

Reviewed-by: José Roberto de Souza 

> 
> Signed-off-by: Jani Nikula 
> ---
>  drivers/gpu/drm/i915/intel_sdvo.c | 78 +++
> 
>  1 file changed, 39 insertions(+), 39 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_sdvo.c
> b/drivers/gpu/drm/i915/intel_sdvo.c
> index df2d830a7405..e7b0884ba5a5 100644
> --- a/drivers/gpu/drm/i915/intel_sdvo.c
> +++ b/drivers/gpu/drm/i915/intel_sdvo.c
> @@ -76,7 +76,7 @@ struct intel_sdvo {
>   i915_reg_t sdvo_reg;
>  
>   /* Active outputs controlled by this SDVO output */
> - uint16_t controlled_output;
> + u16 controlled_output;
>  
>   /*
>* Capabilities of the SDVO device returned by
> @@ -91,12 +91,12 @@ struct intel_sdvo {
>   * For multiple function SDVO device,
>   * this is for current attached outputs.
>   */
> - uint16_t attached_output;
> + u16 attached_output;
>  
>   /*
>* Hotplug activation bits for this device
>*/
> - uint16_t hotplug_active;
> + u16 hotplug_active;
>  
>   enum port port;
>  
> @@ -104,19 +104,19 @@ struct intel_sdvo {
>   bool has_hdmi_audio;
>  
>   /* DDC bus used by this SDVO encoder */
> - uint8_t ddc_bus;
> + u8 ddc_bus;
>  
>   /*
>* the sdvo flag gets lost in round trip: dtd->adjusted_mode-
> >dtd
>*/
> - uint8_t dtd_sdvo_flags;
> + u8 dtd_sdvo_flags;
>  };
>  
>  struct intel_sdvo_connector {
>   struct intel_connector base;
>  
>   /* Mark the type of connector */
> - uint16_t output_flag;
> + u16 output_flag;
>  
>   /* This contains all current supported TV format */
>   u8 tv_format_supported[TV_FORMAT_NUM];
> @@ -184,7 +184,7 @@ to_intel_sdvo_connector(struct drm_connector
> *connector)
>   container_of((conn_state), struct intel_sdvo_connector_state,
> base.base)
>  
>  static bool
> -intel_sdvo_output_setup(struct intel_sdvo *intel_sdvo, uint16_t
> flags);
> +intel_sdvo_output_setup(struct intel_sdvo *intel_sdvo, u16 flags);
>  static bool
>  intel_sdvo_tv_create_property(struct intel_sdvo *intel_sdvo,
> struct intel_sdvo_connector
> *intel_sdvo_connector,
> @@ -746,9 +746,9 @@ static bool intel_sdvo_get_input_timing(struct
> intel_sdvo *intel_sdvo,
>  static bool
>  intel_sdvo_create_preferred_input_timing(struct intel_sdvo
> *intel_sdvo,
>struct intel_sdvo_connector
> *intel_sdvo_connector,
> -  uint16_t clock,
> -  uint16_t width,
> -  uint16_t height)
> +  u16 clock,
> +  u16 width,
> +  u16 height)
>  {
>   struct intel_sdvo_preferred_input_timing_args args;
>  
> @@ -791,9 +791,9 @@ static bool intel_sdvo_set_clock_rate_mult(struct
> intel_sdvo *intel_sdvo, u8 val
>  static void intel_sdvo_get_dtd_from_mode(struct intel_sdvo_dtd *dtd,
>const struct drm_display_mode
> *mode)
>  {
> - uint16_t width, height;
> - uint16_t h_blank_len, h_sync_len, v_blank_len, v_sync_len;
> - uint16_t h_sync_offset, v_sync_offset;
> + u16 width, height;
> + u16 h_blank_len, h_sync_len, v_blank_len, v_sync_len;
> + u16 h_sync_offset, v_sync_offset;
>   int mode_clock;
>  
>   memset(dtd, 0, sizeof(*dtd));
> @@ -898,13 +898,13 @@ static bool intel_sdvo_check_supp_encode(struct
> intel_sdvo *intel_sdvo)
>  }
>  
>  static bool intel_sdvo_set_encode(struct intel_sdvo *intel_sdvo,
> -   uint8_t mode)
> +   u8 mode)
>  {
>   return intel_sdvo_set_value(intel_sdvo, SDVO_CMD_SET_ENCODE,
> , 1);
>  }
>  
>  static bool intel_sdvo_set_colorimetry(struct intel_sdvo
> *intel_sdvo,
> -uint8_t mode)
> +u8 mode)
>  {
>   return intel_sdvo_set_value(intel_sdvo,
> SDVO_CMD_SET_COLORIMETRY, , 1);
>  }
> @@ -913,11 +913,11 @@ static bool intel_sdvo_set_colorimetry(struct
> intel_sdvo *intel_sdvo,
>  static void intel_sdvo_dump_hdmi_buf(struct intel_sdvo *intel_sdvo)
>  {
>   int i, j;
> - uint8_t set_buf_index[2];
> - uint8_t av_split;
> - uint8_t buf_size;
> - uint8_t buf[48];
> - uint8_t *pos;
> + u8 set_buf_index[2];
> + u8 av_split;
> + u8 buf_size;
> + u8 buf[48];
> + u8 *pos;
>  
>   intel_sdvo_get_value(encoder, SDVO_CMD_GET_HBUF_AV_SPLIT,
> _split, 1);
>  
> @@ -940,11 +940,11 @@ static void intel_sdvo_dump_hdmi_buf(struct
> intel_sdvo *intel_sdvo)
>  #endif
>  
>  static bool intel_sdvo_write_infoframe(struct intel_sdvo
> *intel_sdvo,
> - 

[Intel-gfx] [PATCH 03/17] drm/i915/sdvo: switch to kernel types

2019-01-16 Thread Jani Nikula
Mixed C99 and kernel types use is getting ugly. Prefer kernel types.

sed -i 's/\buint\(8\|16\|32\|64\)_t\b/u\1/g'

Signed-off-by: Jani Nikula 
---
 drivers/gpu/drm/i915/intel_sdvo.c | 78 +++
 1 file changed, 39 insertions(+), 39 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_sdvo.c 
b/drivers/gpu/drm/i915/intel_sdvo.c
index df2d830a7405..e7b0884ba5a5 100644
--- a/drivers/gpu/drm/i915/intel_sdvo.c
+++ b/drivers/gpu/drm/i915/intel_sdvo.c
@@ -76,7 +76,7 @@ struct intel_sdvo {
i915_reg_t sdvo_reg;
 
/* Active outputs controlled by this SDVO output */
-   uint16_t controlled_output;
+   u16 controlled_output;
 
/*
 * Capabilities of the SDVO device returned by
@@ -91,12 +91,12 @@ struct intel_sdvo {
* For multiple function SDVO device,
* this is for current attached outputs.
*/
-   uint16_t attached_output;
+   u16 attached_output;
 
/*
 * Hotplug activation bits for this device
 */
-   uint16_t hotplug_active;
+   u16 hotplug_active;
 
enum port port;
 
@@ -104,19 +104,19 @@ struct intel_sdvo {
bool has_hdmi_audio;
 
/* DDC bus used by this SDVO encoder */
-   uint8_t ddc_bus;
+   u8 ddc_bus;
 
/*
 * the sdvo flag gets lost in round trip: dtd->adjusted_mode->dtd
 */
-   uint8_t dtd_sdvo_flags;
+   u8 dtd_sdvo_flags;
 };
 
 struct intel_sdvo_connector {
struct intel_connector base;
 
/* Mark the type of connector */
-   uint16_t output_flag;
+   u16 output_flag;
 
/* This contains all current supported TV format */
u8 tv_format_supported[TV_FORMAT_NUM];
@@ -184,7 +184,7 @@ to_intel_sdvo_connector(struct drm_connector *connector)
container_of((conn_state), struct intel_sdvo_connector_state, base.base)
 
 static bool
-intel_sdvo_output_setup(struct intel_sdvo *intel_sdvo, uint16_t flags);
+intel_sdvo_output_setup(struct intel_sdvo *intel_sdvo, u16 flags);
 static bool
 intel_sdvo_tv_create_property(struct intel_sdvo *intel_sdvo,
  struct intel_sdvo_connector *intel_sdvo_connector,
@@ -746,9 +746,9 @@ static bool intel_sdvo_get_input_timing(struct intel_sdvo 
*intel_sdvo,
 static bool
 intel_sdvo_create_preferred_input_timing(struct intel_sdvo *intel_sdvo,
 struct intel_sdvo_connector 
*intel_sdvo_connector,
-uint16_t clock,
-uint16_t width,
-uint16_t height)
+u16 clock,
+u16 width,
+u16 height)
 {
struct intel_sdvo_preferred_input_timing_args args;
 
@@ -791,9 +791,9 @@ static bool intel_sdvo_set_clock_rate_mult(struct 
intel_sdvo *intel_sdvo, u8 val
 static void intel_sdvo_get_dtd_from_mode(struct intel_sdvo_dtd *dtd,
 const struct drm_display_mode *mode)
 {
-   uint16_t width, height;
-   uint16_t h_blank_len, h_sync_len, v_blank_len, v_sync_len;
-   uint16_t h_sync_offset, v_sync_offset;
+   u16 width, height;
+   u16 h_blank_len, h_sync_len, v_blank_len, v_sync_len;
+   u16 h_sync_offset, v_sync_offset;
int mode_clock;
 
memset(dtd, 0, sizeof(*dtd));
@@ -898,13 +898,13 @@ static bool intel_sdvo_check_supp_encode(struct 
intel_sdvo *intel_sdvo)
 }
 
 static bool intel_sdvo_set_encode(struct intel_sdvo *intel_sdvo,
- uint8_t mode)
+ u8 mode)
 {
return intel_sdvo_set_value(intel_sdvo, SDVO_CMD_SET_ENCODE, , 1);
 }
 
 static bool intel_sdvo_set_colorimetry(struct intel_sdvo *intel_sdvo,
-  uint8_t mode)
+  u8 mode)
 {
return intel_sdvo_set_value(intel_sdvo, SDVO_CMD_SET_COLORIMETRY, 
, 1);
 }
@@ -913,11 +913,11 @@ static bool intel_sdvo_set_colorimetry(struct intel_sdvo 
*intel_sdvo,
 static void intel_sdvo_dump_hdmi_buf(struct intel_sdvo *intel_sdvo)
 {
int i, j;
-   uint8_t set_buf_index[2];
-   uint8_t av_split;
-   uint8_t buf_size;
-   uint8_t buf[48];
-   uint8_t *pos;
+   u8 set_buf_index[2];
+   u8 av_split;
+   u8 buf_size;
+   u8 buf[48];
+   u8 *pos;
 
intel_sdvo_get_value(encoder, SDVO_CMD_GET_HBUF_AV_SPLIT, _split, 1);
 
@@ -940,11 +940,11 @@ static void intel_sdvo_dump_hdmi_buf(struct intel_sdvo 
*intel_sdvo)
 #endif
 
 static bool intel_sdvo_write_infoframe(struct intel_sdvo *intel_sdvo,
-  unsigned if_index, uint8_t tx_rate,
-  const uint8_t *data, unsigned length)
+  unsigned int if_index, u8 tx_rate,
+  const u8