[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [Xen-devel] [PATCH] Cleanup asm-x86/guest_access.h

  • To: "Egger, Christoph" <Christoph.Egger@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx
  • From: "Petersson, Mats" <Mats.Petersson@xxxxxxx>
  • Date: Fri, 12 Jan 2007 13:01:07 +0100
  • Delivery-date: Fri, 12 Jan 2007 04:00:58 -0800
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>
  • Thread-index: Acc1kOgXXu2QqNVlSqKI0rDbq5BKKwAsCkUg
  • Thread-topic: [Xen-devel] [PATCH] Cleanup asm-x86/guest_access.h


> -----Original Message-----
> From: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx 
> [mailto:xen-devel-bounces@xxxxxxxxxxxxxxxxxxx] On Behalf Of 
> Christoph Egger
> Sent: 11 January 2007 14:54
> To: xen-devel@xxxxxxxxxxxxxxxxxxx
> Subject: [Xen-devel] [PATCH] Cleanup asm-x86/guest_access.h
> Hi!
> I cleaned up xen/include/asm-x86/guest_access.h. I also fixed 
> a bug in 
> __copy_field_from_guest(), which seems to me to
> be a kind of cut-copy-paste bug.
> copy_{to,from}_user() and copy_{to,from}_user_hvm() expect a non-const
> argument as the first argument. So I remove the consts from 
> the initializer.
> I replace typeof with __typeof__, which is always available 
> in gcc - it is 
> not, when the -ansi option is used.

And is it expected that Xen will EVER be compiled with -ansi? I think
there's enough gcc-isms in other places that this will never happen -
not that it really makes any difference, I'm just curious if anyone

> I do some explicit casts, which makes gcc errors more readable.
> In case, you pass an array by your mistake, which gets
> casted to a char *, then gcc tells you that rather just 
> "invalid initializer".
> Christoph

Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.