From: "Michael S. Tsirkin" <mst@redhat.com>
To: Klaus Jensen <its@irrelevant.dk>
Cc: "Kevin Wolf" <kwolf@redhat.com>,
qemu-block@nongnu.org, "Klaus Jensen" <k.jensen@samsung.com>,
qemu-devel@nongnu.org, "Max Reitz" <mreitz@redhat.com>,
"Keith Busch" <kbusch@kernel.org>,
"Maxim Levitsky" <mlevitsk@redhat.com>,
"Philippe Mathieu-Daudé" <philmd@redhat.com>
Subject: Re: [PATCH 1/2] pci: pass along the return value of dma_memory_rw
Date: Wed, 22 Jul 2020 07:48:51 -0400 [thread overview]
Message-ID: <20200722074834-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <20200629202053.1223342-2-its@irrelevant.dk>
On Mon, Jun 29, 2020 at 10:20:52PM +0200, Klaus Jensen wrote:
> From: Klaus Jensen <k.jensen@samsung.com>
>
> Some devices might want to know the return value of dma_memory_rw, so
> pass it along instead of ignoring it.
>
> There are no existing users of the return value, so this patch should be
> safe.
>
> Signed-off-by: Klaus Jensen <k.jensen@samsung.com>
> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
> Acked-by: Keith Busch <kbusch@kernel.org>
Please feel free to merge this with the patch that uses the
return value.
> ---
> 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 a4e9c3341615..2347dc36bfb5 100644
> --- a/include/hw/pci/pci.h
> +++ b/include/hw/pci/pci.h
> @@ -786,8 +786,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.27.0
>
>
next prev parent reply other threads:[~2020-07-22 11:49 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-29 20:20 [PATCH 0/2] hw/block/nvme: handle transient dma errors Klaus Jensen
2020-06-29 20:20 ` [PATCH 1/2] pci: pass along the return value of dma_memory_rw Klaus Jensen
2020-07-01 12:18 ` Michael S. Tsirkin
2020-07-22 11:48 ` Michael S. Tsirkin [this message]
2020-07-27 9:20 ` Klaus Jensen
2020-06-29 20:20 ` [PATCH 2/2] hw/block/nvme: handle dma errors Klaus Jensen
2020-06-29 21:07 ` [PATCH 0/2] hw/block/nvme: handle transient " no-reply
2020-06-29 21:34 ` Klaus Jensen
2020-07-01 12:58 ` Philippe Mathieu-Daudé
2020-07-03 7:50 ` Kevin Wolf
2020-07-03 7:55 ` Philippe Mathieu-Daudé
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=20200722074834-mutt-send-email-mst@kernel.org \
--to=mst@redhat.com \
--cc=its@irrelevant.dk \
--cc=k.jensen@samsung.com \
--cc=kbusch@kernel.org \
--cc=kwolf@redhat.com \
--cc=mlevitsk@redhat.com \
--cc=mreitz@redhat.com \
--cc=philmd@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
/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).