Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MmPYi-0005hs-6B for qemu-devel@nongnu.org; Sat, 12 Sep 2009 06:10:20 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MmPYc-0005ac-US for qemu-devel@nongnu.org; Sat, 12 Sep 2009 06:10:19 -0400 Received: from [199.232.76.173] (port=57947 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MmPYc-0005aJ-QE for qemu-devel@nongnu.org; Sat, 12 Sep 2009 06:10:14 -0400 Received: from mail-ew0-f221.google.com ([209.85.219.221]:65505) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MmPYc-0002rs-GK for qemu-devel@nongnu.org; Sat, 12 Sep 2009 06:10:14 -0400 Received: by ewy21 with SMTP id 21so1620164ewy.8 for ; Sat, 12 Sep 2009 03:10:13 -0700 (PDT) Date: Sat, 12 Sep 2009 12:10:09 +0200 From: "Edgar E. Iglesias" Subject: Re: [Qemu-devel] [PATCH 1/6] Move function definitions out of xilinx.h Message-ID: <20090912101009.GC16110@laped.iglesias.mooo.com> References: <37d5a3ce941bc89f6d73b8e7bf746952a0074da2.1252699478.git.armbru@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Blue Swirl Cc: qemu-devel@nongnu.org, Markus Armbruster , Paul Brook On Sat, Sep 12, 2009 at 09:04:17AM +0300, Blue Swirl wrote: > On Fri, Sep 11, 2009 at 11:19 PM, Markus Armbruster wrote: > > xilinx.h defines a couple of static inline functions for creating > > devices.  While that's a fair technique for hot functions, device > > initialization is about as cold as it gets.  Define them in the device > > source files instead, and keep only declarations in the header. > > If I understood the qdev plan correctly, this is going to wrong > direction. These functions should reside near the instantiation, not > in the device code. The current approach looks OK if there are going > to be more users of the devices. I agree that they shouldn't be in the device source. The reason they ended up in a header and not with the petalogix board was that in my tree there are multiple boards using these functions to easy instantiate devices. Cheers