From patchwork Thu Jun 18 13:15:51 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Michael S. Tsirkin" X-Patchwork-Id: 31139 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n5IDIrXE008374 for ; Thu, 18 Jun 2009 13:18:53 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761443AbZFRNSs (ORCPT ); Thu, 18 Jun 2009 09:18:48 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1761611AbZFRNSr (ORCPT ); Thu, 18 Jun 2009 09:18:47 -0400 Received: from mx2.redhat.com ([66.187.237.31]:35428 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756274AbZFRNSr (ORCPT ); Thu, 18 Jun 2009 09:18:47 -0400 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n5IDGE5U023042; Thu, 18 Jun 2009 09:16:14 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n5IDGDBR025668; Thu, 18 Jun 2009 09:16:13 -0400 Received: from redhat.com (vpn-6-65.tlv.redhat.com [10.35.6.65]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n5IDGAZJ026750; Thu, 18 Jun 2009 09:16:10 -0400 Date: Thu, 18 Jun 2009 16:15:51 +0300 From: "Michael S. Tsirkin" To: Paul Brook , Avi Kivity , qemu-devel@nongnu.org, Carsten Otte , kvm@vger.kernel.org, Rusty Russell , virtualization@lists.linux-foundation.org, Christian Borntraeger , Blue Swirl , Anthony Liguori , Glauber Costa Subject: [PATCHv5 13/13] qemu: add pci_get/set_byte Message-ID: <20090618131551.GN19092@redhat.com> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.19 (2009-01-05) X-Scanned-By: MIMEDefang 2.58 on 172.16.27.26 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org Add pci_get/set_byte to keep *_word and *_long access functions company. They are unused for now. Signed-off-by: Michael S. Tsirkin --- hw/pci.h | 12 ++++++++++++ 1 files changed, 12 insertions(+), 0 deletions(-) diff --git a/hw/pci.h b/hw/pci.h index 67e4b4d..303179d 100644 --- a/hw/pci.h +++ b/hw/pci.h @@ -258,6 +258,18 @@ PCIBus *pci_bridge_init(PCIBus *bus, int devfn, uint16_t vid, uint16_t did, pci_map_irq_fn map_irq, const char *name); static inline void +pci_set_byte(uint8_t *config, uint8_t val) +{ + *config = val; +} + +static inline uint8_t +pci_get_byte(uint8_t *config) +{ + return *config; +} + +static inline void pci_set_word(uint8_t *config, uint16_t val) { cpu_to_le16wu((uint16_t *)config, val);