]> xenbits.xensource.com Git - qemu-xen.git/commitdiff
pci: Let st*_pci_dma() propagate MemTxResult
authorPhilippe Mathieu-Daudé <philmd@redhat.com>
Fri, 17 Dec 2021 22:47:30 +0000 (23:47 +0100)
committerPhilippe Mathieu-Daudé <philmd@redhat.com>
Fri, 31 Dec 2021 00:05:27 +0000 (01:05 +0100)
st*_dma() returns a MemTxResult type. Do not discard
it, return it to the caller.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20211223115554.3155328-23-philmd@redhat.com>

include/hw/pci/pci.h

index 7a46c1fa226622f141e228a37304f67766953862..c90cecc85c071c6c32f909265bef15974fe82083 100644 (file)
@@ -859,12 +859,12 @@ static inline MemTxResult pci_dma_write(PCIDevice *dev, dma_addr_t addr,
         ld##_l##_dma(pci_get_address_space(dev), addr, &val, attrs); \
         return val; \
     }                                                                   \
-    static inline void st##_s##_pci_dma(PCIDevice *dev, \
-                                        dma_addr_t addr, \
-                                        uint##_bits##_t val, \
-                                        MemTxAttrs attrs) \
+    static inline MemTxResult st##_s##_pci_dma(PCIDevice *dev, \
+                                               dma_addr_t addr, \
+                                               uint##_bits##_t val, \
+                                               MemTxAttrs attrs) \
     { \
-        st##_s##_dma(pci_get_address_space(dev), addr, val, attrs); \
+        return st##_s##_dma(pci_get_address_space(dev), addr, val, attrs); \
     }
 
 PCI_DMA_DEFINE_LDST(ub, b, 8);