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


Groups > linux.kernel > #1570008 > unrolled thread

[PATCH 06/14] s390/qeth: use atomic_dec_not_zero()

Started byFabian Frederick <fabf@skynet.be>
First post2017-01-30 19:50 +0100
Last post2017-01-31 12:30 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH 06/14] s390/qeth: use atomic_dec_not_zero() Fabian Frederick <fabf@skynet.be> - 2017-01-30 19:50 +0100
    Re: [PATCH 06/14] s390/qeth: use atomic_dec_not_zero() Ursula Braun <ubraun@linux.vnet.ibm.com> - 2017-01-31 12:30 +0100

#1570008 — [PATCH 06/14] s390/qeth: use atomic_dec_not_zero()

FromFabian Frederick <fabf@skynet.be>
Date2017-01-30 19:50 +0100
Subject[PATCH 06/14] s390/qeth: use atomic_dec_not_zero()
Message-ID<t5pbA-7p2-21@gated-at.bofh.it>
instead of atomic_add_unless(value, -1, 0)

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

diff --git a/drivers/s390/net/qeth_core_main.c b/drivers/s390/net/qeth_core_main.c
index 315d8a2..9595b90 100644
--- a/drivers/s390/net/qeth_core_main.c
+++ b/drivers/s390/net/qeth_core_main.c
@@ -3278,7 +3278,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);
 		}
 
 		if (!count) {
-- 
2.9.3

[toc] | [next] | [standalone]


#1570618

FromUrsula Braun <ubraun@linux.vnet.ibm.com>
Date2017-01-31 12:30 +0100
Message-ID<t5ENk-5s-11@gated-at.bofh.it>
In reply to#1570008
ACK - compile-tested successfully on s390.

On 01/30/2017 07:47 PM, Fabian Frederick wrote:
> instead of atomic_add_unless(value, -1, 0)
> 
> Signed-off-by: Fabian Frederick <fabf@skynet.be>
> ---
>  drivers/s390/net/qeth_core_main.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/s390/net/qeth_core_main.c b/drivers/s390/net/qeth_core_main.c
> index 315d8a2..9595b90 100644
> --- a/drivers/s390/net/qeth_core_main.c
> +++ b/drivers/s390/net/qeth_core_main.c
> @@ -3278,7 +3278,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);
>  		}
> 
>  		if (!count) {
> 

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web