[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] x86: simplify a few macros / inline functions
>>> On 08.05.15 at 10:25, <andrew.cooper3@xxxxxxxxxx> wrote: > On 08/05/15 07:42, Jan Beulich wrote: >> @@ -30,29 +29,28 @@ build_write_atomic(write_u64_atomic, "q" >> >> void __bad_atomic_size(void); >> >> -#define read_atomic(p) ({ \ >> - unsigned long x_; \ >> - switch ( sizeof(*(p)) ) { \ >> - case 1: x_ = read_u8_atomic((uint8_t *)(p)); break; \ >> - case 2: x_ = read_u16_atomic((uint16_t *)(p)); break; \ >> - case 4: x_ = read_u32_atomic((uint32_t *)(p)); break; \ >> - case 8: x_ = read_u64_atomic((uint64_t *)(p)); break; \ >> - default: x_ = 0; __bad_atomic_size(); break; \ >> - } \ >> - (typeof(*(p)))x_; \ >> +#define read_atomic(p) ({ \ >> + unsigned long x_; \ >> + switch ( sizeof(*(p)) ) { \ >> + case 1: x_ = read_u8_atomic((uint8_t *)(p)); break; \ >> + case 2: x_ = read_u16_atomic((uint16_t *)(p)); break; \ >> + case 4: x_ = read_u32_atomic((uint32_t *)(p)); break; \ >> + case 8: x_ = read_u64_atomic((uint64_t *)(p)); break; \ >> + default: x_ = 0; __bad_atomic_size(); break; \ >> + } \ >> + (typeof(*(p)))x_; \ >> }) > > I cant spot a change in read_atomic(), other than the alignment of the > \'s. I just want to double check that I haven't missed something. That's correct - I just wanted them to align with the write_atomic() ones again without needlessly padding the now shorter lines there. Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |