All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] pci_dma_rw: return correct value instead of 0
@ 2020-07-29 22:17 Emanuele Giuseppe Esposito
  2020-07-30  7:41 ` Stefano Garzarella
  2020-07-30  8:48 ` Peter Maydell
  0 siblings, 2 replies; 8+ messages in thread
From: Emanuele Giuseppe Esposito @ 2020-07-29 22:17 UTC (permalink / raw)
  To: qemu-devel; +Cc: Emanuele Giuseppe Esposito, Michael S . Tsirkin

pci_dma_rw currently always returns 0, regardless
of the result of dma_memory_rw. Adjusted to return
the correct value.

Signed-off-by: Emanuele Giuseppe Esposito <e.emanuelegiuseppe@gmail.com>
---
 include/hw/pci/pci.h | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/include/hw/pci/pci.h b/include/hw/pci/pci.h
index c1bf7d5356..41c4ab5932 100644
--- a/include/hw/pci/pci.h
+++ b/include/hw/pci/pci.h
@@ -787,8 +787,7 @@ static inline AddressSpace *pci_get_address_space(PCIDevice *dev)
 static inline int pci_dma_rw(PCIDevice *dev, dma_addr_t addr,
                              void *buf, dma_addr_t len, DMADirection dir)
 {
-    dma_memory_rw(pci_get_address_space(dev), addr, buf, len, dir);
-    return 0;
+    return dma_memory_rw(pci_get_address_space(dev), addr, buf, len, dir);
 }
 
 static inline int pci_dma_read(PCIDevice *dev, dma_addr_t addr,
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2020-08-17  7:05 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-29 22:17 [PATCH] pci_dma_rw: return correct value instead of 0 Emanuele Giuseppe Esposito
2020-07-30  7:41 ` Stefano Garzarella
2020-07-30  8:50   ` Emanuele Giuseppe Esposito
2020-07-30 10:41     ` Stefano Garzarella
2020-07-30  8:58   ` Peter Maydell
2020-07-30 10:48     ` Stefano Garzarella
2020-07-30  8:48 ` Peter Maydell
2020-08-17  7:04   ` Klaus Jensen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.