[PATCHv4 06/11] qeth: Use *_dec_not_zero instead of *_add_unless

From: Sven Eckelmann
Date: Wed Jul 27 2011 - 05:56:39 EST


atomic_dec_not_zero is defined for each architecture through
<linux/atomic.h> to provide the functionality of
atomic_add_unless(x, -1, 0).

Signed-off-by: Sven Eckelmann <sven@xxxxxxxxxxxxx>
Cc: Ursula Braun <ursula.braun@xxxxxxxxxx>
Cc: Frank Blaschka <blaschka@xxxxxxxxxxxxxxxxxx>
Cc: linux390@xxxxxxxxxx
Cc: linux-s390@xxxxxxxxxxxxxxx
---
drivers/s390/net/qeth_core_main.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/s390/net/qeth_core_main.c b/drivers/s390/net/qeth_core_main.c
index 4550573..56ceed2 100644
--- a/drivers/s390/net/qeth_core_main.c
+++ b/drivers/s390/net/qeth_core_main.c
@@ -2765,7 +2765,7 @@ void qeth_queue_input_buffer(struct qeth_card *card, int index)
atomic_set(&card->force_alloc_skb, 3);
count = newcount;
} else {
- atomic_add_unless(&card->force_alloc_skb, -1, 0);
+ atomic_dec_not_zero(&card->force_alloc_skb);
}

/*
--
1.7.5.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/