diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2015-05-11 10:34:53 +0300 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@linaro.org> | 2015-06-01 10:07:03 +0300 |
commit | ded8a5f9613dbb62cd74f9f26a9caa3193eb3764 (patch) | |
tree | 4a09968f8470b96b0d71251e46841bfa80e5da89 /drivers/cpuidle/cpuidle.h | |
parent | bf3a35ac8038d6f3104c4b9fd8a6970c6b42b56f (diff) | |
download | linux-ded8a5f9613dbb62cd74f9f26a9caa3193eb3764.tar.xz |
mmc: cast u8 to unsigned long long to avoid unexpected error
card->ext_csd.enhanced_area_offset is defined as "unsigned long long",
and, ext_csd[] is defined as u8.
unsigned long long data might have strange data if first bit of ext_csd[]
was 1. this patch cast it to (unsigned long long)
Special thanks to coverity <http://www.coverity.com>
ex)
u8 data8;
u64 data64;
data8 = 0x80;
data64 = (data8 << 24); // 0xffffffff80000000
data64 = (((unsigned long long)data8) << 24); // 0x80000000;
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/cpuidle/cpuidle.h')
0 files changed, 0 insertions, 0 deletions