diff options
author | Ken'ichi Ohmichi <oomichi@mxs.nes.nec.co.jp> | 2008-02-07 03:15:22 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-07 11:42:25 -0500 |
commit | 1e4f2955433231b4b02dc4a9eb5d4d403a8680e1 (patch) | |
tree | 8414e9b4b5b22f201cbd993630d8ac13a98cd24c /include | |
parent | c76f860c44357f560a763d2894e95464cab7b159 (diff) |
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.html
Signed-off-by: Ken'ichi Ohmichi <oomichi@mxs.nes.nec.co.jp>
Acked-by: Simon Horman <horms@verge.net.au>
Cc: David Rientjes <rientjes@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/kexec.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/kexec.h b/include/linux/kexec.h index 39112a0e4693..cbc3cd7e11c1 100644 --- a/include/linux/kexec.h +++ b/include/linux/kexec.h | |||
@@ -137,7 +137,7 @@ unsigned long paddr_vmcoreinfo_note(void); | |||
137 | (unsigned long)sizeof(struct name)) | 137 | (unsigned long)sizeof(struct name)) |
138 | #define VMCOREINFO_OFFSET(name, field) \ | 138 | #define VMCOREINFO_OFFSET(name, field) \ |
139 | vmcoreinfo_append_str("OFFSET(%s.%s)=%lu\n", #name, #field, \ | 139 | vmcoreinfo_append_str("OFFSET(%s.%s)=%lu\n", #name, #field, \ |
140 | (unsigned long)&(((struct name *)0)->field)) | 140 | (unsigned long)offsetof(struct name, field)) |
141 | #define VMCOREINFO_LENGTH(name, value) \ | 141 | #define VMCOREINFO_LENGTH(name, value) \ |
142 | vmcoreinfo_append_str("LENGTH(%s)=%lu\n", #name, (unsigned long)value) | 142 | vmcoreinfo_append_str("LENGTH(%s)=%lu\n", #name, (unsigned long)value) |
143 | #define VMCOREINFO_NUMBER(name) \ | 143 | #define VMCOREINFO_NUMBER(name) \ |