From patchwork Wed Mar 11 06:58:50 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Michael S. Tsirkin" X-Patchwork-Id: 448830 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 1EED314016A for ; Wed, 11 Mar 2015 17:59:27 +1100 (AEDT) Received: from localhost ([::1]:52951 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YVac1-0000jt-7b for incoming@patchwork.ozlabs.org; Wed, 11 Mar 2015 02:59:25 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51442) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YVabc-00009X-3U for qemu-devel@nongnu.org; Wed, 11 Mar 2015 02:59:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YVabX-00083K-O8 for qemu-devel@nongnu.org; Wed, 11 Mar 2015 02:59:00 -0400 Received: from mx1.redhat.com ([209.132.183.28]:34648) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YVabX-00083G-Gw for qemu-devel@nongnu.org; Wed, 11 Mar 2015 02:58:55 -0400 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t2B6wres005183 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 11 Mar 2015 02:58:53 -0400 Received: from redhat.com (ovpn-116-27.ams2.redhat.com [10.36.116.27]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t2B6wof1013780; Wed, 11 Mar 2015 02:58:51 -0400 Date: Wed, 11 Mar 2015 07:58:50 +0100 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Message-ID: <20150311075850-mutt-send-email-mst@redhat.com> MIME-Version: 1.0 Content-Disposition: inline X-Mutt-Fcc: =sent X-Scanned-By: MIMEDefang 2.68 on 10.5.11.27 X-MIME-Autoconverted: from 8bit to quoted-printable by mx1.redhat.com id t2B6wres005183 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: Peter Maydell , =?us-ascii?B?PT9VVEYtOD9xP0FuZHJlYXM9MjBGPUMzPUE0cmJlcj89?= , Paolo Bonzini Subject: [Qemu-devel] [PATCH] exec: don't include hw/boards for linux-user 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 As noted by Andreas, hw/boards.h shouldn't be used outside softmmu code. Include it conditionally, and drop the (now unnecessary) ifdef guards in hw/boards.h Reported-by: Andreas Färber Cc: Peter Maydell Signed-off-by: Michael S. Tsirkin Acked-by: Paolo Bonzini Reviewed-by: Andreas Färber --- include/hw/boards.h | 4 ---- exec.c | 2 ++ 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/include/hw/boards.h b/include/hw/boards.h index cd6deb0..f44d6f5 100644 --- a/include/hw/boards.h +++ b/include/hw/boards.h @@ -3,8 +3,6 @@ #ifndef HW_BOARDS_H #define HW_BOARDS_H -#if !defined(CONFIG_USER_ONLY) - #include "qemu/typedefs.h" #include "sysemu/blockdev.h" #include "sysemu/accel.h" @@ -158,5 +156,3 @@ struct MachineState { }; #endif - -#endif diff --git a/exec.c b/exec.c index fe64009..bc37c7b 100644 --- a/exec.c +++ b/exec.c @@ -26,7 +26,9 @@ #include "cpu.h" #include "tcg.h" #include "hw/hw.h" +#if !defined(CONFIG_USER_ONLY) #include "hw/boards.h" +#endif #include "hw/qdev.h" #include "qemu/osdep.h" #include "sysemu/kvm.h"