Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1570027 > unrolled thread

[PATCH 08/14] ipmi: use atomic_dec_not_zero()

Started byFabian Frederick <fabf@skynet.be>
First post2017-01-30 20:00 +0100
Last post2017-01-30 20:00 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH 08/14] ipmi: use atomic_dec_not_zero() Fabian Frederick <fabf@skynet.be> - 2017-01-30 20:00 +0100

#1570027 — [PATCH 08/14] ipmi: use atomic_dec_not_zero()

FromFabian Frederick <fabf@skynet.be>
Date2017-01-30 20:00 +0100
Subject[PATCH 08/14] ipmi: use atomic_dec_not_zero()
Message-ID<t5plh-7sP-37@gated-at.bofh.it>
instead of atomic_add_unless(value, -1, 0)

Signed-off-by: Fabian Frederick <fabf@skynet.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

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web