提交 73063ec5 编写于 作者: C Christoph Hellwig 提交者: Jason Gunthorpe

PCI/P2PDMA: Cleanup __pci_p2pdma_map_sg a bit

Remove the pointless paddr variable that was only used once.

Link: https://lore.kernel.org/r/20201106181941.1878556-10-hch@lst.deSigned-off-by: NChristoph Hellwig <hch@lst.de>
Reviewed-by: NLogan Gunthorpe <logang@deltatee.com>
Acked-by: NBjorn Helgaas <bhelgaas@google.com>
Signed-off-by: NJason Gunthorpe <jgg@nvidia.com>
上级 4d34d52c
......@@ -825,13 +825,10 @@ static int __pci_p2pdma_map_sg(struct pci_p2pdma_pagemap *p2p_pgmap,
struct device *dev, struct scatterlist *sg, int nents)
{
struct scatterlist *s;
phys_addr_t paddr;
int i;
for_each_sg(sg, s, nents, i) {
paddr = sg_phys(s);
s->dma_address = paddr - p2p_pgmap->bus_offset;
s->dma_address = sg_phys(s) - p2p_pgmap->bus_offset;
sg_dma_len(s) = s->length;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册