s390/cio: Use array indices instead of pointer arithmetic
authorBenjamin Block <bblock@linux.ibm.com>
Tue, 4 Apr 2023 18:33:59 +0000 (20:33 +0200)
committerAlexander Gordeev <agordeev@linux.ibm.com>
Fri, 3 Jan 2025 10:00:53 +0000 (11:00 +0100)
commitefd34db6e6813c6e573f34353ce4ad5e81f56dbd
treede3e724be73d9ca77524aceab3bd252a8ab4d321
parentbc3d4402a09cf072a56945e615fc587f8c1bec04
s390/cio: Use array indices instead of pointer arithmetic

ccw_device_get_ciw() already uses array indices to iterate over the vector
of CIWs, but then switches to pointer arithmetic when returning the one it
found. Change this to make it more consistent.

Signed-off-by: Benjamin Block <bblock@linux.ibm.com>
Reviewed-by: Vineeth Vijayan <vneethv@linux.ibm.com>
Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
drivers/s390/cio/device_ops.c