From efd34db6e6813c6e573f34353ce4ad5e81f56dbd Mon Sep 17 00:00:00 2001 From: Benjamin Block Date: Tue, 4 Apr 2023 20:33:59 +0200 Subject: [PATCH] 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 Reviewed-by: Vineeth Vijayan Signed-off-by: Alexander Gordeev --- drivers/s390/cio/device_ops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/s390/cio/device_ops.c b/drivers/s390/cio/device_ops.c index acd6790dba4dd..61c07b4a0fe89 100644 --- a/drivers/s390/cio/device_ops.c +++ b/drivers/s390/cio/device_ops.c @@ -445,7 +445,7 @@ struct ciw *ccw_device_get_ciw(struct ccw_device *cdev, __u32 ct) return NULL; for (ciw_cnt = 0; ciw_cnt < MAX_CIWS; ciw_cnt++) if (cdev->private->dma_area->senseid.ciw[ciw_cnt].ct == ct) - return cdev->private->dma_area->senseid.ciw + ciw_cnt; + return &cdev->private->dma_area->senseid.ciw[ciw_cnt]; return NULL; } -- 2.39.5