> - sg_dma_address(sg) = (dma_addr_t)virt_to_phys(va); > + sg_dma_address(sg) = (dma_addr_t)(virt_to_phys(va) - PFN_PHYS(dev->dma_pfn_offset)); Needs a line break instead of the overly long line. Otherwise this looks fine to me.