From patchwork Fri Apr 5 04:28:05 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: liguang X-Patchwork-Id: 234032 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id B791E2C00A9 for ; Fri, 5 Apr 2013 15:29:43 +1100 (EST) Received: from localhost ([::1]:52572 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UNyHV-0001bT-O8 for incoming@patchwork.ozlabs.org; Fri, 05 Apr 2013 00:29:41 -0400 Received: from eggs.gnu.org ([208.118.235.92]:56826) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UNyGy-0001YO-4i for qemu-devel@nongnu.org; Fri, 05 Apr 2013 00:29:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UNyGv-0005kC-Ng for qemu-devel@nongnu.org; Fri, 05 Apr 2013 00:29:08 -0400 Received: from [222.73.24.84] (port=3799 helo=song.cn.fujitsu.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UNyGv-0005ji-D2 for qemu-devel@nongnu.org; Fri, 05 Apr 2013 00:29:05 -0400 X-IronPort-AV: E=Sophos;i="4.87,412,1363104000"; d="scan'208";a="7001174" Received: from unknown (HELO tang.cn.fujitsu.com) ([10.167.250.3]) by song.cn.fujitsu.com with ESMTP; 05 Apr 2013 12:26:20 +0800 Received: from fnstmail02.fnst.cn.fujitsu.com (tang.cn.fujitsu.com [127.0.0.1]) by tang.cn.fujitsu.com (8.14.3/8.13.1) with ESMTP id r354SsHI013917; Fri, 5 Apr 2013 12:28:56 +0800 Received: from liguang.fnst.cn.fujitsu.com ([10.167.233.147]) by fnstmail02.fnst.cn.fujitsu.com (Lotus Domino Release 8.5.3) with ESMTP id 2013040512275397-317109 ; Fri, 5 Apr 2013 12:27:53 +0800 From: liguang To: aliguori@us.ibm.com, peter.maydell@linaro.org, pbonzini@redhat.com, stefanha@gmail.com, afaerber@suse.de, qemu-devel@nongnu.org Date: Fri, 5 Apr 2013 12:28:05 +0800 Message-Id: <1365136091-26148-2-git-send-email-lig.fnst@cn.fujitsu.com> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: <1365136091-26148-1-git-send-email-lig.fnst@cn.fujitsu.com> References: <1365136091-26148-1-git-send-email-lig.fnst@cn.fujitsu.com> X-MIMETrack: Itemize by SMTP Server on mailserver/fnst(Release 8.5.3|September 15, 2011) at 2013/04/05 12:27:53, Serialize by Router on mailserver/fnst(Release 8.5.3|September 15, 2011) at 2013/04/05 12:27:54, Serialize complete at 2013/04/05 12:27:54 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 222.73.24.84 Cc: liguang Subject: [Qemu-devel] [PATCH][RFC v2 1/7] hw/irq: move struct IRQState to irq.h X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org define struct IRQState in irq.c bring in a annoying result, if you want dereference of IRQState's member like opaque outside of irq.c, compiler will complain: "error: dereferencing pointer to incomplete type" Signed-off-by: liguang --- hw/irq.c | 6 ------ hw/irq.h | 6 ++++++ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/hw/irq.c b/hw/irq.c index 2078542..100890f 100644 --- a/hw/irq.c +++ b/hw/irq.c @@ -24,12 +24,6 @@ #include "qemu-common.h" #include "hw/irq.h" -struct IRQState { - qemu_irq_handler handler; - void *opaque; - int n; -}; - void qemu_set_irq(qemu_irq irq, int level) { if (!irq) diff --git a/hw/irq.h b/hw/irq.h index 610e6b7..7ae152d 100644 --- a/hw/irq.h +++ b/hw/irq.h @@ -7,6 +7,12 @@ typedef struct IRQState *qemu_irq; typedef void (*qemu_irq_handler)(void *opaque, int n, int level); +struct IRQState { + qemu_irq_handler handler; + void *opaque; + int n; +}; + void qemu_set_irq(qemu_irq irq, int level); static inline void qemu_irq_raise(qemu_irq irq)