[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v4 3/4] hw/intc/exynos4210: replace 'qemu_split_irq' in combi
From: |
Zongyuan Li |
Subject: |
Re: [PATCH v4 3/4] hw/intc/exynos4210: replace 'qemu_split_irq' in combiner and gic |
Date: |
Fri, 25 Mar 2022 10:59:52 +0800 |
>
> > diff --git a/include/hw/core/split-irq.h b/include/hw/core/split-irq.h
> > index ff8852f407..eb485dd7a6 100644
> > --- a/include/hw/core/split-irq.h
> > +++ b/include/hw/core/split-irq.h
> > @@ -42,9 +42,6 @@
> >
> > #define MAX_SPLIT_LINES 16
> >
> > -
> > -OBJECT_DECLARE_SIMPLE_TYPE(SplitIRQ, SPLIT_IRQ)
> > -
> > struct SplitIRQ {
> > DeviceState parent_obj;
> >
> > @@ -52,4 +49,6 @@ struct SplitIRQ {
> > uint16_t num_lines;
> > };
> >
> > +OBJECT_DECLARE_SIMPLE_TYPE(SplitIRQ, SPLIT_IRQ)
> > +
>
> What's this change for ?
>
> thanks
> -- PMM
Some language sever like `clangd-13` will complain about the following
code if we use
`typedef` before struct definition:
> @@ -79,11 +80,11 @@
> #define EXYNOS4210_NUM_DMA 3
>
> typedef struct Exynos4210Irq {
> - qemu_irq int_combiner_irq[EXYNOS4210_MAX_INT_COMBINER_IN_IRQ];
> - qemu_irq ext_combiner_irq[EXYNOS4210_MAX_EXT_COMBINER_IN_IRQ];
> + SplitIRQ int_combiner_irq[EXYNOS4210_MAX_INT_COMBINER_IN_IRQ];
> + SplitIRQ ext_combiner_irq[EXYNOS4210_MAX_EXT_COMBINER_IN_IRQ];
> qemu_irq int_gic_irq[EXYNOS4210_INT_GIC_NIRQ];
> qemu_irq ext_gic_irq[EXYNOS4210_EXT_GIC_NIRQ];
> - qemu_irq board_irqs[EXYNOS4210_MAX_INT_COMBINER_IN_IRQ];
> + SplitIRQ board_irqs[EXYNOS4210_MAX_INT_COMBINER_IN_IRQ];
> } Exynos4210Irq;
Because `SplitIRQ` is an incomplete type.
regards,
Li