From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NzPli-00088w-Uq for qemu-devel@nongnu.org; Wed, 07 Apr 2010 03:33:47 -0400 Received: from [140.186.70.92] (port=43134 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NzPlZ-00082L-5n for qemu-devel@nongnu.org; Wed, 07 Apr 2010 03:33:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NzPlU-0002wW-PP for qemu-devel@nongnu.org; Wed, 07 Apr 2010 03:33:36 -0400 Received: from mx1.redhat.com ([209.132.183.28]:17306) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NzPlU-0002w6-GC for qemu-devel@nongnu.org; Wed, 07 Apr 2010 03:33:32 -0400 Date: Wed, 7 Apr 2010 10:29:38 +0300 From: "Michael S. Tsirkin" Subject: Re: [Qemu-devel] [PATCH 6/9] eepro100: Support compilation without EEPROM Message-ID: <20100407072938.GA6834@redhat.com> References: <1270554249-24861-1-git-send-email-weil@mail.berlios.de> <1270554249-24861-7-git-send-email-weil@mail.berlios.de> <201004070200.23054.paul@codesourcery.com> <4BBC2DEE.1050006@mail.berlios.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4BBC2DEE.1050006@mail.berlios.de> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Weil Cc: Richard Henderson , Paul Brook , qemu-devel@nongnu.org On Wed, Apr 07, 2010 at 09:02:06AM +0200, Stefan Weil wrote: > Paul Brook schrieb: > >> To emulate hardware without an EEPROM, > >> EEPROM_SIZE may be set to 0. > > > > If might, but it isn't. > > > > This patch introduces a condition that will never be false. Please > > don't do > > that. I consider code that is never used to be actively harmful. Any > > feature > > that requires the user hack the source may as well not exist. The only > > possible exception is debug output intended solely for qemu developers. > > > > If there's something worth noting for future reference then add a proper > > comment, if necessary marked as TODO/FIXME. > > > > Paul > > In this case, it is code which is normally always used, > so maybe it is a little less harmful :-) > > Anyway - Richard already gave a good feedback on the same topic. > > His feedback convinced me that adding an eeprom size or model > property as a device option would be the better way to > support both developer needs (I want to make tests with > no eeprom) and user needs (normally, an eeprom is > available). The preprocessor #if would be replaced by > a normal C if. > > I'll do this in a future patch. > > Michael, I suggest either omitting this patch or adding a > TODO comment to the preprocessor #if like this: > > #if EEPROM_SIZE > 0 /* TODO: add a new EEPROM property and use it here */ > > Regards, > Stefan I'll omit the patch. Thanks!