* [PATCH] Remove PACKED macro and use __attribute__((packed)) directly
@ 2013-09-05 9:21 WANG Chao
2013-10-16 7:12 ` Simon Horman
0 siblings, 1 reply; 4+ messages in thread
From: WANG Chao @ 2013-09-05 9:21 UTC (permalink / raw)
To: kexec; +Cc: Zhang Yanfei
People are not always aware of PACKED macro and tend to
__attribute__((packed)) more directly. So let's remove PACKED to unify
things.
Signed-off-by: WANG Chao <chaowang@redhat.com>
---
include/x86/x86-linux.h | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/include/x86/x86-linux.h b/include/x86/x86-linux.h
index 0949dc2..c41e5f2 100644
--- a/include/x86/x86-linux.h
+++ b/include/x86/x86-linux.h
@@ -12,8 +12,6 @@
#ifndef ASSEMBLY
-#define PACKED __attribute__((packed))
-
#ifndef E820_RAM
struct e820entry {
uint64_t addr; /* start of memory segment */
@@ -23,7 +21,7 @@ struct e820entry {
#define E820_RESERVED 2
#define E820_ACPI 3 /* usable as RAM once ACPI tables have been read */
#define E820_NVS 4
-} PACKED;
+} __attribute__((packed));
#endif
/* FIXME expand on drive_info_)struct... */
@@ -255,7 +253,7 @@ struct x86_linux_header {
uint64_t pref_address; /* 0x258 */
uint32_t init_size; /* 0x260 */
uint32_t handover_offset; /* 0x264 */
-} PACKED;
+} __attribute__((packed));
#endif /* ASSEMBLY */
--
1.8.3.1
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH] Remove PACKED macro and use __attribute__((packed)) directly
2013-09-05 9:21 [PATCH] Remove PACKED macro and use __attribute__((packed)) directly WANG Chao
@ 2013-10-16 7:12 ` Simon Horman
2013-10-16 7:14 ` Zhang Yanfei
0 siblings, 1 reply; 4+ messages in thread
From: Simon Horman @ 2013-10-16 7:12 UTC (permalink / raw)
To: WANG Chao; +Cc: Zhang Yanfei, kexec
On Thu, Sep 05, 2013 at 05:21:21PM +0800, WANG Chao wrote:
> People are not always aware of PACKED macro and tend to
> __attribute__((packed)) more directly. So let's remove PACKED to unify
> things.
>
> Signed-off-by: WANG Chao <chaowang@redhat.com>
Thanks, this looks good to me.
Reviewed-by: Simon Horman <horms@verge.net.au>
I suggest re-posting with Andre Morton CCed to see
if he will pick it up.
> ---
> include/x86/x86-linux.h | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/include/x86/x86-linux.h b/include/x86/x86-linux.h
> index 0949dc2..c41e5f2 100644
> --- a/include/x86/x86-linux.h
> +++ b/include/x86/x86-linux.h
> @@ -12,8 +12,6 @@
>
> #ifndef ASSEMBLY
>
> -#define PACKED __attribute__((packed))
> -
> #ifndef E820_RAM
> struct e820entry {
> uint64_t addr; /* start of memory segment */
> @@ -23,7 +21,7 @@ struct e820entry {
> #define E820_RESERVED 2
> #define E820_ACPI 3 /* usable as RAM once ACPI tables have been read */
> #define E820_NVS 4
> -} PACKED;
> +} __attribute__((packed));
> #endif
>
> /* FIXME expand on drive_info_)struct... */
> @@ -255,7 +253,7 @@ struct x86_linux_header {
> uint64_t pref_address; /* 0x258 */
> uint32_t init_size; /* 0x260 */
> uint32_t handover_offset; /* 0x264 */
> -} PACKED;
> +} __attribute__((packed));
>
> #endif /* ASSEMBLY */
>
> --
> 1.8.3.1
>
>
> _______________________________________________
> kexec mailing list
> kexec@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/kexec
>
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] Remove PACKED macro and use __attribute__((packed)) directly
2013-10-16 7:12 ` Simon Horman
@ 2013-10-16 7:14 ` Zhang Yanfei
2013-10-16 7:17 ` Simon Horman
0 siblings, 1 reply; 4+ messages in thread
From: Zhang Yanfei @ 2013-10-16 7:14 UTC (permalink / raw)
To: Simon Horman; +Cc: kexec, WANG Chao
Hello simon,
On 10/16/2013 03:12 PM, Simon Horman wrote:
> On Thu, Sep 05, 2013 at 05:21:21PM +0800, WANG Chao wrote:
>> People are not always aware of PACKED macro and tend to
>> __attribute__((packed)) more directly. So let's remove PACKED to unify
>> things.
>>
>> Signed-off-by: WANG Chao <chaowang@redhat.com>
>
> Thanks, this looks good to me.
>
> Reviewed-by: Simon Horman <horms@verge.net.au>
>
> I suggest re-posting with Andre Morton CCed to see
> if he will pick it up.
You should take this because this is a change in kexec-tools,
not in kernel source......:)
>
>> ---
>> include/x86/x86-linux.h | 6 ++----
>> 1 file changed, 2 insertions(+), 4 deletions(-)
>>
>> diff --git a/include/x86/x86-linux.h b/include/x86/x86-linux.h
>> index 0949dc2..c41e5f2 100644
>> --- a/include/x86/x86-linux.h
>> +++ b/include/x86/x86-linux.h
>> @@ -12,8 +12,6 @@
>>
>> #ifndef ASSEMBLY
>>
>> -#define PACKED __attribute__((packed))
>> -
>> #ifndef E820_RAM
>> struct e820entry {
>> uint64_t addr; /* start of memory segment */
>> @@ -23,7 +21,7 @@ struct e820entry {
>> #define E820_RESERVED 2
>> #define E820_ACPI 3 /* usable as RAM once ACPI tables have been read */
>> #define E820_NVS 4
>> -} PACKED;
>> +} __attribute__((packed));
>> #endif
>>
>> /* FIXME expand on drive_info_)struct... */
>> @@ -255,7 +253,7 @@ struct x86_linux_header {
>> uint64_t pref_address; /* 0x258 */
>> uint32_t init_size; /* 0x260 */
>> uint32_t handover_offset; /* 0x264 */
>> -} PACKED;
>> +} __attribute__((packed));
>>
>> #endif /* ASSEMBLY */
>>
>> --
>> 1.8.3.1
>>
>>
>> _______________________________________________
>> kexec mailing list
>> kexec@lists.infradead.org
>> http://lists.infradead.org/mailman/listinfo/kexec
>>
>
--
Thanks.
Zhang Yanfei
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] Remove PACKED macro and use __attribute__((packed)) directly
2013-10-16 7:14 ` Zhang Yanfei
@ 2013-10-16 7:17 ` Simon Horman
0 siblings, 0 replies; 4+ messages in thread
From: Simon Horman @ 2013-10-16 7:17 UTC (permalink / raw)
To: Zhang Yanfei; +Cc: kexec, WANG Chao
On Wed, Oct 16, 2013 at 03:14:11PM +0800, Zhang Yanfei wrote:
> Hello simon,
>
> On 10/16/2013 03:12 PM, Simon Horman wrote:
> > On Thu, Sep 05, 2013 at 05:21:21PM +0800, WANG Chao wrote:
> >> People are not always aware of PACKED macro and tend to
> >> __attribute__((packed)) more directly. So let's remove PACKED to unify
> >> things.
> >>
> >> Signed-off-by: WANG Chao <chaowang@redhat.com>
> >
> > Thanks, this looks good to me.
> >
> > Reviewed-by: Simon Horman <horms@verge.net.au>
> >
> > I suggest re-posting with Andre Morton CCed to see
> > if he will pick it up.
>
> You should take this because this is a change in kexec-tools,
> not in kernel source......:)
Oops. Thanks, I will take it.
>
> >
> >> ---
> >> include/x86/x86-linux.h | 6 ++----
> >> 1 file changed, 2 insertions(+), 4 deletions(-)
> >>
> >> diff --git a/include/x86/x86-linux.h b/include/x86/x86-linux.h
> >> index 0949dc2..c41e5f2 100644
> >> --- a/include/x86/x86-linux.h
> >> +++ b/include/x86/x86-linux.h
> >> @@ -12,8 +12,6 @@
> >>
> >> #ifndef ASSEMBLY
> >>
> >> -#define PACKED __attribute__((packed))
> >> -
> >> #ifndef E820_RAM
> >> struct e820entry {
> >> uint64_t addr; /* start of memory segment */
> >> @@ -23,7 +21,7 @@ struct e820entry {
> >> #define E820_RESERVED 2
> >> #define E820_ACPI 3 /* usable as RAM once ACPI tables have been read */
> >> #define E820_NVS 4
> >> -} PACKED;
> >> +} __attribute__((packed));
> >> #endif
> >>
> >> /* FIXME expand on drive_info_)struct... */
> >> @@ -255,7 +253,7 @@ struct x86_linux_header {
> >> uint64_t pref_address; /* 0x258 */
> >> uint32_t init_size; /* 0x260 */
> >> uint32_t handover_offset; /* 0x264 */
> >> -} PACKED;
> >> +} __attribute__((packed));
> >>
> >> #endif /* ASSEMBLY */
> >>
> >> --
> >> 1.8.3.1
> >>
> >>
> >> _______________________________________________
> >> kexec mailing list
> >> kexec@lists.infradead.org
> >> http://lists.infradead.org/mailman/listinfo/kexec
> >>
> >
>
>
> --
> Thanks.
> Zhang Yanfei
>
> _______________________________________________
> kexec mailing list
> kexec@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/kexec
>
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-10-16 7:18 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-05 9:21 [PATCH] Remove PACKED macro and use __attribute__((packed)) directly WANG Chao
2013-10-16 7:12 ` Simon Horman
2013-10-16 7:14 ` Zhang Yanfei
2013-10-16 7:17 ` Simon Horman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox