From patchwork Thu May 27 05:42:37 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Isaku Yamahata X-Patchwork-Id: 53686 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id BD168B7D29 for ; Thu, 27 May 2010 16:08:39 +1000 (EST) Received: from localhost ([127.0.0.1]:38871 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OHWGi-0003sW-Ky for incoming@patchwork.ozlabs.org; Thu, 27 May 2010 02:08:36 -0400 Received: from [140.186.70.92] (port=38514 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OHW3H-0003bp-4G for qemu-devel@nongnu.org; Thu, 27 May 2010 01:54:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OHVup-0004B1-U9 for qemu-devel@nongnu.org; Thu, 27 May 2010 01:46:00 -0400 Received: from mail.valinux.co.jp ([210.128.90.3]:40115) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OHVup-0004At-KI for qemu-devel@nongnu.org; Thu, 27 May 2010 01:45:59 -0400 Received: from ps.local.valinux.co.jp (vagw.valinux.co.jp [210.128.90.14]) by mail.valinux.co.jp (Postfix) with SMTP id 9B83C186A9; Thu, 27 May 2010 14:45:58 +0900 (JST) Received: (nullmailer pid 13282 invoked by uid 1000); Thu, 27 May 2010 05:42:37 -0000 Date: Thu, 27 May 2010 14:42:37 +0900 From: Isaku Yamahata To: qemu-devel@nongnu.org Message-ID: <20100527054237.GH31807@valinux.co.jp> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.19 (2009-01-05) X-Virus-Scanned: clamav-milter 0.95.2 at va-mail.local.valinux.co.jp X-Virus-Status: Clean X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) Subject: [Qemu-devel] [PATCH] pci: add const to pci_is_express(), pci_config_size(). X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org add const to pci_is_express(), pci_config_size(). Signed-off-by: Isaku Yamahata --- hw/pci.h | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/pci.h b/hw/pci.h index 6eee93a..b803593 100644 --- a/hw/pci.h +++ b/hw/pci.h @@ -339,12 +339,12 @@ void pci_qdev_register_many(PCIDeviceInfo *info); PCIDevice *pci_create(PCIBus *bus, int devfn, const char *name); PCIDevice *pci_create_simple(PCIBus *bus, int devfn, const char *name); -static inline int pci_is_express(PCIDevice *d) +static inline int pci_is_express(const PCIDevice *d) { return d->cap_present & QEMU_PCI_CAP_EXPRESS; } -static inline uint32_t pci_config_size(PCIDevice *d) +static inline uint32_t pci_config_size(const PCIDevice *d) { return pci_is_express(d) ? PCIE_CONFIG_SPACE_SIZE : PCI_CONFIG_SPACE_SIZE; }