qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: "Peter Maydell" <peter.maydell@linaro.org>,
	"Andreas Färber" <afaerber@suse.de>
Cc: Thomas Hanson <thomas.hanson@linaro.org>,
	QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH] qdev_try_create(): Assert that devices we put onto the system bus are SysBusDevices
Date: Wed, 16 Mar 2016 17:17:54 +0100	[thread overview]
Message-ID: <56E98732.3040203@redhat.com> (raw)
In-Reply-To: <CAFEAcA9jNj23OCS0d_5gKFuUcxSt3rdnT_8PZL6j0R1S1GxWhw@mail.gmail.com>



On 16/03/2016 15:25, Peter Maydell wrote:
> > Looks strange, but okay,
> You mean the way we use what looks like a cast macro and ignore
> the result? Yeah, I thought that was a little odd-looking. Happy
> to do it some other way if you have an alternative suggestion.

Perhaps this:

g_assert(object_dynamic_cast(OBJECT(dev), TYPE_SYS_BUS_DEVICE) != NULL);

or just add a (void) in front of the cast.

Paolo

      reply	other threads:[~2016-03-16 16:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-16 14:11 [Qemu-devel] [PATCH] qdev_try_create(): Assert that devices we put onto the system bus are SysBusDevices Peter Maydell
2016-03-16 14:14 ` Andreas Färber
2016-03-16 14:25   ` Peter Maydell
2016-03-16 16:17     ` Paolo Bonzini [this message]

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=56E98732.3040203@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=afaerber@suse.de \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=thomas.hanson@linaro.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).