summaryrefslogtreecommitdiff
path: root/drivers/s390
diff options
context:
space:
mode:
authorJulian Wiedmann <jwi@linux.ibm.com>2020-04-21 18:20:00 +0300
committerVasily Gorbik <gor@linux.ibm.com>2020-04-28 14:49:48 +0300
commit19d4c761c1d2354e6c1deb6e1d31c949028b92d6 (patch)
treeb94235f4b313cbd15542d6c7c3c7bc5942bcec74 /drivers/s390
parent9b7012dfc33db9c44add10ab58033fe167a15f13 (diff)
downloadlinux-19d4c761c1d2354e6c1deb6e1d31c949028b92d6.tar.xz
s390/qdio: remove always-true condition
buf_in_between() gets passed q->u.in.ack_start as 'bufnr' parameter. The ack_start always ranges between 0 and QDIO_MAX_BUFFERS_PER_Q - 1, so the subsequent check will always return true. Remove it. Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com> Reviewed-by: Benjamin Block <bblock@linux.ibm.com> Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Diffstat (limited to 'drivers/s390')
-rw-r--r--drivers/s390/cio/qdio_main.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/s390/cio/qdio_main.c b/drivers/s390/cio/qdio_main.c
index 68985871b6bf..4bd6dbfe8387 100644
--- a/drivers/s390/cio/qdio_main.c
+++ b/drivers/s390/cio/qdio_main.c
@@ -1450,8 +1450,7 @@ static inline int buf_in_between(int bufnr, int start, int count)
}
/* wrap-around case */
- if ((bufnr >= start && bufnr <= QDIO_MAX_BUFFERS_PER_Q) ||
- (bufnr < end))
+ if (bufnr >= start || bufnr < end)
return 1;
else
return 0;