diff options
author | Christoph Hellwig <hch@lst.de> | 2020-11-06 19:19:40 +0100 |
---|---|---|
committer | Jason Gunthorpe <jgg@nvidia.com> | 2020-11-17 20:22:07 +0100 |
commit | 73063ec58c848e0eb9f888847df011a85b34e5a2 (patch) | |
tree | 7726ad20647c64e1ca958ff3295f8beb9ccb1446 /drivers/pci | |
parent | PCI/P2PDMA: Remove the DMA_VIRT_OPS hacks (diff) | |
download | linux-73063ec58c848e0eb9f888847df011a85b34e5a2.tar.xz linux-73063ec58c848e0eb9f888847df011a85b34e5a2.zip |
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.de
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Logan Gunthorpe <logang@deltatee.com>
Acked-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Diffstat (limited to 'drivers/pci')
-rw-r--r-- | drivers/pci/p2pdma.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/pci/p2pdma.c b/drivers/pci/p2pdma.c index b07018af5387..afd792cc2728 100644 --- a/drivers/pci/p2pdma.c +++ b/drivers/pci/p2pdma.c @@ -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; } |