mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-15 13:15:57 +00:00
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>
This commit is contained in:
parent
bc3d4402a0
commit
efd34db6e6
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user