[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 9/9] hw/intc: QOM'ify omap_intc.c
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PATCH 9/9] hw/intc: QOM'ify omap_intc.c |
Date: |
Wed, 4 May 2016 15:48:15 +0100 |
On 30 March 2016 at 11:09, xiaoqiang zhao <address@hidden> 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 <address@hidden>
> +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 in Thread] |
Current Thread |
[Next in Thread] |
- Re: [Qemu-devel] [PATCH 9/9] hw/intc: QOM'ify omap_intc.c,
Peter Maydell <=