From 80d4d7483fcfdefa0f62e66f9cc7fc18b59c24bb Mon Sep 17 00:00:00 2001 From: "Qixiang.Xu" Date: Thu, 17 Nov 2016 11:58:18 +0800 Subject: [PATCH] emmc/sd: for C99 compliance, changed the unsigned char/short bitfield to unsigned int bitfields C99 restricts bitfields type is signed and unsigned integer or _Bool. See section 6.7.2.1 Structure and union specifiers. "A bit-field shall have a type that is a qualified or unqualified version of _Bool, signed int, unsigned int, or some other implementation-defined type." Since the compiler packs bitfields anyways, actual data layout in the structure is unaffected. Signed-off-by: Alex Nemirovsky --- include/drivers/emmc.h | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/include/drivers/emmc.h b/include/drivers/emmc.h index 5f78dcefa..4bd73284a 100644 --- a/include/drivers/emmc.h +++ b/include/drivers/emmc.h @@ -131,21 +131,21 @@ typedef struct emmc_ops { } emmc_ops_t; typedef struct emmc_csd { - unsigned char not_used: 1; - unsigned char crc: 7; - unsigned char ecc: 2; - unsigned char file_format: 2; - unsigned char tmp_write_protect: 1; - unsigned char perm_write_protect: 1; - unsigned char copy: 1; - unsigned char file_format_grp: 1; - - unsigned short reserved_1: 5; - unsigned short write_bl_partial: 1; - unsigned short write_bl_len: 4; - unsigned short r2w_factor: 3; - unsigned short default_ecc: 2; - unsigned short wp_grp_enable: 1; + unsigned int not_used: 1; + unsigned int crc: 7; + unsigned int ecc: 2; + unsigned int file_format: 2; + unsigned int tmp_write_protect: 1; + unsigned int perm_write_protect: 1; + unsigned int copy: 1; + unsigned int file_format_grp: 1; + + unsigned int reserved_1: 5; + unsigned int write_bl_partial: 1; + unsigned int write_bl_len: 4; + unsigned int r2w_factor: 3; + unsigned int default_ecc: 2; + unsigned int wp_grp_enable: 1; unsigned int wp_grp_size: 5; unsigned int erase_grp_mult: 5; -- GitLab