diff options
author | mav <mav@FreeBSD.org> | 2011-01-17 19:31:34 +0000 |
---|---|---|
committer | mav <mav@FreeBSD.org> | 2011-01-17 19:31:34 +0000 |
commit | f4390b5740c43afad7218e4bd73f5e0a0b5817c3 (patch) | |
tree | 10ba27588c6f3e0df730f41c4ebcee647cc62879 /sys/dev/mmc | |
parent | d326a38b4b0f991450af222a605d5770df1a7aaa (diff) | |
download | FreeBSD-src-f4390b5740c43afad7218e4bd73f5e0a0b5817c3.zip FreeBSD-src-f4390b5740c43afad7218e4bd73f5e0a0b5817c3.tar.gz |
Fix 32bit bit fields handling. This fixes card serial number fetching.
It was just a cosmetic issue, because that number is only reported in logs.
Reported by: Michael Butler on current@
Diffstat (limited to 'sys/dev/mmc')
-rw-r--r-- | sys/dev/mmc/mmc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/mmc/mmc.c b/sys/dev/mmc/mmc.c index 63c81dd..45ddd56 100644 --- a/sys/dev/mmc/mmc.c +++ b/sys/dev/mmc/mmc.c @@ -749,7 +749,7 @@ mmc_get_bits(uint32_t *bits, int bit_len, int start, int size) uint32_t retval = bits[i] >> shift; if (size + shift > 32) retval |= bits[i - 1] << (32 - shift); - return (retval & ((1 << size) - 1)); + return (retval & ((1llu << size) - 1)); } static void |