From: Christoph Lameter Date: Mon, 6 Dec 2010 17:40:07 +0000 (-0600) Subject: xen: Use this_cpu_inc_return X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=b2e4ae69757cdfef4c612a04f097c1e20489a565;p=linux-beck.git xen: Use this_cpu_inc_return __this_cpu_inc_return reduces code and simplifies code. Cc: Jeremy Fitzhardinge Acked-by: H. Peter Anvin Signed-off-by: Christoph Lameter --- diff --git a/drivers/xen/events.c b/drivers/xen/events.c index a10c66dc9dda..65f8637d13cf 100644 --- a/drivers/xen/events.c +++ b/drivers/xen/events.c @@ -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. */