Skip to content

Commit

Permalink
s390/qdio: remove always-true condition
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-by: Benjamin Block <[email protected]>
Signed-off-by: Vasily Gorbik <[email protected]>
  • Loading branch information
julianwiedmann authored and Vasily Gorbik committed Apr 28, 2020
1 parent 9b7012d commit 19d4c76
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/s390/cio/qdio_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 19d4c76

Please sign in to comment.