summaryrefslogtreecommitdiff
path: root/vmcore-dmesg
diff options
context:
space:
mode:
authorWANG Chao <chaowang@redhat.com>2014-01-07 01:37:34 +0800
committerSimon Horman <horms@verge.net.au>2014-01-13 17:42:31 +0900
commit158d7638f1669a8d34def55ab81f10993e68e76a (patch)
tree4409548d2df20a28744ffe24af5151e3d1627ad8 /vmcore-dmesg
parent027413d822fd57dd39d2d2afab1484bc6b6b84f9 (diff)
vmcore-dmesg: struct_val_u64() not casting u64 to u32
It seems gcc doesn't check return type from inline function. struct_val_u64() should return u64 otherwise upper 32bit is lost. Signed-off-by: WANG Chao <chaowang@redhat.com> Acked-by: Vivek Goyal <vgoyal@redhat.com> Signed-off-by: Simon Horman <horms@verge.net.au>
Diffstat (limited to 'vmcore-dmesg')
-rw-r--r--vmcore-dmesg/vmcore-dmesg.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/vmcore-dmesg/vmcore-dmesg.c b/vmcore-dmesg/vmcore-dmesg.c
index 0f477c0..df14c89 100644
--- a/vmcore-dmesg/vmcore-dmesg.c
+++ b/vmcore-dmesg/vmcore-dmesg.c
@@ -529,7 +529,7 @@ static inline uint32_t struct_val_u32(char *ptr, unsigned int offset)
return(file32_to_cpu(*(uint32_t *)(ptr + offset)));
}
-static inline uint32_t struct_val_u64(char *ptr, unsigned int offset)
+static inline uint64_t struct_val_u64(char *ptr, unsigned int offset)
{
return(file64_to_cpu(*(uint64_t *)(ptr + offset)));
}