Re: [Qemu-devel] [PATCH 6/9] eepro100: Support compilation without EEPROM

2010-04-07 Thread Michael S. Tsirkin
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 consid

Re: [Qemu-devel] [PATCH 6/9] eepro100: Support compilation without EEPROM

2010-04-07 Thread Stefan Weil
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 require

Re: [Qemu-devel] [PATCH 6/9] eepro100: Support compilation without EEPROM

2010-04-06 Thread Paul Brook
> 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

Re: [Qemu-devel] [PATCH 6/9] eepro100: Support compilation without EEPROM

2010-04-06 Thread Richard Henderson
On 04/06/2010 09:01 AM, Stefan Weil wrote: > Richard Henderson schrieb: >> 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->

Re: [Qemu-devel] [PATCH 6/9] eepro100: Support compilation without EEPROM

2010-04-06 Thread Stefan Weil
Richard Henderson schrieb: > 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 >>

Re: [Qemu-devel] [PATCH 6/9] eepro100: Support compilation without EEPROM

2010-04-06 Thread Richard Henderson
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, e

[Qemu-devel] [PATCH 6/9] eepro100: Support compilation without EEPROM

2010-04-06 Thread Stefan Weil
To emulate hardware without an EEPROM, EEPROM_SIZE may be set to 0. Signed-off-by: Stefan Weil --- hw/eepro100.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/hw/eepro100.c b/hw/eepro100.c index cedc427..e12ee23 100644 --- a/hw/eepro100.c +++ b/hw/eepro100.c @@ -1866,