Skip to content

Commit efd34db

Browse files
Benjamin-BlockAlexander Gordeev
authored andcommitted
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>
1 parent bc3d440 commit efd34db

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/s390/cio/device_ops.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,7 @@ struct ciw *ccw_device_get_ciw(struct ccw_device *cdev, __u32 ct)
445445
return NULL;
446446
for (ciw_cnt = 0; ciw_cnt < MAX_CIWS; ciw_cnt++)
447447
if (cdev->private->dma_area->senseid.ciw[ciw_cnt].ct == ct)
448-
return cdev->private->dma_area->senseid.ciw + ciw_cnt;
448+
return &cdev->private->dma_area->senseid.ciw[ciw_cnt];
449449
return NULL;
450450
}
451451

0 commit comments

Comments
 (0)