Skip to contentSkip to conversation

arch: kernel: Replace sg++ with sg = sg_next(sg)

PATCH New Xu Wang 1 participant 1 message Jun 3, 2020 Alpha port

lore
Share & tools
lore

Xu Wang

author
#0 lore raw

PATCH 1/1 arch: kernel: Replace sg++ with sg = sg_next(sg)

Replace sg++ with sg = sg_next(sg).

---
 arch/alpha/kernel/pci_iommu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/alpha/kernel/pci_iommu.c +1 -1
index 7f1925a32c99..81037907268d 100644
@@ -638,7 +638,7 @@ sg_fill(struct device *dev, struct scatterlist *leader, struct scatterlist *end,
 
 		while (sg+1 < end && (int) sg[1].dma_address == -1) {
 			size += sg[1].length;
-			sg++;
+			sg = sg_next(sg);
 		}
 
 		npages = iommu_num_pages(paddr, size, PAGE_SIZE);
Signature · 1 line
2.17.1