[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20170130184755.18569-1-fabf@skynet.be>
Date: Mon, 30 Jan 2017 19:47:55 +0100
From: Fabian Frederick <fabf@...net.be>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: linux-kernel@...r.kernel.org, Corey Minyard <minyard@....org>,
openipmi-developer@...ts.sourceforge.net,
Fabian Frederick <fabf@...net.be>
Subject: [PATCH 08/14] ipmi: use atomic_dec_not_zero()
instead of atomic_add_unless(value, -1, 0)
Signed-off-by: Fabian Frederick <fabf@...net.be>
---
drivers/char/ipmi/ipmi_msghandler.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/char/ipmi/ipmi_msghandler.c b/drivers/char/ipmi/ipmi_msghandler.c
index 9f69995..961d677 100644
--- a/drivers/char/ipmi/ipmi_msghandler.c
+++ b/drivers/char/ipmi/ipmi_msghandler.c
@@ -3851,7 +3851,7 @@ static void handle_new_recv_msgs(ipmi_smi_t intf)
* If the pretimout count is non-zero, decrement one from it and
* deliver pretimeouts to all the users.
*/
- if (atomic_add_unless(&intf->watchdog_pretimeouts_to_deliver, -1, 0)) {
+ if (atomic_dec_not_zero(&intf->watchdog_pretimeouts_to_deliver)) {
ipmi_user_t user;
rcu_read_lock();
--
2.9.3
Powered by blists - more mailing lists