diff options
Diffstat (limited to 'drivers/scsi/aic94xx/aic94xx_task.c')
-rw-r--r-- | drivers/scsi/aic94xx/aic94xx_task.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/scsi/aic94xx/aic94xx_task.c b/drivers/scsi/aic94xx/aic94xx_task.c index f2b23e01401a..ee0a98bffcd4 100644 --- a/drivers/scsi/aic94xx/aic94xx_task.c +++ b/drivers/scsi/aic94xx/aic94xx_task.c | |||
@@ -94,7 +94,7 @@ static inline int asd_map_scatterlist(struct sas_task *task, | |||
94 | res = -ENOMEM; | 94 | res = -ENOMEM; |
95 | goto err_unmap; | 95 | goto err_unmap; |
96 | } | 96 | } |
97 | for (sc = task->scatter, i = 0; i < num_sg; i++, sc++) { | 97 | for_each_sg(task->scatter, sc, num_sg, i) { |
98 | struct sg_el *sg = | 98 | struct sg_el *sg = |
99 | &((struct sg_el *)ascb->sg_arr->vaddr)[i]; | 99 | &((struct sg_el *)ascb->sg_arr->vaddr)[i]; |
100 | sg->bus_addr = cpu_to_le64((u64)sg_dma_address(sc)); | 100 | sg->bus_addr = cpu_to_le64((u64)sg_dma_address(sc)); |
@@ -103,7 +103,7 @@ static inline int asd_map_scatterlist(struct sas_task *task, | |||
103 | sg->flags |= ASD_SG_EL_LIST_EOL; | 103 | sg->flags |= ASD_SG_EL_LIST_EOL; |
104 | } | 104 | } |
105 | 105 | ||
106 | for (sc = task->scatter, i = 0; i < 2; i++, sc++) { | 106 | for_each_sg(task->scatter, sc, 2, i) { |
107 | sg_arr[i].bus_addr = | 107 | sg_arr[i].bus_addr = |
108 | cpu_to_le64((u64)sg_dma_address(sc)); | 108 | cpu_to_le64((u64)sg_dma_address(sc)); |
109 | sg_arr[i].size = cpu_to_le32((u32)sg_dma_len(sc)); | 109 | sg_arr[i].size = cpu_to_le32((u32)sg_dma_len(sc)); |
@@ -115,7 +115,7 @@ static inline int asd_map_scatterlist(struct sas_task *task, | |||
115 | sg_arr[2].bus_addr=cpu_to_le64((u64)ascb->sg_arr->dma_handle); | 115 | sg_arr[2].bus_addr=cpu_to_le64((u64)ascb->sg_arr->dma_handle); |
116 | } else { | 116 | } else { |
117 | int i; | 117 | int i; |
118 | for (sc = task->scatter, i = 0; i < num_sg; i++, sc++) { | 118 | for_each_sg(task->scatter, sc, num_sg, i) { |
119 | sg_arr[i].bus_addr = | 119 | sg_arr[i].bus_addr = |
120 | cpu_to_le64((u64)sg_dma_address(sc)); | 120 | cpu_to_le64((u64)sg_dma_address(sc)); |
121 | sg_arr[i].size = cpu_to_le32((u32)sg_dma_len(sc)); | 121 | sg_arr[i].size = cpu_to_le32((u32)sg_dma_len(sc)); |