diff options
author | Philippe Mathieu-Daudé <philmd@redhat.com> | 2021-12-17 23:49:30 +0100 |
---|---|---|
committer | Philippe Mathieu-Daudé <philmd@redhat.com> | 2021-12-31 01:05:27 +0100 |
commit | 4a63054bce23982b99f4d3c65528e47e614086b2 (patch) | |
tree | a005491be410d7391e15f766680fb28d7acc4188 /include/hw/pci | |
parent | 6bebb270731758fae3114b7d24c2b12b7c325cc5 (diff) | |
download | qemu-4a63054bce23982b99f4d3c65528e47e614086b2.zip qemu-4a63054bce23982b99f4d3c65528e47e614086b2.tar.gz qemu-4a63054bce23982b99f4d3c65528e47e614086b2.tar.bz2 |
pci: Let ld*_pci_dma() propagate MemTxResult
ld*_dma() returns a MemTxResult type. Do not discard
it, return it to the caller.
Update the few callers.
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20211223115554.3155328-24-philmd@redhat.com>
Diffstat (limited to 'include/hw/pci')
-rw-r--r-- | include/hw/pci/pci.h | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/include/hw/pci/pci.h b/include/hw/pci/pci.h index c90cecc..5b36334 100644 --- a/include/hw/pci/pci.h +++ b/include/hw/pci/pci.h @@ -850,15 +850,14 @@ static inline MemTxResult pci_dma_write(PCIDevice *dev, dma_addr_t addr, DMA_DIRECTION_FROM_DEVICE, MEMTXATTRS_UNSPECIFIED); } -#define PCI_DMA_DEFINE_LDST(_l, _s, _bits) \ - static inline uint##_bits##_t ld##_l##_pci_dma(PCIDevice *dev, \ - dma_addr_t addr, \ - MemTxAttrs attrs) \ - { \ - uint##_bits##_t val; \ - ld##_l##_dma(pci_get_address_space(dev), addr, &val, attrs); \ - return val; \ - } \ +#define PCI_DMA_DEFINE_LDST(_l, _s, _bits) \ + static inline MemTxResult ld##_l##_pci_dma(PCIDevice *dev, \ + dma_addr_t addr, \ + uint##_bits##_t *val, \ + MemTxAttrs attrs) \ + { \ + return ld##_l##_dma(pci_get_address_space(dev), addr, val, attrs); \ + } \ static inline MemTxResult st##_s##_pci_dma(PCIDevice *dev, \ dma_addr_t addr, \ uint##_bits##_t val, \ |