qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Fam Zheng" <fam@euphon.net>, "Hannes Reinecke" <hare@suse.com>,
	"Dmitry Fleytman" <dmitry.fleytman@gmail.com>,
	qemu-block@nongnu.org, "Michael S. Tsirkin" <mst@redhat.com>,
	"Stefan Weil" <sw@weilnetz.de>,
	"Jason Wang" <jasowang@redhat.com>,
	"David Hildenbrand" <david@redhat.com>,
	"Li Qiang" <liq3ea@gmail.com>,
	"Qiuhao Li" <Qiuhao.Li@outlook.com>,
	"Peter Xu" <peterx@redhat.com>,
	"Philippe Mathieu-Daudé" <philmd@redhat.com>,
	"Alexander Bulekov" <alxndr@bu.edu>,
	"Gerd Hoffmann" <kraxel@redhat.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Sven Schnelle" <svens@stackframe.org>
Subject: [PATCH 4/5] dma: Let st*_pci_dma() propagate MemTxResult
Date: Sat, 18 Dec 2021 16:10:52 +0100	[thread overview]
Message-ID: <20211218151053.1545962-5-philmd@redhat.com> (raw)
In-Reply-To: <20211218151053.1545962-1-philmd@redhat.com>

st*_dma() returns a MemTxResult type. Do not discard
it, return it to the caller.

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 include/hw/pci/pci.h | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/include/hw/pci/pci.h b/include/hw/pci/pci.h
index 7a46c1fa226..c90cecc85c0 100644
--- a/include/hw/pci/pci.h
+++ b/include/hw/pci/pci.h
@@ -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);
-- 
2.33.1



  parent reply	other threads:[~2021-12-18 15:15 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-18 15:10 [PATCH 0/5] hw: Have DMA API take MemTxAttrs arg & propagate MemTxResult (part 4) Philippe Mathieu-Daudé
2021-12-18 15:10 ` [PATCH 1/5] hw/scsi/megasas: Use uint32_t for reply queue head/tail values Philippe Mathieu-Daudé
2021-12-21 23:13   ` Richard Henderson
2021-12-18 15:10 ` [PATCH 2/5] dma: Let st*_pci_dma() take MemTxAttrs argument Philippe Mathieu-Daudé
2021-12-21 23:14   ` Richard Henderson
2021-12-18 15:10 ` [PATCH 3/5] dma: Let ld*_pci_dma() " Philippe Mathieu-Daudé
2021-12-21 23:15   ` Richard Henderson
2021-12-18 15:10 ` Philippe Mathieu-Daudé [this message]
2021-12-21 23:16   ` [PATCH 4/5] dma: Let st*_pci_dma() propagate MemTxResult Richard Henderson
2021-12-18 15:10 ` [PATCH 5/5] dma: Let ld*_pci_dma() " Philippe Mathieu-Daudé
2021-12-21 23:18   ` Richard Henderson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211218151053.1545962-5-philmd@redhat.com \
    --to=philmd@redhat.com \
    --cc=Qiuhao.Li@outlook.com \
    --cc=alxndr@bu.edu \
    --cc=david@redhat.com \
    --cc=dmitry.fleytman@gmail.com \
    --cc=fam@euphon.net \
    --cc=hare@suse.com \
    --cc=jasowang@redhat.com \
    --cc=kraxel@redhat.com \
    --cc=liq3ea@gmail.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peterx@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=svens@stackframe.org \
    --cc=sw@weilnetz.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).