Date: Mon, 17 Jan 2011 19:31:34 +0000 (UTC) From: Alexander Motin <mav@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r217509 - head/sys/dev/mmc Message-ID: <201101171931.p0HJVYKv010568@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201101171931.p0HJVYKv010568>