s390/qdio: simplify math in get_*_buffer_frontier()
authorJulian Wiedmann <jwi@linux.vnet.ibm.com>
Wed, 6 Dec 2017 07:53:33 +0000 (08:53 +0100)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Mon, 26 Mar 2018 14:12:25 +0000 (16:12 +0200)
commit152485bf76907ac7a2cc0a63b0822b23ef25da56
treee4ea6117a3466c3b0dd253be6a9b6d8796ab9a67
parentbcbd41da3b0a8a3e0f8457bb545a32f5ca3c81f5
s390/qdio: simplify math in get_*_buffer_frontier()

When determining the buffer count that get_buf_states() should
be queried for, 'count' is capped at 127 buffers.
So the check
q->first_to_check == (q->first_to_check + count) % 128
can be reduced to
count == 0

This helps to emphasize that get_buf_states() is really only
called with count > 0.

Signed-off-by: Julian Wiedmann <jwi@linux.vnet.ibm.com>
Reviewed-by: Benjamin Block <bblock@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
drivers/s390/cio/qdio_main.c