All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: "Philippe Mathieu-Daudé" <f4bug@amsat.org>
Cc: qemu-devel@nongnu.org, Mao Zhongyi <maozy.fnst@cn.fujitsu.com>,
	jiri@resnulli.us, jasowang@redhat.com,
	"Michael S. Tsirkin" <mst@redhat.com>,
	Marcel Apfelbaum <marcel@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v5 1/4] net/rocker: Remove the dead error handling
Date: Wed, 24 May 2017 07:35:04 +0200	[thread overview]
Message-ID: <87r2zeu8af.fsf@dusky.pond.sub.org> (raw)
In-Reply-To: <4011bf08-8686-f2ae-474e-004aa603cc0e@amsat.org> ("Philippe Mathieu-Daudé"'s message of "Wed, 24 May 2017 01:43:04 -0300")

Philippe Mathieu-Daudé <f4bug@amsat.org> writes:

> Hi Markus,
>
> On 05/23/2017 06:27 AM, Markus Armbruster wrote:
> [...]
>> There's one more cleanup opportunity:
>>
> [...]
>>>      if (pci_dma_read(dev, le64_to_cpu(info->desc.buf_addr), info->buf, size)) {
>>>          return NULL;
>>>      }
>>
>> None of the pci_dma_read() calls outside rocker check the return value.
>> Just as well, because it always returns 0.  Please clean this up in a
>> separate followup patch.
>
> It may be the correct way to do it but this sounds like we are missing
> something somewhere... pci_dma_read() calls pci_dma_rw() which always
> returns 0. Why not let it returns void? It is inlined and never used
> by address. Else we should document why returning 0 is correct, and
> what is the reason to not use a void prototype.
>
> pci_dma_rw() calls dma_memory_rw() which does return a boolean value,
> false on success (MEMTX_OK) and true on error
> (MEMTX_ERROR/DECODE_ERROR)

PCI question.  Michael, Marcel?

  reply	other threads:[~2017-05-24  5:35 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-23  4:04 [Qemu-devel] [PATCH v5 0/4] Convert to realize and fix error handling Mao Zhongyi
2017-05-23  4:04 ` [Qemu-devel] [PATCH v5 1/4] net/rocker: Remove the dead " Mao Zhongyi
2017-05-23  9:27   ` Markus Armbruster
2017-05-23 10:09     ` Mao Zhongyi
2017-05-23 10:52       ` Markus Armbruster
2017-05-24  4:43     ` Philippe Mathieu-Daudé
2017-05-24  5:35       ` Markus Armbruster [this message]
2017-05-24 12:01         ` Marcel Apfelbaum
2017-05-25  1:02           ` David Gibson
2017-05-23  4:04 ` [Qemu-devel] [PATCH v5 2/4] net/rocker: Plug memory leak in pci_rocker_init() Mao Zhongyi
2017-05-24  4:48   ` Philippe Mathieu-Daudé
2017-05-23  4:04 ` [Qemu-devel] [PATCH v5 3/4] net/rocker: Convert to realize() Mao Zhongyi
2017-05-24  4:48   ` Philippe Mathieu-Daudé
2017-05-23  4:04 ` [Qemu-devel] [PATCH v5 4/4] net/rocker: Fix the unusual macro name Mao Zhongyi
2017-05-23  9:16   ` Markus Armbruster
2017-05-24  4:48   ` Philippe Mathieu-Daudé
2017-07-26  3:45 ` [Qemu-devel] [PATCH v5 0/4] Convert to realize and fix error handling Mao Zhongyi
2017-07-26  4:09   ` Jason Wang
2017-07-26  5:11     ` Mao Zhongyi

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=87r2zeu8af.fsf@dusky.pond.sub.org \
    --to=armbru@redhat.com \
    --cc=f4bug@amsat.org \
    --cc=jasowang@redhat.com \
    --cc=jiri@resnulli.us \
    --cc=maozy.fnst@cn.fujitsu.com \
    --cc=marcel@redhat.com \
    --cc=mst@redhat.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.