From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:37336) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T0x0Y-0007y8-9H for qemu-devel@nongnu.org; Mon, 13 Aug 2012 11:56:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T0x0W-000777-0e for qemu-devel@nongnu.org; Mon, 13 Aug 2012 11:56:46 -0400 Received: from mnementh.archaic.org.uk ([81.2.115.146]:40950) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T0x0V-000773-QT for qemu-devel@nongnu.org; Mon, 13 Aug 2012 11:56:43 -0400 From: Peter Maydell Date: Mon, 13 Aug 2012 16:31:53 +0100 Message-Id: <1344871919-31559-5-git-send-email-peter.maydell@linaro.org> In-Reply-To: <1344871919-31559-1-git-send-email-peter.maydell@linaro.org> References: <1344871919-31559-1-git-send-email-peter.maydell@linaro.org> Subject: [Qemu-devel] [PATCH 04/10] hw/sd.c: make sd_wp_addr() accept 64 bit address argument List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori , Blue Swirl Cc: qemu-devel@nongnu.org, Paul Brook From: Mitsyanko Igor Currently sd_wp_addr() accepts 32 bit address arguments therefore implicitly restricting SD card address range. Change address argument type to uint64_t. Signed-off-by: Igor Mitsyanko Signed-off-by: Peter Maydell --- hw/sd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/sd.c b/hw/sd.c index 575b509..e24d04a 100644 --- a/hw/sd.c +++ b/hw/sd.c @@ -539,7 +539,7 @@ static void sd_function_switch(SDState *sd, uint32_t arg) sd->data[66] = crc & 0xff; } -static inline int sd_wp_addr(SDState *sd, uint32_t addr) +static inline int sd_wp_addr(SDState *sd, uint64_t addr) { return test_bit(addr >> (HWBLOCK_SHIFT + SECTOR_SHIFT + WPGROUP_SHIFT), sd->wp_groups); -- 1.7.9.5