lkml.org 
[lkml]   [2017]   [Jan]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 12/14] s390/topology: use atomic_dec_not_zero()
Date
instead of atomic_add_unless(value, -1, 0)

Signed-off-by: Fabian Frederick <fabf@skynet.be>
---
arch/s390/kernel/topology.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/s390/kernel/topology.c b/arch/s390/kernel/topology.c
index 7b2b19b..820ef64 100644
--- a/arch/s390/kernel/topology.c
+++ b/arch/s390/kernel/topology.c
@@ -300,7 +300,7 @@ static atomic_t topology_poll = ATOMIC_INIT(0);

static void set_topology_timer(void)
{
- if (atomic_add_unless(&topology_poll, -1, 0))
+ if (atomic_dec_not_zero(&topology_poll))
mod_timer(&topology_timer, jiffies + HZ / 10);
else
mod_timer(&topology_timer, jiffies + HZ * 60);
--
2.9.3
\
 
 \ /
  Last update: 2017-01-30 19:49    [W:0.028 / U:1.308 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site