>>> On 30.04.15 at 17:33, <david.vra...@citrix.com> wrote: > +static always_inline unsigned long __xadd( > + volatile void *ptr, unsigned long v, int size) > +{ > + switch ( size ) > + { > + case 1: > + asm volatile ( "lock; xaddb %b0,%1" > + : "+r" (v), "+m" (*__xg((volatile void *)ptr))
"ptr" already is "volatile void *", so why the cast? Or is this just an artifact of __xchg() doing the same odd thing? > +#define arch_fetch_and_add(ptr, v) \ > + ({ \ > + (typeof(*(ptr)))__xadd(ptr, (typeof(*(ptr)))(v), sizeof(*(ptr))); \ > + }) It being a single expression inside the braces I don't think you really need the ({}) GNU extension here. Both of course easily adjusted while committing, if you agree. Jan _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel