From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:45519) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R0Ex7-0001YC-B7 for qemu-devel@nongnu.org; Sun, 04 Sep 2011 11:49:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R0Ex6-0006q5-He for qemu-devel@nongnu.org; Sun, 04 Sep 2011 11:49:45 -0400 Received: from mx1.redhat.com ([209.132.183.28]:30245) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R0Ex6-0006oP-Aa for qemu-devel@nongnu.org; Sun, 04 Sep 2011 11:49:44 -0400 Message-ID: <4E639E0E.8040903@redhat.com> Date: Sun, 04 Sep 2011 18:49:34 +0300 From: Avi Kivity MIME-Version: 1.0 References: <20110904123006.GA23500@redhat.com> <4E6371DA.7070304@redhat.com> <20110904130159.GB23500@redhat.com> <4E63778A.6050002@redhat.com> <20110904134101.GA27239@redhat.com> <4E638355.8030903@redhat.com> <20110904142152.GB27239@redhat.com> <4E638D08.10307@redhat.com> <20110904152621.GA30431@redhat.com> <4E639C72.4020803@redhat.com> <20110904154637.GB31273@redhat.com> In-Reply-To: <20110904154637.GB31273@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] pci: add standard bridge device List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: Kevin Wolf , Isaku Yamahata , qemu-devel@nongnu.org On 09/04/2011 06:46 PM, Michael S. Tsirkin wrote: > > > > Why pointers? Regular fields require less upkeep. > > Good point. Why does PIIX use pointers? I just copied that ... > It doesn't, at least not completely: struct PCII440FXState { PCIDevice dev; MemoryRegion *system_memory; MemoryRegion *pci_address_space; MemoryRegion *ram_memory; MemoryRegion pci_hole; MemoryRegion pci_hole_64bit; PAMMemoryRegion pam_regions[13]; MemoryRegion smram_region; uint8_t smm_enabled; bool smram_enabled; PIIX3State *piix3; }; Arguably, ram_memory and pci_address_space should not be pointers, since this address space is supplied by 440fx. (pci_hole, pci_hole64, pam_regions[], and smram_regions are all aliases analogous to the bridge windows) -- error compiling committee.c: too many arguments to function