diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2013-09-16 06:59:50 +0200 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2013-10-24 17:16:50 +0200 |
commit | eddf0d5b31dda679a98f3e5615a510b8f065cb5d (patch) | |
tree | 6edc23c51511ce72a655a477603a3378d5393fee /drivers/s390 | |
parent | 1ffa11abfe90320abe82bf5bb7eeca154e333058 (diff) |
s390/qdio: fix atomic_sub() misusage
get_inbound_buffer_frontier() makes use of the return value of atomic_sub()
which shouldn't work, since atomic_sub() is supposed to return void.
This only works on s390 because atomic_sub() gets mapped to atomic_sub_return()
with a define without changing it's return value to void.
So use atomic_sub_return() instead of atomic_sub() in qeth code before fixing
atomic ops.
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390')
-rw-r--r-- | drivers/s390/cio/qdio_main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/s390/cio/qdio_main.c b/drivers/s390/cio/qdio_main.c index bbd3e511c77..3e602e8affa 100644 --- a/drivers/s390/cio/qdio_main.c +++ b/drivers/s390/cio/qdio_main.c @@ -528,7 +528,7 @@ static int get_inbound_buffer_frontier(struct qdio_q *q) case SLSB_P_INPUT_PRIMED: inbound_primed(q, count); q->first_to_check = add_buf(q->first_to_check, count); - if (atomic_sub(count, &q->nr_buf_used) == 0) + if (atomic_sub_return(count, &q->nr_buf_used) == 0) qperf_inc(q, inbound_queue_full); if (q->irq_ptr->perf_stat_enabled) account_sbals(q, count); |