scatterlist: use sg_phys()
Coccinelle cleanup to replace open coded sg to physical address translations. This is in preparation for introducing scatterlists that reference __pfn_t. // sg_phys.cocci: convert usage page_to_phys(sg_page(sg)) to sg_phys(sg) // usage: make coccicheck COCCI=sg_phys.cocci MODE=patch virtual patch @@ struct scatterlist *sg; @@ - page_to_phys(sg_page(sg)) + sg->offset + sg_phys(sg) @@ struct scatterlist *sg; @@ - page_to_phys(sg_page(sg)) + sg_phys(sg) & PAGE_MASK Signed-off-by:Dan Williams <dan.j.williams@intel.com> Signed-off-by:
Jens Axboe <axboe@fb.com>
Showing
- arch/arm/mm/dma-mapping.c 1 addition, 1 deletionarch/arm/mm/dma-mapping.c
- arch/microblaze/kernel/dma.c 1 addition, 2 deletionsarch/microblaze/kernel/dma.c
- drivers/iommu/intel-iommu.c 2 additions, 2 deletionsdrivers/iommu/intel-iommu.c
- drivers/iommu/iommu.c 1 addition, 1 deletiondrivers/iommu/iommu.c
- drivers/staging/android/ion/ion_chunk_heap.c 2 additions, 2 deletionsdrivers/staging/android/ion/ion_chunk_heap.c
Please register or sign in to comment