[Intel-gfx] [PATCH 14/17] drm/i915/csr: switch to kernel types

Ville Syrjälä ville.syrjala at linux.intel.com
Wed Jan 16 17:03:53 UTC 2019


On Wed, Jan 16, 2019 at 11:15:32AM +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'
> 
> Minor checkpatch fixes sprinkled on top of the changed lines.
> 
> Signed-off-by: Jani Nikula <jani.nikula at intel.com>
> ---
>  drivers/gpu/drm/i915/intel_csr.c | 68 ++++++++++++++++----------------
>  1 file changed, 34 insertions(+), 34 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_csr.c b/drivers/gpu/drm/i915/intel_csr.c
> index ea5fb64d33dd..2b25cccdae16 100644
> --- a/drivers/gpu/drm/i915/intel_csr.c
> +++ b/drivers/gpu/drm/i915/intel_csr.c
> @@ -70,50 +70,50 @@ MODULE_FIRMWARE(BXT_CSR_PATH);
>  
>  struct intel_css_header {
>  	/* 0x09 for DMC */
> -	uint32_t module_type;
> +	u32 module_type;
>  
>  	/* Includes the DMC specific header in dwords */
> -	uint32_t header_len;
> +	u32 header_len;
>  
>  	/* always value would be 0x10000 */
> -	uint32_t header_ver;
> +	u32 header_ver;
>  
>  	/* Not used */
> -	uint32_t module_id;
> +	u32 module_id;
>  
>  	/* Not used */
> -	uint32_t module_vendor;
> +	u32 module_vendor;
>  
>  	/* in YYYYMMDD format */
> -	uint32_t date;
> +	u32 date;
>  
>  	/* Size in dwords (CSS_Headerlen + PackageHeaderLen + dmc FWsLen)/4 */
> -	uint32_t size;
> +	u32 size;
>  
>  	/* Not used */
> -	uint32_t key_size;
> +	u32 key_size;
>  
>  	/* Not used */
> -	uint32_t modulus_size;
> +	u32 modulus_size;
>  
>  	/* Not used */
> -	uint32_t exponent_size;
> +	u32 exponent_size;
>  
>  	/* Not used */
> -	uint32_t reserved1[12];
> +	u32 reserved1[12];
>  
>  	/* Major Minor */
> -	uint32_t version;
> +	u32 version;
>  
>  	/* Not used */
> -	uint32_t reserved2[8];
> +	u32 reserved2[8];
>  
>  	/* Not used */
> -	uint32_t kernel_header_info;
> +	u32 kernel_header_info;
>  } __packed;
>  
>  struct intel_fw_info {
> -	uint16_t reserved1;
> +	u16 reserved1;
>  
>  	/* Stepping (A, B, C, ..., *). * is a wildcard */
>  	char stepping;
> @@ -121,8 +121,8 @@ struct intel_fw_info {
>  	/* Sub-stepping (0, 1, ..., *). * is a wildcard */
>  	char substepping;
>  
> -	uint32_t offset;
> -	uint32_t reserved2;
> +	u32 offset;
> +	u32 reserved2;
>  } __packed;
>  
>  struct intel_package_header {
> @@ -135,14 +135,14 @@ struct intel_package_header {
>  	unsigned char reserved[10];
>  
>  	/* Number of valid entries in the FWInfo array below */
> -	uint32_t num_entries;
> +	u32 num_entries;
>  
>  	struct intel_fw_info fw_info[20];
>  } __packed;
>  
>  struct intel_dmc_header {
>  	/* always value would be 0x40403E3E */
> -	uint32_t signature;
> +	u32 signature;
>  
>  	/* DMC binary header length */
>  	unsigned char header_len;
> @@ -151,30 +151,30 @@ struct intel_dmc_header {
>  	unsigned char header_ver;
>  
>  	/* Reserved */
> -	uint16_t dmcc_ver;
> +	u16 dmcc_ver;
>  
>  	/* Major, Minor */
> -	uint32_t	project;
> +	u32	project;
>  
>  	/* Firmware program size (excluding header) in dwords */
> -	uint32_t	fw_size;
> +	u32	fw_size;

Some odd looking tabs here.


-- 
Ville Syrjälä
Intel


More information about the Intel-gfx mailing list