From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MCWeD-00027n-5D for qemu-devel@nongnu.org; Fri, 05 Jun 2009 06:27:41 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MCWe8-00021R-7N for qemu-devel@nongnu.org; Fri, 05 Jun 2009 06:27:40 -0400 Received: from [199.232.76.173] (port=51361 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MCWe8-00021J-2z for qemu-devel@nongnu.org; Fri, 05 Jun 2009 06:27:36 -0400 Received: from mx2.redhat.com ([66.187.237.31]:59148) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MCWe7-0003MO-Jd for qemu-devel@nongnu.org; Fri, 05 Jun 2009 06:27:35 -0400 Date: Fri, 5 Jun 2009 13:24:34 +0300 From: "Michael S. Tsirkin" Message-ID: <20090605102434.GN26770@redhat.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: [Qemu-devel] [PATCHv3 13/13] qemu: add pci_get/set_byte List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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 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 8e74033..7cc9a8a 100644 --- a/hw/pci.h +++ b/hw/pci.h @@ -263,6 +263,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); -- 1.6.3.1.56.g79e1.dirty