From: Kever Yang Date: Thu, 8 Jun 2017 01:20:04 +0000 (+0800) Subject: mmc: rpmb: update size format for write_counter X-Git-Tag: v2017.09-rc1~187 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=343749c42554b058e53086aefe21d47b383326d5;p=oweals%2Fu-boot.git mmc: rpmb: update size format for write_counter According to MMC spec, the write_counter is 4-byte length, use 'int' instead of 'long' type for the 'long' is not 4-byte in 64 bit CPU. Signed-off-by: Jason Zhu Signed-off-by: Kever Yang Reviewed-by: Simon Glass Signed-off-by: Jaehoon Chung --- diff --git a/drivers/mmc/rpmb.c b/drivers/mmc/rpmb.c index 1c6888fc48..0b6b6222bd 100644 --- a/drivers/mmc/rpmb.c +++ b/drivers/mmc/rpmb.c @@ -67,7 +67,7 @@ struct s_rpmb { unsigned char mac[RPMB_SZ_MAC]; unsigned char data[RPMB_SZ_DATA]; unsigned char nonce[RPMB_SZ_NONCE]; - unsigned long write_counter; + unsigned int write_counter; unsigned short address; unsigned short block_count; unsigned short result;