s390/qdio: simplify SBAL range calculation
authorJulian Wiedmann <jwi@linux.ibm.com>
Thu, 28 Mar 2019 09:43:46 +0000 (10:43 +0100)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Wed, 10 Apr 2019 15:47:25 +0000 (17:47 +0200)
commit65e4f776385ac5cab021ad8d992e851375305906
tree566a4e829338583e5b3109bf9670af4f5e472958
parentb39544c6e02fdf86c394a9367b10e707b800f4d7
s390/qdio: simplify SBAL range calculation

When passing a range of ready-to-process SBALs to the upper-layer
driver, use the available 'count' instead of calculating the distance
between the first_to_check and first_to_kick cursors.

This simplifies the logic of the queue-scan path, and opens up the
possibility of scanning all 128 SBALs in one go (as determining the
reported count no longer requires wrap-around safe arithmetic on the
queue's cursors).

Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
Reviewed-by: Jens Remus <jremus@linux.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
drivers/s390/cio/qdio_main.c