From: Peter Maydell <peter.maydell@linaro.org>
To: xiaoqiang zhao <zxq_yx_007@163.com>
Cc: QEMU Developers <qemu-devel@nongnu.org>,
"Edgar E. Iglesias" <edgar.iglesias@gmail.com>,
Igor Mitsyanko <i.mitsyanko@gmail.com>,
Fabien Chouteau <chouteau@adacore.com>,
Peter Chubb <peter.chubb@nicta.com.au>,
Michael Walle <michael@walle.cc>
Subject: Re: [Qemu-devel] [PATCH 9/9] hw/intc: QOM'ify omap_intc.c
Date: Wed, 4 May 2016 15:48:15 +0100 [thread overview]
Message-ID: <CAFEAcA_WQaWWZ6TW5NpcxxdQwtKacDwU2vF-QKZW6EG01wBqZQ@mail.gmail.com> (raw)
In-Reply-To: <1459332586-13693-4-git-send-email-zxq_yx_007@163.com>
On 30 March 2016 at 11:09, xiaoqiang zhao <zxq_yx_007@163.com> wrote:
> * Split the old SysBus init into an instance_init and a
> DeviceClass::realize function
> * Drop the old SysBus init function and use instance_init
>
> Signed-off-by: xiaoqiang zhao <zxq_yx_007@163.com>
> +static void omap_intc_realize(DeviceState *dev, Error **errp)
> +{
> + struct omap_intr_handler_s *s = OMAP_INTC(dev);
> +
> + if (!s->iclk) {
> + error_report("omap-intc: clk not connected");
> + }
In a realize function we have an Error**, so we should
use error_setg() to return this error, rather than
calling error_report().
> +static void omap2_intc_realize(DeviceState *dev, Error **errp)
> +{
> + struct omap_intr_handler_s *s = OMAP_INTC(dev);
> +
> + if (!s->iclk) {
> + error_report("omap2-intc: iclk not connected");
> + return;
> + }
> + if (!s->fclk) {
> + error_report("omap2-intc: fclk not connected");
> + return;
> + }
> }
Similarly here.
thanks
-- PMM
prev parent reply other threads:[~2016-05-04 14:49 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-30 10:09 [Qemu-devel] [PATCH 6/9] hw/intc: QOM'ify pl190.c xiaoqiang zhao
2016-03-30 10:09 ` [Qemu-devel] [PATCH 7/9] hw/intc: QOM'ify slavio_intctl.c xiaoqiang zhao
2016-03-30 10:09 ` [Qemu-devel] [PATCH 8/9] hw/intc: QOM'ify grlib_irqmp.c xiaoqiang zhao
2016-03-30 10:09 ` [Qemu-devel] [PATCH 9/9] hw/intc: QOM'ify omap_intc.c xiaoqiang zhao
2016-05-04 14:48 ` Peter Maydell [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=CAFEAcA_WQaWWZ6TW5NpcxxdQwtKacDwU2vF-QKZW6EG01wBqZQ@mail.gmail.com \
--to=peter.maydell@linaro.org \
--cc=chouteau@adacore.com \
--cc=edgar.iglesias@gmail.com \
--cc=i.mitsyanko@gmail.com \
--cc=michael@walle.cc \
--cc=peter.chubb@nicta.com.au \
--cc=qemu-devel@nongnu.org \
--cc=zxq_yx_007@163.com \
/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).