From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:56369) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TRdjv-00014f-Eh for qemu-devel@nongnu.org; Fri, 26 Oct 2012 02:49:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TRdju-0007QC-Bl for qemu-devel@nongnu.org; Fri, 26 Oct 2012 02:49:55 -0400 Received: from mx1.redhat.com ([209.132.183.28]:21885) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TRdju-0007PS-3g for qemu-devel@nongnu.org; Fri, 26 Oct 2012 02:49:54 -0400 Message-ID: <508A328C.6030604@redhat.com> Date: Fri, 26 Oct 2012 08:49:48 +0200 From: Gerd Hoffmann MIME-Version: 1.0 References: <50892CB0.6020706@redhat.com> <50893B33.5000908@redhat.com> <50894360.906@redhat.com> <5089485E.5090004@redhat.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v1 5/8] xilinx_zynq: add USB controllers List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Crosthwaite Cc: vineshp@xilinx.com, Peter Maydell , john.williams@xilinx.com, qemu-devel@nongnu.org, edgar.iglesias@gmail.com Hi, >> @@ -1312,29 +1320,24 @@ static TypeInfo piix3_uhci_info = { >> .name = "piix3-usb-uhci", >> .parent = TYPE_PCI_DEVICE, >> .instance_size = sizeof(UHCIState), >> - .class_init = piix3_uhci_class_init, >> + .class_init = uhci_class_init, > > Therese three elements (parent, instance_size, class_init) are > repeated from one definition to the next. This will get tedious when > we eventually come to make the same fix for some of the other devices > that have large numbers of variants (pflash_cfi0x and m25p80 being > some of the angrier ones). I think we can also create TypeInfo at runtime (uhci_register_types in the uhci case). We'll just have to stick the name into UHCIInfo, build a static uhciinfo array, then generate & register TypeInfo from that. cheers, Gerd