svn commit: r217509 - head/sys/dev/mmc

Alexander Motin mav at FreeBSD.org
Mon Jan 17 19:31:35 UTC 2011


Author: mav
Date: Mon Jan 17 19:31:34 2011
New Revision: 217509
URL: http://svn.freebsd.org/changeset/base/217509

Log:
  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@

Modified:
  head/sys/dev/mmc/mmc.c

Modified: head/sys/dev/mmc/mmc.c
==============================================================================
--- head/sys/dev/mmc/mmc.c	Mon Jan 17 19:17:26 2011	(r217508)
+++ head/sys/dev/mmc/mmc.c	Mon Jan 17 19:31:34 2011	(r217509)
@@ -749,7 +749,7 @@ mmc_get_bits(uint32_t *bits, int bit_len
 	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


More information about the svn-src-head mailing list