From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NzAxP-0005kN-2K for qemu-devel@nongnu.org; Tue, 06 Apr 2010 11:44:51 -0400 Received: from [140.186.70.92] (port=59512 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NzAxN-0005iZ-SP for qemu-devel@nongnu.org; Tue, 06 Apr 2010 11:44:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NzAxM-0001PM-BB for qemu-devel@nongnu.org; Tue, 06 Apr 2010 11:44:49 -0400 Received: from are.twiddle.net ([75.149.56.221]:43365) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NzAxM-0001Oz-59 for qemu-devel@nongnu.org; Tue, 06 Apr 2010 11:44:48 -0400 Message-ID: <4BBB56EE.7080203@twiddle.net> Date: Tue, 06 Apr 2010 08:44:46 -0700 From: Richard Henderson MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH 6/9] eepro100: Support compilation without EEPROM References: <1270554249-24861-1-git-send-email-weil@mail.berlios.de> <1270554249-24861-7-git-send-email-weil@mail.berlios.de> In-Reply-To: <1270554249-24861-7-git-send-email-weil@mail.berlios.de> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Weil Cc: QEMU Developers , "Michael S. Tsirkin" On 04/06/2010 04:44 AM, Stefan Weil wrote: > +#if EEPROM_SIZE > 0 > /* Add 64 * 2 EEPROM. i82557 and i82558 support a 64 word EEPROM, > * i82559 and later support 64 or 256 word EEPROM. */ > s->eeprom = eeprom93xx_new(EEPROM_SIZE); > +#endif If EEPROM_SIZE is known to be defined, even if zero, it is better to write this as a C if, not a preprocessor ifdef. Let the compiler eliminate the dead code for you. r~