s390/qdio: remove unneeded sanity check in qdio_do_sqbs()
authorJulian Wiedmann <jwi@linux.ibm.com>
Wed, 24 Nov 2021 09:16:53 +0000 (10:16 +0100)
committerHeiko Carstens <hca@linux.ibm.com>
Mon, 6 Dec 2021 13:42:26 +0000 (14:42 +0100)
All callers of set_buf_states() are already making sure that 'count'
is not 0. So don't check it an additional time.

Note that our own code also doesn't _require_ the count to be sane
(ie. we can't overrun an array or similar). So worst case HW would
simply reject the SQBS operation and report an error.

Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
Reviewed-by: Benjamin Block <bblock@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
drivers/s390/cio/qdio_main.c

index 82c2383b0740faccb53ff201b3bf106d180b42e6..9cde55730b65a733b5d1cb9977c83750392e6312 100644 (file)
@@ -170,8 +170,6 @@ static int qdio_do_sqbs(struct qdio_q *q, unsigned char state, int start,
        int tmp_count = count, tmp_start = start;
        int nr = q->nr;
 
-       if (!count)
-               return 0;
        qperf_inc(q, sqbs);
 
        if (!q->is_input_q)