Patchwork [V3,02/13] hw/sd.c: make sd_wp_addr() accept 64 bit address argument

login
register
mail settings
Submitter Mitsyanko Igor
Date April 27, 2012, 3:50 p.m.
Message ID <1335541859-28829-3-git-send-email-i.mitsyanko@samsung.com>
Download mbox | patch
Permalink /patch/155541/
State New
Headers show

Comments

Mitsyanko Igor - April 27, 2012, 3:50 p.m.
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 <i.mitsyanko@samsung.com>
---
 hw/sd.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Patch

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);