[Intel-gfx] [PATCH 03/17] drm/i915/sdvo: switch to kernel types
Souza, Jose
jose.souza at intel.com
Thu Jan 17 00:21:49 UTC 2019
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 <jose.souza at intel.com>
>
> Signed-off-by: Jani Nikula <jani.nikula at intel.com>
> ---
> 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,
> &mode, 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, &mode, 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,
> &av_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 *data, unsigned int
> length)
> {
> - uint8_t set_buf_index[2] = { if_index, 0 };
> - uint8_t hbuf_size, tmp[8];
> + u8 set_buf_index[2] = { if_index, 0 };
> + u8 hbuf_size, tmp[8];
> int i;
>
> if (!intel_sdvo_set_value(intel_sdvo,
> @@ -984,7 +984,7 @@ static bool intel_sdvo_set_avi_infoframe(struct
> intel_sdvo *intel_sdvo,
> {
> const struct drm_display_mode *adjusted_mode =
> &pipe_config->base.adjusted_mode;
> - uint8_t sdvo_data[HDMI_INFOFRAME_SIZE(AVI)];
> + u8 sdvo_data[HDMI_INFOFRAME_SIZE(AVI)];
> union hdmi_infoframe frame;
> int ret;
> ssize_t len;
> @@ -1017,7 +1017,7 @@ static bool intel_sdvo_set_tv_format(struct
> intel_sdvo *intel_sdvo,
> const struct drm_connector_state
> *conn_state)
> {
> struct intel_sdvo_tv_format format;
> - uint32_t format_map;
> + u32 format_map;
>
> format_map = 1 << conn_state->tv.mode;
> memset(&format, 0, sizeof(format));
> @@ -1208,7 +1208,7 @@ static void intel_sdvo_update_props(struct
> intel_sdvo *intel_sdvo,
> const struct drm_connector_state *conn_state = &sdvo_state-
> >base.base;
> struct intel_sdvo_connector *intel_sdvo_conn =
> to_intel_sdvo_connector(conn_state->connector);
> - uint16_t val;
> + u16 val;
>
> if (intel_sdvo_conn->left)
> UPDATE_PROPERTY(sdvo_state->tv.overscan_h, OVERSCAN_H);
> @@ -1692,10 +1692,10 @@ static bool
> intel_sdvo_get_capabilities(struct intel_sdvo *intel_sdvo, struct in
> return true;
> }
>
> -static uint16_t intel_sdvo_get_hotplug_support(struct intel_sdvo
> *intel_sdvo)
> +static u16 intel_sdvo_get_hotplug_support(struct intel_sdvo
> *intel_sdvo)
> {
> struct drm_i915_private *dev_priv = to_i915(intel_sdvo-
> >base.base.dev);
> - uint16_t hotplug;
> + u16 hotplug;
>
> if (!I915_HAS_HOTPLUG(dev_priv))
> return 0;
> @@ -1826,7 +1826,7 @@ intel_sdvo_connector_matches_edid(struct
> intel_sdvo_connector *sdvo,
> static enum drm_connector_status
> intel_sdvo_detect(struct drm_connector *connector, bool force)
> {
> - uint16_t response;
> + u16 response;
> struct intel_sdvo *intel_sdvo = intel_attached_sdvo(connector);
> struct intel_sdvo_connector *intel_sdvo_connector =
> to_intel_sdvo_connector(connector);
> enum drm_connector_status ret;
> @@ -1977,7 +1977,7 @@ static void intel_sdvo_get_tv_modes(struct
> drm_connector *connector)
> struct intel_sdvo *intel_sdvo = intel_attached_sdvo(connector);
> const struct drm_connector_state *conn_state = connector-
> >state;
> struct intel_sdvo_sdtv_resolution_request tv_res;
> - uint32_t reply = 0, format_map = 0;
> + u32 reply = 0, format_map = 0;
> int i;
>
> DRM_DEBUG_KMS("[CONNECTOR:%d:%s]\n",
> @@ -2062,7 +2062,7 @@ static int
> intel_sdvo_connector_atomic_get_property(struct drm_connector
> *connector,
> const struct
> drm_connector_state *state,
> struct drm_property *property,
> - uint64_t *val)
> + u64 *val)
> {
> struct intel_sdvo_connector *intel_sdvo_connector =
> to_intel_sdvo_connector(connector);
> const struct intel_sdvo_connector_state *sdvo_state =
> to_intel_sdvo_connector_state((void *)state);
> @@ -2121,7 +2121,7 @@ static int
> intel_sdvo_connector_atomic_set_property(struct drm_connector
> *connector,
> struct drm_connector_state
> *state,
> struct drm_property *property,
> - uint64_t val)
> + u64 val)
> {
> struct intel_sdvo_connector *intel_sdvo_connector =
> to_intel_sdvo_connector(connector);
> struct intel_sdvo_connector_state *sdvo_state =
> to_intel_sdvo_connector_state(state);
> @@ -2270,7 +2270,7 @@ static const struct drm_encoder_funcs
> intel_sdvo_enc_funcs = {
> static void
> intel_sdvo_guess_ddc_bus(struct intel_sdvo *sdvo)
> {
> - uint16_t mask = 0;
> + u16 mask = 0;
> unsigned int num_bits;
>
> /*
> @@ -2671,7 +2671,7 @@ intel_sdvo_lvds_init(struct intel_sdvo
> *intel_sdvo, int device)
> }
>
> 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)
> {
> /* SDVO requires XXX1 function may not exist unless it has XXX0
> function.*/
>
> @@ -2747,7 +2747,7 @@ static bool
> intel_sdvo_tv_create_property(struct intel_sdvo *intel_sdvo,
> {
> struct drm_device *dev = intel_sdvo->base.base.dev;
> struct intel_sdvo_tv_format format;
> - uint32_t format_map, i;
> + u32 format_map, i;
>
> if (!intel_sdvo_set_target_output(intel_sdvo, type))
> return false;
> @@ -2814,7 +2814,7 @@ intel_sdvo_create_enhance_property_tv(struct
> intel_sdvo *intel_sdvo,
> struct drm_connector_state *conn_state = connector->state;
> struct intel_sdvo_connector_state *sdvo_state =
> to_intel_sdvo_connector_state(conn_state);
> - uint16_t response, data_value[2];
> + u16 response, data_value[2];
>
> /* when horizontal overscan is supported, Add the left/right
> property */
> if (enhancements.overscan_h) {
> @@ -2925,7 +2925,7 @@ intel_sdvo_create_enhance_property_lvds(struct
> intel_sdvo *intel_sdvo,
> {
> struct drm_device *dev = intel_sdvo->base.base.dev;
> struct drm_connector *connector = &intel_sdvo_connector-
> >base.base;
> - uint16_t response, data_value[2];
> + u16 response, data_value[2];
>
> ENHANCEMENT(&connector->state->tv, brightness, BRIGHTNESS);
>
> @@ -2939,7 +2939,7 @@ static bool
> intel_sdvo_create_enhance_property(struct intel_sdvo *intel_sdvo,
> {
> union {
> struct intel_sdvo_enhancements_reply reply;
> - uint16_t response;
> + u16 response;
> } enhancements;
>
> BUILD_BUG_ON(sizeof(enhancements) != 2);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: This is a digitally signed message part
URL: <https://lists.freedesktop.org/archives/intel-gfx/attachments/20190117/82540c1a/attachment.sig>
More information about the Intel-gfx
mailing list