mirror of
https://github.com/torvalds/linux.git
synced 2024-11-15 00:21:59 +00:00
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>
This commit is contained in:
parent
4d34d52c25
commit
73063ec58c
@ -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 device *dev, struct scatterlist *sg, int nents)
|
||||||
{
|
{
|
||||||
struct scatterlist *s;
|
struct scatterlist *s;
|
||||||
phys_addr_t paddr;
|
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for_each_sg(sg, s, nents, i) {
|
for_each_sg(sg, s, nents, i) {
|
||||||
paddr = sg_phys(s);
|
s->dma_address = sg_phys(s) - p2p_pgmap->bus_offset;
|
||||||
|
|
||||||
s->dma_address = paddr - p2p_pgmap->bus_offset;
|
|
||||||
sg_dma_len(s) = s->length;
|
sg_dma_len(s) = s->length;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user