dma: Let ld*_dma() propagate MemTxResult

dma_memory_read() 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>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20211223115554.3155328-19-philmd@redhat.com>
This commit is contained in:
Philippe Mathieu-Daudé 2021-12-17 22:31:11 +01:00
parent 24aed6bcb6
commit cd1db8df74
5 changed files with 29 additions and 23 deletions

View file

@ -854,8 +854,10 @@ static inline MemTxResult pci_dma_write(PCIDevice *dev, dma_addr_t addr,
static inline uint##_bits##_t ld##_l##_pci_dma(PCIDevice *dev, \
dma_addr_t addr) \
{ \
return ld##_l##_dma(pci_get_address_space(dev), addr, \
MEMTXATTRS_UNSPECIFIED); \
uint##_bits##_t val; \
ld##_l##_dma(pci_get_address_space(dev), addr, &val, \
MEMTXATTRS_UNSPECIFIED); \
return val; \
} \
static inline void st##_s##_pci_dma(PCIDevice *dev, \
dma_addr_t addr, uint##_bits##_t val) \