xen: Use this_cpu_inc_return
authorChristoph Lameter <cl@linux.com>
Mon, 6 Dec 2010 17:40:07 +0000 (11:40 -0600)
committerTejun Heo <tj@kernel.org>
Fri, 17 Dec 2010 14:18:05 +0000 (15:18 +0100)
__this_cpu_inc_return reduces code and simplifies code.

Cc: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Acked-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Christoph Lameter <cl@linux.com>
drivers/xen/events.c

index a10c66d..65f8637 100644 (file)
@@ -1109,7 +1109,7 @@ static void __xen_evtchn_do_upcall(void)
 
                vcpu_info->evtchn_upcall_pending = 0;
 
-               if (__get_cpu_var(xed_nesting_count)++)
+               if (__this_cpu_inc_return(xed_nesting_count) - 1)
                        goto out;
 
 #ifndef CONFIG_X86 /* No need for a barrier -- XCHG is a barrier on x86. */