Fix missing cast back to void *
authorPhilip Prindeville <philipp@redfish-solutions.com>
Sat, 24 Dec 2011 00:53:26 +0000 (17:53 -0700)
committerPatrick Georgi <patrick@georgi-clan.de>
Sat, 24 Dec 2011 10:56:52 +0000 (11:56 +0100)
MEM_RANGE_PTR() also needs to return a pointer to untyped memory.

Change-Id: I0ec64ad7bdb136d5e1a999bff3df6fa66eb29bf1
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
Reviewed-on: http://review.coreboot.org/500
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <patrick@georgi-clan.de>
payloads/libpayload/include/coreboot_tables.h

index 574469a6ed57085f9e3c6ddc808fb753e848edae..e362d064808a84ae75943d35c1923b497945b4f0 100644 (file)
@@ -234,8 +234,8 @@ static inline u16 cb_checksum(const void *ptr, unsigned len)
        (((_rec)->size - sizeof(*(_rec))) / sizeof((_rec)->map[0]))
 
 #define MEM_RANGE_PTR(_rec, _idx) \
-       (((u8 *) (_rec)) + sizeof(*(_rec)) \
-       + (sizeof((_rec)->map[0]) * (_idx)))
+       (void *)(((u8 *) (_rec)) + sizeof(*(_rec)) \
+               + (sizeof((_rec)->map[0]) * (_idx)))
 
 #define MB_VENDOR_STRING(_mb) \
        (((unsigned char *) ((_mb)->strings)) + (_mb)->vendor_idx)