s390/qdio: simplify overlap calculation on Input refill
authorJulian Wiedmann <jwi@linux.ibm.com>
Tue, 21 Apr 2020 08:22:01 +0000 (10:22 +0200)
committerVasily Gorbik <gor@linux.ibm.com>
Wed, 20 May 2020 08:22:50 +0000 (10:22 +0200)
commit9de6c08700ce9fab4589c1a44cec2a21812ab565
tree4588e8ccb219ebf855f9544cb0e9f32b3f16dd24
parentfee36576656f662dcfa4788eaeb033a4c5dd870b
s390/qdio: simplify overlap calculation on Input refill

Refilling the Input Queue requires additional checks, as the refilled
SBALs can overlap with the ACKs that qdio maintains on the queue.

This code path is way too complex, and does a whole bunch of wrap-around
checks that the modulo arithmetic in sub_buf() takes care of by itself.
So shrink down all that code into a few lines of equivalent
functionality.

Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
drivers/s390/cio/qdio_main.c