Re: cosmetic nit in mmc.c

From: Alexander Motin <mav_at_FreeBSD.org>
Date: Mon, 17 Jan 2011 21:32:57 +0200
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)
_at__at_ -749,7 +749,7 _at__at_ 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
Received on Mon Jan 17 2011 - 18:33:44 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:10 UTC