Commit 1e4f2955 authored by Ken'ichi Ohmichi's avatar Ken'ichi Ohmichi Committed by Linus Torvalds

vmcoreinfo: use the existing offsetof() for VMCOREINFO_OFFSET()

It is better that the existing offsetof() is used for VMCOREINFO_OFFSET().

This discussion is the following:
http://www.ussg.iu.edu/hypermail/linux/kernel/0709.3/0584.htmlSigned-off-by: default avatarKen'ichi Ohmichi <oomichi@mxs.nes.nec.co.jp>
Acked-by: default avatarSimon Horman <horms@verge.net.au>
Cc: David Rientjes <rientjes@google.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent c76f860c
......@@ -137,7 +137,7 @@ unsigned long paddr_vmcoreinfo_note(void);
(unsigned long)sizeof(struct name))
#define VMCOREINFO_OFFSET(name, field) \
vmcoreinfo_append_str("OFFSET(%s.%s)=%lu\n", #name, #field, \
(unsigned long)&(((struct name *)0)->field))
(unsigned long)offsetof(struct name, field))
#define VMCOREINFO_LENGTH(name, value) \
vmcoreinfo_append_str("LENGTH(%s)=%lu\n", #name, (unsigned long)value)
#define VMCOREINFO_NUMBER(name) \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment