qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eduardo Habkost <ehabkost@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: Eduardo Otubo <otubo@redhat.com>,
	qemu-devel@nongnu.org, qemu-trivial@nongnu.org,
	Michael Tokarev <mjt@tls.msk.ru>, Alexander Graf <agraf@suse.de>,
	Markus Armbruster <armbru@redhat.com>
Subject: Re: [Qemu-devel] [PATCHv2] dma/i82374: avoid double creation of i82374 device
Date: Tue, 3 Oct 2017 10:37:05 -0300	[thread overview]
Message-ID: <20171003133705.GH17385@localhost.localdomain> (raw)
In-Reply-To: <9c365c30-8b63-f762-aa56-5b952b491aec@redhat.com>

On Mon, Oct 02, 2017 at 02:50:07PM +0200, Paolo Bonzini wrote:
> On 29/09/2017 21:31, Eduardo Habkost wrote:
> >> -void DMA_init(ISABus *bus, int high_page_enable)
> >> +void DMA_init(ISABus *bus, int high_page_enable, Error **errp)
> > 
> > If you make the function return a boolean to indicate success (in
> > addition to setting *errp), you avoid the need for a local_err
> > variable on the caller.
> 
> I think in this case, rather than a bool, it would be better to return 0
> or -EBUSY.  A check for "< 0" would be more self-explanatory in the caller.

I'm OK with that, too.

We really need to document the available and preferred error
reporting styles somewhere (probably on qapi/error.h).  We
discussed that a lot recently[1], but the conclusions were not
documented anywhere.

[1] https://www.mail-archive.com/qemu-devel@nongnu.org/msg461702.html

-- 
Eduardo

  reply	other threads:[~2017-10-03 13:37 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-29 14:05 [Qemu-devel] [PATCHv2] dma/i82374: avoid double creation of i82374 device Eduardo Otubo
2017-09-29 14:11 ` no-reply
2017-09-29 14:12 ` no-reply
2017-09-29 19:31 ` Eduardo Habkost
2017-10-02 12:50   ` Paolo Bonzini
2017-10-03 13:37     ` Eduardo Habkost [this message]
2017-10-04  4:50       ` Markus Armbruster

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=20171003133705.GH17385@localhost.localdomain \
    --to=ehabkost@redhat.com \
    --cc=agraf@suse.de \
    --cc=armbru@redhat.com \
    --cc=mjt@tls.msk.ru \
    --cc=otubo@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@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).