diff mbox

[U-Boot,6/8] mmc: Change 'part_config' to be a u8 not char.

Message ID 1494444018-2748-6-git-send-email-trini@konsulko.com
State Accepted
Commit 7ca0d3dde177fa4245f4a6174c577a58c8a3051d
Delegated to: Jaehoon Chung
Headers show

Commit Message

Tom Rini May 10, 2017, 7:20 p.m. UTC
In some places we check if part_config is set to MMCPART_NOAVAILABLE
(0xff).  With part_config being a char this is always false.  We should
be using a u8 to store this value instead, after a quick consultation
with the Linux Kernel.  Reported by clang-3.8.

Cc: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
---
 include/mmc.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jaehoon Chung May 25, 2017, 1:15 p.m. UTC | #1
Hi Tom,

On 05/11/2017 04:20 AM, Tom Rini wrote:
> In some places we check if part_config is set to MMCPART_NOAVAILABLE
> (0xff).  With part_config being a char this is always false.  We should
> be using a u8 to store this value instead, after a quick consultation
> with the Linux Kernel.  Reported by clang-3.8.
> 
> Cc: Jaehoon Chung <jh80.chung@samsung.com>
> Signed-off-by: Tom Rini <trini@konsulko.com>

Applied to u-boot-mmc. Thanks!

> ---
>  include/mmc.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/include/mmc.h b/include/mmc.h
> index fad12d608cef..00576fa3d0a3 100644
> --- a/include/mmc.h
> +++ b/include/mmc.h
> @@ -430,7 +430,7 @@ struct mmc {
>  	u8 part_support;
>  	u8 part_attr;
>  	u8 wr_rel_set;
> -	char part_config;
> +	u8 part_config;
>  	uint tran_speed;
>  	uint read_bl_len;
>  	uint write_bl_len;
>
diff mbox

Patch

diff --git a/include/mmc.h b/include/mmc.h
index fad12d608cef..00576fa3d0a3 100644
--- a/include/mmc.h
+++ b/include/mmc.h
@@ -430,7 +430,7 @@  struct mmc {
 	u8 part_support;
 	u8 part_attr;
 	u8 wr_rel_set;
-	char part_config;
+	u8 part_config;
 	uint tran_speed;
 	uint read_bl_len;
 	uint write_bl_len;