From: Christoph Hellwig Date: Fri, 6 Nov 2020 18:19:40 +0000 (+0100) Subject: PCI/P2PDMA: Cleanup __pci_p2pdma_map_sg a bit X-Git-Tag: io_uring-5.11-2020-12-23~17^2~70 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=73063ec58c848e0eb9f888847df011a85b34e5a2;p=linux-block.git 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 Reviewed-by: Logan Gunthorpe Acked-by: Bjorn Helgaas Signed-off-by: Jason Gunthorpe --- 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; }