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

Re: [Xen-devel] [PATCH v3 07/24] x86/emul: Clean up the naming of the retire union


  • To: Andrew Cooper <Andrew.Cooper3@xxxxxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxx>
  • From: Paul Durrant <Paul.Durrant@xxxxxxxxxx>
  • Date: Wed, 30 Nov 2016 14:05:29 +0000
  • Accept-language: en-GB, en-US
  • Cc: Jan Beulich <JBeulich@xxxxxxxx>
  • Delivery-date: Wed, 30 Nov 2016 15:17:50 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xen.org>
  • Thread-index: AQHSSxC/p/3wZeVaXEeWkQKEqeVyg6DxjFfw///xdoCAABFPAA==
  • Thread-topic: [PATCH v3 07/24] x86/emul: Clean up the naming of the retire union

> -----Original Message-----
> From: Andrew Cooper
> Sent: 30 November 2016 14:02
> To: Paul Durrant <Paul.Durrant@xxxxxxxxxx>; Xen-devel <xen-
> devel@xxxxxxxxxxxxx>
> Cc: Jan Beulich <JBeulich@xxxxxxxx>
> Subject: Re: [PATCH v3 07/24] x86/emul: Clean up the naming of the retire
> union
> 
> On 30/11/16 13:58, Paul Durrant wrote:
> >> -----Original Message-----
> >> From: Andrew Cooper [mailto:andrew.cooper3@xxxxxxxxxx]
> >> Sent: 30 November 2016 13:50
> >> To: Xen-devel <xen-devel@xxxxxxxxxxxxx>
> >> Cc: Andrew Cooper <Andrew.Cooper3@xxxxxxxxxx>; Jan Beulich
> >> <JBeulich@xxxxxxxx>; Paul Durrant <Paul.Durrant@xxxxxxxxxx>
> >> Subject: [PATCH v3 07/24] x86/emul: Clean up the naming of the retire
> union
> >>
> >> Rename byte to raw, as the field being a single byte long is an
> >> implementation
> >> detail.  Make the bitfields part of an anonymous struct to remove the
> .flags
> >> qualifier.  Change the types of the flags to being booleans, to match their
> >> use.
> >>
> > Is it legitimate to use a bool in a bitfield?
> 
> Yes.  Why wouldn't it be?
> 

They always used to be restricted to int or unsigned int. Looks like this was 
relaxed in C99.

> > Also, anonymous unions are not part of C99 AFAIK... are we now stipulating
> something more recent?
> 
> We used gnu99 for as long as I can remember, and we have other examples
> of this pattern already in Xen.
> 

If there's precedent then that's fine.

Reviewed-by: Paul Durrant <paul.durrant@xxxxxxxxxx>

> ~Andrew

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

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