[U-Boot] [PATCHv3 3/5] omap3: remove typedefs for configuration structs

Dirk Behme
2009-05-24T16:12:48Z

Dear Jean-Christophe,

Jean-Christophe PLAGNIOL-VILLARD wrote:
> On 09:09 Tue 19 May , Matthias Ludwig wrote:
>> Signed-off-by: Matthias Ludwig <mludwig@ultratronik.de>
>> ---
>> board/omap3/beagle/beagle.c | 6 ++--
>> board/omap3/evm/evm.c | 6 ++--
>> board/omap3/pandora/pandora.c | 8 +++---
>> board/omap3/zoom2/zoom2.c | 2 +-
>> cpu/arm_cortexa8/omap3/board.c | 16 ++++++------
>> cpu/arm_cortexa8/omap3/clock.c | 14 +++++-----
>> cpu/arm_cortexa8/omap3/mem.c | 14 +++++-----
>> cpu/arm_cortexa8/omap3/sys_info.c | 12 ++++----
>> cpu/arm_cortexa8/omap3/timer.c | 2 +-
>> drivers/mtd/nand/omap_gpmc.c | 2 +-
>> include/asm-arm/arch-omap3/cpu.h | 50 ++++++++++++++++++------------------
>> include/asm-arm/arch-omap3/mem.h | 4 +-
>> include/asm-arm/arch-omap3/omap3.h | 8 +++---
>> include/configs/omap3_beagle.h | 2 +-
>> include/configs/omap3_evm.h | 2 +-
>> include/configs/omap3_overo.h | 2 +-
>> include/configs/omap3_pandora.h | 2 +-
>> include/configs/omap3_zoom1.h | 2 +-
>> include/configs/omap3_zoom2.h | 2 +-
>> 19 files changed, 78 insertions(+), 78 deletions(-)
>>
>> diff --git a/board/omap3/beagle/beagle.c b/board/omap3/beagle/beagle.c
>> index 7eb70ee..2dc11dd 100644
>> --- a/board/omap3/beagle/beagle.c
>> +++ b/board/omap3/beagle/beagle.c
>> @@ -74,7 +74,7 @@ int beagle_get_revision(void)
>> */
>> void beagle_identify(void)
>> {
>> - gpio_t *gpio6_base = (gpio_t *)OMAP34XX_GPIO6_BASE;
>> + struct gpio *gpio6_base = (struct gpio *)OMAP34XX_GPIO6_BASE;
> please use a namespace name gpio is too much generic
> and it's the same for the other struct sms, pm etc...
> omap_ will be better as the omap4 will certanly use the same or near IP

But OMAP4 most probably will not use a file board/omap3/beagle/beagle.c.

And using "omap_" would be wrong if your argument is OMAP4. Then it
needs at least to be "omap3_".

And I can't see how a local variable could pollute the namespace, if
this is what you mean.

And if I remember correctly, you are against global variables (at
least you mentioned it in some reviews), so a global variable called
"gpio6_base" would be the issue, not the naming of this local variable.

I.e. we are in omap3 directory and have a local variable, so it's fine
to use no omap_ here and do it as it is in Matthias' patch.

Best regards

Dirk