WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Xen

xen-devel

[Top] [All Lists]

Re: [Xen-devel] [PATCH] Cleanup for xen/common/kexec.c

To: Christoph Egger <Christoph.Egger@xxxxxxx>
Subject: Re: [Xen-devel] [PATCH] Cleanup for xen/common/kexec.c
From: Ian Campbell <Ian.Campbell@xxxxxxxxxxxxx>
Date: 2007年1月22日 11:57:06 +0000
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: 2007年1月22日 03:56:46 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <200701221048.53313.Christoph.Egger@xxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <200701221048.53313.Christoph.Egger@xxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Mon, 2007年01月22日 at 10:48 +0100, Christoph Egger wrote:
> #define ELFNOTE_ALIGN(_n_) (((_n_)+3)&~3)
> -#define ELFNOTE_NAME(_n_) ((void*)(_n_) + sizeof(*(_n_)))
> +#define ELFNOTE_NAME(_n_) ((char*)(_n_) + sizeof(*(_n_)))
> #define ELFNOTE_DESC(_n_) (ELFNOTE_NAME(_n_) + ELFNOTE_ALIGN((_n_)->namesz))
> #define ELFNOTE_NEXT(_n_) (ELFNOTE_DESC(_n_) + ELFNOTE_ALIGN((_n_)->descsz))
>
> @@ -75,10 +75,10 @@ void kexec_crash_save_cpu(void)
> if ( cpu_test_and_set(cpu, crash_saved_cpus) )
> return;
>
> - prstatus = ELFNOTE_DESC(note);
> -
> - note = ELFNOTE_NEXT(note);
> - xencore = ELFNOTE_DESC(note);
> + prstatus = (ELF_Prstatus *)ELFNOTE_DESC(note);
> +
> + note = (Elf_Note *)ELFNOTE_NEXT(note);
Perhaps you could include the cast in the ELFNOTE_NEXT() macro instead
of repeating it everywhere it is used?
Also, could the elfnote macros could be moved to a header? They are used
in xen/common/elf.c too.
Ian.
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
Previous by Date: [Xen-devel] [PATCH] linux/i386: widen physical address range , Jan Beulich
Next by Date: [Xen-devel] [PATCH] [XEND] Fix get_dev_property_by_uuid , Stefan Berger
Previous by Thread: [Xen-devel] [PATCH] Cleanup for xen/common/kexec.c , Christoph Egger
Next by Thread: Re: [Xen-devel] [PATCH] Cleanup for xen/common/kexec.c , Christoph Egger
Indexes: [Date] [Thread] [Top] [All Lists]

Copyright ©, Citrix Systems Inc. All rights reserved. Legal and Privacy
Citrix This site is hosted by Citrix

AltStyle によって変換されたページ (->オリジナル) /