Blame SOURCES/kexec-tools-2.0.4-vmcore-dmesg-struct_val_u64-not-casting-u64-to-u32.patch

765b01
From 158d7638f1669a8d34def55ab81f10993e68e76a Mon Sep 17 00:00:00 2001
765b01
From: WANG Chao <chaowang@redhat.com>
765b01
Date: Tue, 7 Jan 2014 01:37:34 +0800
765b01
Subject: [PATCH] vmcore-dmesg: struct_val_u64() not casting u64 to u32
765b01
765b01
It seems gcc doesn't check return type from inline function.
765b01
struct_val_u64() should return u64 otherwise upper 32bit is lost.
765b01
765b01
Signed-off-by: WANG Chao <chaowang@redhat.com>
765b01
Acked-by: Vivek Goyal <vgoyal@redhat.com>
765b01
Signed-off-by: Simon Horman <horms@verge.net.au>
765b01
---
765b01
 vmcore-dmesg/vmcore-dmesg.c | 2 +-
765b01
 1 file changed, 1 insertion(+), 1 deletion(-)
765b01
765b01
diff --git a/vmcore-dmesg/vmcore-dmesg.c b/vmcore-dmesg/vmcore-dmesg.c
765b01
index 0f477c0..df14c89 100644
765b01
--- a/vmcore-dmesg/vmcore-dmesg.c
765b01
+++ b/vmcore-dmesg/vmcore-dmesg.c
765b01
@@ -529,7 +529,7 @@ static inline uint32_t struct_val_u32(char *ptr, unsigned int offset)
765b01
 	return(file32_to_cpu(*(uint32_t *)(ptr + offset)));
765b01
 }
765b01
 
765b01
-static inline uint32_t struct_val_u64(char *ptr, unsigned int offset)
765b01
+static inline uint64_t struct_val_u64(char *ptr, unsigned int offset)
765b01
 {
765b01
 	return(file64_to_cpu(*(uint64_t *)(ptr + offset)));
765b01
 }
765b01
-- 
765b01
1.8.4.2
765b01