[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 6/9] eepro100: Support compilation without EEPRO
From: |
Stefan Weil |
Subject: |
Re: [Qemu-devel] [PATCH 6/9] eepro100: Support compilation without EEPROM |
Date: |
Wed, 07 Apr 2010 09:02:06 +0200 |
User-agent: |
Mozilla-Thunderbird 2.0.0.22 (X11/20090707) |
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
- [Qemu-devel] Re: [PATCH 2/9] eepro100: Simplify status handling, (continued)
[Qemu-devel] [PATCH 5/9] eepro100: Set configuration bit for standard TCB, Stefan Weil, 2010/04/06
[Qemu-devel] [PATCH 7/9] eepro100: Set power management capability using pci_reserve_capability, Stefan Weil, 2010/04/06
[Qemu-devel] [PATCH 8/9] eepro100: Fix mapping of flash memory, Stefan Weil, 2010/04/06
[Qemu-devel] [PATCH 9/9] eepro100: Fix PCI interrupt pin configuration regression, Stefan Weil, 2010/04/06