
On 03/02/2012 12:37 PM, Troy Kisky wrote:
On 3/2/2012 10:45 AM, Stephen Warren wrote:
On 03/02/2012 12:00 AM, Wolfgang Denk wrote:
Dear Troy Kisky,
In message4F4FFD1F.4080406@boundarydevices.com you wrote:
Not sure I understand why we have a "machine_ix_xxx()" here. Could you> explain?
Amicalement,
Because board/nvidia/seaboard/seaboard.c uses machine_is_ventana but> that machine is no longer in mach-types.
Then fix the seaboard.c code, please, instead of adding dead code.
I think that should actually be very easy. Can't the following:
if (machine_is_foo()) { ... }
be converted to:
#if CONFIG_MACH_TYPE == MACH_TYPE_FOO ... #endif
As a related note, I expect you'll see more and more boards that don't exist in the kernel's mach-type.h since people won't register machine IDs for boards that only support device tree.
How about reversing the test
#if CONFIG_MACH_TYPE == MACH_TYPE_SEABORD
instead of
#if CONFIG_MACH_TYPE == MACH_TYPE_VENTANA
so that I don't care that ventana is no longer defined?
That's probably fine.
A comment right above that states that Ventana is the other possibility would be useful.
Of course, this isn't going to solve anything when we have 3 variants of Seaboard, and only Seaboard is in mach-types.h but not the other 2, but I suppose we can deal with that when it happens.