From: "Souza, Jose" Subject: Re: [PATCH 03/17] drm/i915/sdvo: switch to kernel types Date: Thu, 17 Jan 2019 00:21:49 +0000 Message-ID: <64512276f2b2d754fe16e49d924a80998bc27101.camel@intel.com> References: <209f7fb1895d1ea911a16bf76cb75435de58eeab.1547629303.git.jani.nikula@intel.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1721818264==" Return-path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by gabe.freedesktop.org (Postfix) with ESMTPS id 04C2C6E260 for ; Thu, 17 Jan 2019 00:22:11 +0000 (UTC) In-Reply-To: <209f7fb1895d1ea911a16bf76cb75435de58eeab.1547629303.git.jani.nikula@intel.com> Content-Language: en-US List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: "intel-gfx@lists.freedesktop.org" , "Nikula, Jani" List-Id: intel-gfx@lists.freedesktop.org --===============1721818264== Content-Language: en-US Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="=-57iEprBX2gyJd8Lvhxvp" --=-57iEprBX2gyJd8Lvhxvp Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, 2019-01-16 at 11:15 +0200, Jani Nikula wrote: > Mixed C99 and kernel types use is getting ugly. Prefer kernel > types. >=20 > sed -i 's/\buint\(8\|16\|32\|64\)_t\b/u\1/g' Reviewed-by: Jos=C3=A9 Roberto de Souza >=20 > Signed-off-by: Jani Nikula > --- > drivers/gpu/drm/i915/intel_sdvo.c | 78 +++++++++++++++------------ > ---- > 1 file changed, 39 insertions(+), 39 deletions(-) >=20 > 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; > =20 > /* Active outputs controlled by this SDVO output */ > - uint16_t controlled_output; > + u16 controlled_output; > =20 > /* > * 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; > =20 > /* > * Hotplug activation bits for this device > */ > - uint16_t hotplug_active; > + u16 hotplug_active; > =20 > enum port port; > =20 > @@ -104,19 +104,19 @@ struct intel_sdvo { > bool has_hdmi_audio; > =20 > /* DDC bus used by this SDVO encoder */ > - uint8_t ddc_bus; > + u8 ddc_bus; > =20 > /* > * the sdvo flag gets lost in round trip: dtd->adjusted_mode- > >dtd > */ > - uint8_t dtd_sdvo_flags; > + u8 dtd_sdvo_flags; > }; > =20 > struct intel_sdvo_connector { > struct intel_connector base; > =20 > /* Mark the type of connector */ > - uint16_t output_flag; > + u16 output_flag; > =20 > /* 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) > =20 > 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; > =20 > @@ -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; > =20 > memset(dtd, 0, sizeof(*dtd)); > @@ -898,13 +898,13 @@ static bool intel_sdvo_check_supp_encode(struct > intel_sdvo *intel_sdvo) > } > =20 > 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); > } > =20 > 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; > =20 > intel_sdvo_get_value(encoder, SDVO_CMD_GET_HBUF_AV_SPLIT, > &av_split, 1); > =20 > @@ -940,11 +940,11 @@ static void intel_sdvo_dump_hdmi_buf(struct > intel_sdvo *intel_sdvo) > #endif > =20 > 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] =3D { if_index, 0 }; > - uint8_t hbuf_size, tmp[8]; > + u8 set_buf_index[2] =3D { if_index, 0 }; > + u8 hbuf_size, tmp[8]; > int i; > =20 > 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 =3D > &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; > =20 > format_map =3D 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 =3D &sdvo_state- > >base.base; > struct intel_sdvo_connector *intel_sdvo_conn =3D > to_intel_sdvo_connector(conn_state->connector); > - uint16_t val; > + u16 val; > =20 > 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; > } > =20 > -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 =3D to_i915(intel_sdvo- > >base.base.dev); > - uint16_t hotplug; > + u16 hotplug; > =20 > 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 =3D intel_attached_sdvo(connector); > struct intel_sdvo_connector *intel_sdvo_connector =3D > 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 =3D intel_attached_sdvo(connector); > const struct drm_connector_state *conn_state =3D connector- > >state; > struct intel_sdvo_sdtv_resolution_request tv_res; > - uint32_t reply =3D 0, format_map =3D 0; > + u32 reply =3D 0, format_map =3D 0; > int i; > =20 > 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 =3D > to_intel_sdvo_connector(connector); > const struct intel_sdvo_connector_state *sdvo_state =3D > 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 =3D > to_intel_sdvo_connector(connector); > struct intel_sdvo_connector_state *sdvo_state =3D > to_intel_sdvo_connector_state(state); > @@ -2270,7 +2270,7 @@ static const struct drm_encoder_funcs > intel_sdvo_enc_funcs =3D { > static void > intel_sdvo_guess_ddc_bus(struct intel_sdvo *sdvo) > { > - uint16_t mask =3D 0; > + u16 mask =3D 0; > unsigned int num_bits; > =20 > /* > @@ -2671,7 +2671,7 @@ intel_sdvo_lvds_init(struct intel_sdvo > *intel_sdvo, int device) > } > =20 > 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.*/ > =20 > @@ -2747,7 +2747,7 @@ static bool > intel_sdvo_tv_create_property(struct intel_sdvo *intel_sdvo, > { > struct drm_device *dev =3D intel_sdvo->base.base.dev; > struct intel_sdvo_tv_format format; > - uint32_t format_map, i; > + u32 format_map, i; > =20 > 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 =3D connector->state; > struct intel_sdvo_connector_state *sdvo_state =3D > to_intel_sdvo_connector_state(conn_state); > - uint16_t response, data_value[2]; > + u16 response, data_value[2]; > =20 > /* 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 =3D intel_sdvo->base.base.dev; > struct drm_connector *connector =3D &intel_sdvo_connector- > >base.base; > - uint16_t response, data_value[2]; > + u16 response, data_value[2]; > =20 > ENHANCEMENT(&connector->state->tv, brightness, BRIGHTNESS); > =20 > @@ -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; > =20 > BUILD_BUG_ON(sizeof(enhancements) !=3D 2); --=-57iEprBX2gyJd8Lvhxvp Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEEVNG051EijGa0MiaQVenbO/mOWkkFAlw/ypsACgkQVenbO/mO Wkn0YAf+OBSDmd0P6Hdo6/npMrzUUeDLptVwtFKn32VWyGt7Qne4VF4haDJjlxDd Lp7X47vkzLyZLBnyBZP5bIZqBOCJE4wnjqYS0HZVrWzfWfIuvc4iOmGK8r+zarJn j7flv2AFA3Q8SmBJsEqUWsc55TFokxkmFarsFwumOygHAReDM+ZmROQcIhzrMThk F0BzmiHPqGVZX7YwpTn6yw4L9OsvwymsTcDR+v4ag/vYREwAHZDYZ3FEud4H92/h b1i5pEsmnUCBrd+g/1tLYPXx7pdayOate4xRqrRi0WWWt7H/z+rWhwNsWf/fo1kt +ioU/JcB4Lye6Jr8Qex7x3RbdTWdaA== =cVC0 -----END PGP SIGNATURE----- --=-57iEprBX2gyJd8Lvhxvp-- --===============1721818264== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KSW50ZWwtZ2Z4 IG1haWxpbmcgbGlzdApJbnRlbC1nZnhAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vaW50ZWwtZ2Z4Cg== --===============1721818264==--