From: Igor Mammedov <imammedo@redhat.com>
To: Zhu Guihua <zhugh.fnst@cn.fujitsu.com>
Cc: ehabkost@redhat.com, qemu-devel@nongnu.org,
guz.fnst@cn.fujitsu.com, izumi.taku@jp.fujitsu.com,
chen.fan.fnst@cn.fujitsu.com, pbonzini@redhat.com,
afaerber@suse.de
Subject: Re: [Qemu-devel] [PATCH v6 2/4] apic: convert ->busdev.qdev casts to C casts
Date: Wed, 20 May 2015 13:48:40 +0200 [thread overview]
Message-ID: <20150520134840.0132bb0f@nial.brq.redhat.com> (raw)
In-Reply-To: <5813534d8a2afa9ae2ff8f42c17b53dad2b3386e.1431936953.git.zhugh.fnst@cn.fujitsu.com>
On Wed, 20 May 2015 10:40:47 +0800
Zhu Guihua <zhugh.fnst@cn.fujitsu.com> wrote:
> Use C casts to avoid accessing ICCDevice's qdev field
> directly.
>
> Signed-off-by: Zhu Guihua <zhugh.fnst@cn.fujitsu.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
> ---
> hw/intc/apic.c | 9 ++++++---
> 1 file changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/hw/intc/apic.c b/hw/intc/apic.c
> index 0f97b47..77b639c 100644
> --- a/hw/intc/apic.c
> +++ b/hw/intc/apic.c
> @@ -370,13 +370,14 @@ static int apic_irq_pending(APICCommonState *s)
> static void apic_update_irq(APICCommonState *s)
> {
> CPUState *cpu;
> + DeviceState *dev = (DeviceState *)s;
>
> cpu = CPU(s->cpu);
> if (!qemu_cpu_is_self(cpu)) {
> cpu_interrupt(cpu, CPU_INTERRUPT_POLL);
> } else if (apic_irq_pending(s) > 0) {
> cpu_interrupt(cpu, CPU_INTERRUPT_HARD);
> - } else if (!apic_accept_pic_intr(&s->busdev.qdev) || !pic_get_output(isa_pic)) {
> + } else if (!apic_accept_pic_intr(dev) || !pic_get_output(isa_pic)) {
> cpu_reset_interrupt(cpu, CPU_INTERRUPT_HARD);
> }
> }
> @@ -549,10 +550,12 @@ static void apic_deliver(DeviceState *dev, uint8_t dest, uint8_t dest_mode,
>
> static bool apic_check_pic(APICCommonState *s)
> {
> - if (!apic_accept_pic_intr(&s->busdev.qdev) || !pic_get_output(isa_pic)) {
> + DeviceState *dev = (DeviceState *)s;
> +
> + if (!apic_accept_pic_intr(dev) || !pic_get_output(isa_pic)) {
> return false;
> }
> - apic_deliver_pic_intr(&s->busdev.qdev, 1);
> + apic_deliver_pic_intr(dev, 1);
> return true;
> }
>
next prev parent reply other threads:[~2015-05-20 11:48 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-20 2:40 [Qemu-devel] [PATCH v6 0/4] remove icc bus/bridge Zhu Guihua
2015-05-20 2:40 ` [Qemu-devel] [PATCH v6 1/4] apic: map APIC's MMIO region at each CPU's address space Zhu Guihua
2015-05-20 11:46 ` Igor Mammedov
2015-05-20 12:38 ` Eduardo Habkost
2015-05-20 13:50 ` Igor Mammedov
2015-05-20 14:10 ` Eduardo Habkost
2015-05-22 19:21 ` Eduardo Habkost
2015-05-20 2:40 ` [Qemu-devel] [PATCH v6 2/4] apic: convert ->busdev.qdev casts to C casts Zhu Guihua
2015-05-20 11:48 ` Igor Mammedov [this message]
2015-05-20 12:41 ` Andreas Färber
2015-05-22 19:22 ` Eduardo Habkost
2015-05-20 2:40 ` [Qemu-devel] [PATCH v6 3/4] cpu/apic: drop icc bus/bridge Zhu Guihua
2015-05-20 14:53 ` Igor Mammedov
2015-05-22 7:44 ` Chen Fan
2015-05-22 16:56 ` Eduardo Habkost
2015-05-22 20:26 ` Andreas Färber
2015-05-20 2:40 ` [Qemu-devel] [PATCH v6 4/4] icc_bus: drop the unused files Zhu Guihua
2015-05-20 14:14 ` [Qemu-devel] [PATCH v6 0/4] remove icc bus/bridge Eduardo Habkost
2015-05-20 14:54 ` Andreas Färber
2015-05-20 14:58 ` Eduardo Habkost
2015-05-20 15:00 ` Andreas Färber
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=20150520134840.0132bb0f@nial.brq.redhat.com \
--to=imammedo@redhat.com \
--cc=afaerber@suse.de \
--cc=chen.fan.fnst@cn.fujitsu.com \
--cc=ehabkost@redhat.com \
--cc=guz.fnst@cn.fujitsu.com \
--cc=izumi.taku@jp.fujitsu.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=zhugh.fnst@cn.fujitsu.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).