Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 17 Jan 2011 21:32:57 +0200
From:      Alexander Motin <mav@FreeBSD.org>
To:        Michael Butler <imb@protected-networks.net>, current <current@freebsd.org>
Subject:   Re: cosmetic nit in mmc.c
Message-ID:  <4D349969.8090809@FreeBSD.org>
In-Reply-To: <mailpost.1295210606.8436688.86406.mailing.freebsd.current@FreeBSD.cs.nctu.edu.tw>
References:  <mailpost.1295210606.8436688.86406.mailing.freebsd.current@FreeBSD.cs.nctu.edu.tw>

next in thread | previous in thread | raw e-mail | index | archive | help
Michael Butler wrote:
> In the process of making the sdhci driver work with my laptop, I noted a
> cosmetic issue where the SD card's serial number is not correctly
> reported (it's always zero). Possible patch attached,

Thank you. I've committed such patch to the HEAD at r217509:

--- mmc.c	Mon Jan 17 19:17:26 2011	(r217508)
+++ 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


-- 
Alexander Motin



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4D349969.8090809>