From ebe080188c2e965331045653d85e7a914d7274f8 Mon Sep 17 00:00:00 2001 From: Piotr Dymacz Date: Sat, 20 Aug 2016 22:18:12 +0200 Subject: [PATCH] Cosmetic cleanups in various files --- u-boot/common/devices.c | 2 +- u-boot/common/dlmalloc.c | 84 +++--------------- u-boot/common/env_flash.c | 2 +- u-boot/common/environment.c | 2 +- u-boot/common/lists.c | 10 +-- u-boot/common/main.c | 4 +- u-boot/drivers/netconsole.c | 2 +- u-boot/include/asm-mips/addrspace.h | 2 +- u-boot/include/asm-mips/cachectl.h | 2 +- u-boot/include/asm-mips/cacheops.h | 2 +- u-boot/include/asm-mips/u-boot.h | 2 +- u-boot/include/common.h | 4 +- u-boot/include/configs/ap121.h | 6 +- u-boot/include/configs/ap143.h | 2 +- u-boot/include/configs/ar7240.h | 6 +- u-boot/include/configs/db12x.h | 6 +- u-boot/include/devices.h | 2 +- u-boot/include/environment.h | 4 +- u-boot/include/exports.h | 73 ++++++++-------- u-boot/include/image.h | 127 ++++++++++++++-------------- u-boot/include/lcd.h | 2 +- u-boot/include/linux/stat.h | 6 +- u-boot/include/lists.h | 2 +- u-boot/include/malloc.h | 2 +- u-boot/include/net.h | 4 +- u-boot/include/pci.h | 2 +- u-boot/include/rtc.h | 2 +- u-boot/include/tplink_image.h | 2 +- u-boot/include/version.h | 2 +- u-boot/net/bootp.c | 6 +- u-boot/tools/envcrc.c | 4 +- u-boot/tools/mkimage.c | 2 +- 32 files changed, 159 insertions(+), 221 deletions(-) diff --git a/u-boot/common/devices.c b/u-boot/common/devices.c index c167072..4e9bc3e 100644 --- a/u-boot/common/devices.c +++ b/u-boot/common/devices.c @@ -111,7 +111,7 @@ int device_deregister(char *devname){ return(0); } -#endif /* CFG_DEVICE_DEREGISTER */ +#endif /* CFG_DEVICE_DEREGISTER */ int devices_init(void){ ulong relocation_offset = gd->reloc_off; diff --git a/u-boot/common/dlmalloc.c b/u-boot/common/dlmalloc.c index 20c2069..a54a43a 100644 --- a/u-boot/common/dlmalloc.c +++ b/u-boot/common/dlmalloc.c @@ -218,9 +218,6 @@ */ - - - /* Preliminaries */ #ifndef __STD_C @@ -944,9 +941,9 @@ void malloc_stats (void); static void malloc_update_mallinfo (); void malloc_stats(); #endif -#endif /* 0 */ +#endif /* 0 */ -#endif /* 0 */ /* Moved to malloc.h */ +#endif /* 0 */ /* Moved to malloc.h */ #include DECLARE_GLOBAL_DATA_PTR; @@ -1141,8 +1138,6 @@ gAllocatedSize)) #endif - - /* Type declarations */ @@ -1281,7 +1276,7 @@ nextchunk-> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ serviced via calls to mmap, and then later released via munmap. */ - + /* sizes, alignments */ #define SIZE_SZ (sizeof(INTERNAL_SIZE_T)) @@ -1305,9 +1300,6 @@ nextchunk-> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ #define aligned_OK(m) (((unsigned long)((m)) & (MALLOC_ALIGN_MASK)) == 0) - - - /* Physical chunk operations */ @@ -1340,9 +1332,6 @@ nextchunk-> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ #define chunk_at_offset(p, s) ((mchunkptr)(((char*)(p)) + (s))) - - - /* Dealing with use bits */ @@ -1379,9 +1368,6 @@ nextchunk-> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ #define clear_inuse_bit_at_offset(p, s)\ (((mchunkptr)(((char*)(p)) + (s)))->size &= ~(PREV_INUSE)) - - - /* Dealing with size fields */ @@ -1402,10 +1388,6 @@ nextchunk-> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ #define set_foot(p, s) (((mchunkptr)((char*)(p) + (s)))->prev_size = (s)) - - - - /* Bins @@ -1501,7 +1483,6 @@ void malloc_bin_reloc (void) *p++ += gd->reloc_off; } } - /* field-extraction macros */ @@ -1537,8 +1518,6 @@ void malloc_bin_reloc (void) #define is_small_request(nb) (nb < MAX_SMALLBIN_SIZE - SMALLBIN_WIDTH) - - /* To help compensate for the large number of bins, a one-level index structure is used for bin-by-bin searching. `binblocks' is a @@ -1559,10 +1538,6 @@ void malloc_bin_reloc (void) #define mark_binblock(ii) (binblocks |= idx2binblock(ii)) #define clear_binblock(ii) (binblocks &= ~(idx2binblock(ii))) - - - - /* Other static bookkeeping data */ /* variables holding tunable values */ @@ -1591,15 +1566,13 @@ static struct mallinfo current_mallinfo = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; #if 0 static unsigned int n_mmaps = 0; -#endif /* 0 */ +#endif /* 0 */ static unsigned long mmapped_mem = 0; #if HAVE_MMAP static unsigned int max_n_mmaps = 0; static unsigned long max_mmapped_mem = 0; #endif - - /* Debugging support */ @@ -1623,7 +1596,7 @@ static void do_check_chunk(p) mchunkptr p; { #if 0 /* causes warnings because assert() is off */ INTERNAL_SIZE_T sz = p->size & ~PREV_INUSE; -#endif /* 0 */ +#endif /* 0 */ /* No checkable chunk is mmapped */ assert(!chunk_is_mmapped(p)); @@ -1647,7 +1620,7 @@ static void do_check_free_chunk(p) mchunkptr p; INTERNAL_SIZE_T sz = p->size & ~PREV_INUSE; #if 0 /* causes warnings because assert() is off */ mchunkptr next = chunk_at_offset(p, sz); -#endif /* 0 */ +#endif /* 0 */ do_check_chunk(p); @@ -1714,7 +1687,7 @@ static void do_check_malloced_chunk(p, s) mchunkptr p; INTERNAL_SIZE_T s; #if 0 /* causes warnings because assert() is off */ INTERNAL_SIZE_T sz = p->size & ~PREV_INUSE; long room = sz - s; -#endif /* 0 */ +#endif /* 0 */ do_check_inuse_chunk(p); @@ -1745,8 +1718,6 @@ static void do_check_malloced_chunk(p, s) mchunkptr p; INTERNAL_SIZE_T s; #define check_malloced_chunk(P,N) #endif - - /* Macro-based internal utilities */ @@ -1816,10 +1787,6 @@ static void do_check_malloced_chunk(p, s) mchunkptr p; INTERNAL_SIZE_T s; #define clear_last_remainder \ (last_remainder->fd = last_remainder->bk = last_remainder) - - - - /* Routines dealing with mmap(). */ #if HAVE_MMAP @@ -1947,9 +1914,6 @@ static mchunkptr mremap_chunk(p, new_size) mchunkptr p; size_t new_size; #endif /* HAVE_MMAP */ - - - /* Extend the top-most chunk by obtaining memory from system. Main interface to sbrk (but see also malloc_trim). @@ -2064,9 +2028,6 @@ static void malloc_extend_top(nb) INTERNAL_SIZE_T nb; assert(((unsigned long)((char*)top + top_size) & (pagesz - 1)) == 0); } - - - /* Main public routines */ @@ -2365,9 +2326,6 @@ Void_t* mALLOc(bytes) size_t bytes; } - - - /* free() algorithm : @@ -2482,10 +2440,6 @@ void fREe(mem) Void_t* mem; frontlink(p, sz, idx, bck, fwd); } - - - - /* Realloc algorithm: @@ -2719,9 +2673,6 @@ Void_t* rEALLOc(oldmem, bytes) Void_t* oldmem; size_t bytes; return chunk2mem(newp); } - - - /* memalign algorithm: @@ -2838,9 +2789,6 @@ Void_t* mEMALIGn(alignment, bytes) size_t alignment; size_t bytes; } - - - /* valloc just invokes memalign with alignment argument equal to the page size of the system (or as near to this as can @@ -2945,8 +2893,6 @@ void cfree(mem) Void_t *mem; } #endif - - /* Malloc_trim gives memory back to the system (via negative @@ -3026,8 +2972,6 @@ int malloc_trim(pad) size_t pad; } } - - /* malloc_usable_size: @@ -3061,9 +3005,6 @@ size_t malloc_usable_size(mem) Void_t* mem; } } - - - /* Utility to update current_mallinfo for malloc_stats and mallinfo() */ #if 0 @@ -3104,9 +3045,7 @@ static void malloc_update_mallinfo() current_mallinfo.keepcost = chunksize(top); } -#endif /* 0 */ - - +#endif /* 0 */ /* @@ -3138,7 +3077,7 @@ void malloc_stats() (unsigned int)max_n_mmaps); #endif } -#endif /* 0 */ +#endif /* 0 */ /* mallinfo returns a copy of updated current mallinfo. @@ -3150,10 +3089,7 @@ struct mallinfo mALLINFo() malloc_update_mallinfo(); return current_mallinfo; } -#endif /* 0 */ - - - +#endif /* 0 */ /* mallopt: diff --git a/u-boot/common/env_flash.c b/u-boot/common/env_flash.c index 9bf996f..54913d2 100644 --- a/u-boot/common/env_flash.c +++ b/u-boot/common/env_flash.c @@ -236,7 +236,7 @@ int saveenv(void){ #else flash_sect_addr = (ulong)flash_addr; len = CFG_ENV_SIZE; -#endif /* CFG_ENV_SECT_SIZE */ +#endif /* CFG_ENV_SECT_SIZE */ end_addr = flash_sect_addr + len - 1; diff --git a/u-boot/common/environment.c b/u-boot/common/environment.c index b8b8a8e..7e4060e 100644 --- a/u-boot/common/environment.c +++ b/u-boot/common/environment.c @@ -195,7 +195,7 @@ env_t redundand_environment __PPCENV__ = { "\0" } }; -#endif /* CFG_ENV_ADDR_REDUND */ +#endif /* CFG_ENV_ADDR_REDUND */ /* * These will end up in the .text section diff --git a/u-boot/common/lists.c b/u-boot/common/lists.c index 3973277..b6d9762 100644 --- a/u-boot/common/lists.c +++ b/u-boot/common/lists.c @@ -138,7 +138,7 @@ int BinSearch ( void *array, int numElements, int elementSize, return -mid - 1; } -#endif /* CFG_ALL_LIST_FUNCTIONS */ +#endif /* CFG_ALL_LIST_FUNCTIONS */ /*******************************************************************************/ @@ -191,7 +191,7 @@ void ListCompact (list_t list) (*list)->listSize = (*list)->numItems; } -#endif /* CFG_ALL_LIST_FUNCTIONS */ +#endif /* CFG_ALL_LIST_FUNCTIONS */ /*******************************/ @@ -336,7 +336,7 @@ int ListAppend (list_t list1, list_t list2) return 1; } -#endif /* CFG_ALL_LIST_FUNCTIONS */ +#endif /* CFG_ALL_LIST_FUNCTIONS */ /*******************************/ @@ -461,7 +461,7 @@ void ListGetItem (list_t list, void *itemDestination, int itemPosition) ListGetItems (list, itemDestination, itemPosition, 1); } -#endif /* CFG_ALL_LIST_FUNCTIONS */ +#endif /* CFG_ALL_LIST_FUNCTIONS */ /*******************************/ @@ -502,7 +502,7 @@ void ListRemoveItems (list_t list, void *itemsDestination, (*list)->numItems -= numItemsToRemove; } -#endif /* CFG_ALL_LIST_FUNCTIONS || CFG_DEVICE_DEREGISTER */ +#endif /* CFG_ALL_LIST_FUNCTIONS || CFG_DEVICE_DEREGISTER */ /*******************************/ #if 0 diff --git a/u-boot/common/main.c b/u-boot/common/main.c index f73f5cc..a0b3e14 100644 --- a/u-boot/common/main.c +++ b/u-boot/common/main.c @@ -119,7 +119,7 @@ static __inline__ int abortboot(int bootdelay){ return(abort); } -#endif /* CONFIG_BOOTDELAY >= 0 */ +#endif /* CONFIG_BOOTDELAY >= 0 */ /****************************************************************************/ @@ -246,7 +246,7 @@ void main_loop(void){ printf("\n## Error: failed to execute 'bootcmd'!\nHTTP server is starting for firmware update...\n\n"); NetLoopHttpd(); } -#endif /* CONFIG_BOOTDELAY */ +#endif /* CONFIG_BOOTDELAY */ /* * Main Loop for Monitor Command Processing diff --git a/u-boot/drivers/netconsole.c b/u-boot/drivers/netconsole.c index f24ac54..025ecd2 100644 --- a/u-boot/drivers/netconsole.c +++ b/u-boot/drivers/netconsole.c @@ -295,4 +295,4 @@ int drv_nc_init(void){ return((rc == 0) ? 1 : rc); } -#endif /* CONFIG_NETCONSOLE */ +#endif /* CONFIG_NETCONSOLE */ diff --git a/u-boot/include/asm-mips/addrspace.h b/u-boot/include/asm-mips/addrspace.h index 0c22947..4acabdf 100644 --- a/u-boot/include/asm-mips/addrspace.h +++ b/u-boot/include/asm-mips/addrspace.h @@ -45,7 +45,7 @@ */ #ifndef __ASSEMBLY__ #define UNCACHED_SDRAM(a) KSEG1ADDR((a)) -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLY__ */ /* * Map an address to a certain kernel segment */ diff --git a/u-boot/include/asm-mips/cachectl.h b/u-boot/include/asm-mips/cachectl.h index 9cc2b87..6988fbb 100644 --- a/u-boot/include/asm-mips/cachectl.h +++ b/u-boot/include/asm-mips/cachectl.h @@ -21,4 +21,4 @@ #define CACHEABLE 0 /* make pages cacheable */ #define UNCACHEABLE 1 /* make pages uncacheable */ -#endif /* __ASM_MIPS_CACHECTL */ +#endif /* __ASM_MIPS_CACHECTL */ diff --git a/u-boot/include/asm-mips/cacheops.h b/u-boot/include/asm-mips/cacheops.h index 66b0b36..c1b584d 100644 --- a/u-boot/include/asm-mips/cacheops.h +++ b/u-boot/include/asm-mips/cacheops.h @@ -44,4 +44,4 @@ #define Hit_Set_Virtual_SI 0x1e #define Hit_Set_Virtual_SD 0x1f -#endif /* __ASM_MIPS_CACHEOPS_H */ +#endif /* __ASM_MIPS_CACHEOPS_H */ diff --git a/u-boot/include/asm-mips/u-boot.h b/u-boot/include/asm-mips/u-boot.h index c08e035..c784057 100644 --- a/u-boot/include/asm-mips/u-boot.h +++ b/u-boot/include/asm-mips/u-boot.h @@ -48,4 +48,4 @@ typedef struct bd_info { #define bi_env_data bi_env->data #define bi_env_crc bi_env->crc -#endif /* _U_BOOT_H_ */ +#endif /* _U_BOOT_H_ */ diff --git a/u-boot/include/common.h b/u-boot/include/common.h index a634ea5..3a69e21 100644 --- a/u-boot/include/common.h +++ b/u-boot/include/common.h @@ -106,7 +106,7 @@ typedef volatile unsigned char vu_char; #else #define debug(fmt,args...) #define debugX(level,fmt,args...) -#endif /* DEBUG */ +#endif /* DEBUG */ typedef void (interrupt_handler_t)(void *); @@ -598,4 +598,4 @@ int pcmcia_init (void); #define CONFIG_BOOTP_MASK CONFIG_BOOTP_DEFAULT #endif -#endif /* __COMMON_H_ */ +#endif /* __COMMON_H_ */ diff --git a/u-boot/include/configs/ap121.h b/u-boot/include/configs/ap121.h index 444715b..19f8be8 100644 --- a/u-boot/include/configs/ap121.h +++ b/u-boot/include/configs/ap121.h @@ -2,8 +2,8 @@ * This file contains the configuration parameters for the AP121 (AR9331) board. */ -#ifndef __CONFIG_H -#define __CONFIG_H +#ifndef __AP121_CONFIG_H +#define __AP121_CONFIG_H #include #include @@ -656,4 +656,4 @@ 0x0000FFE0) #endif -#endif /* __CONFIG_H */ +#endif /* __AP121_CONFIG_H */ diff --git a/u-boot/include/configs/ap143.h b/u-boot/include/configs/ap143.h index 21a8ede..7350dcf 100644 --- a/u-boot/include/configs/ap143.h +++ b/u-boot/include/configs/ap143.h @@ -386,4 +386,4 @@ 0x0000FFE0) #endif -#endif /* __AP143_CONFIG_H */ +#endif /* __AP143_CONFIG_H */ diff --git a/u-boot/include/configs/ar7240.h b/u-boot/include/configs/ar7240.h index 8f7d910..6911bc6 100644 --- a/u-boot/include/configs/ar7240.h +++ b/u-boot/include/configs/ar7240.h @@ -2,8 +2,8 @@ * This file contains the configuration parameters for the dbau1x00 board. */ -#ifndef __AR7240_H -#define __AR7240_H +#ifndef __AR7240_CONFIG_H +#define __AR7240_CONFIG_H #ifndef CONFIG_BOOTDELAY #define CONFIG_BOOTDELAY 1 /* autoboot after x seconds */ @@ -45,4 +45,4 @@ #define CFG_ICACHE_SIZE 65536 #define CFG_CACHELINE_SIZE 32 -#endif /* __CONFIG_H */ +#endif /* __AR7240_CONFIG_H */ diff --git a/u-boot/include/configs/db12x.h b/u-boot/include/configs/db12x.h index cdfc968..abfb824 100644 --- a/u-boot/include/configs/db12x.h +++ b/u-boot/include/configs/db12x.h @@ -2,8 +2,8 @@ * This file contains the configuration parameters for the DB12x (AR9344) board. */ -#ifndef __CONFIG_H -#define __CONFIG_H +#ifndef __DB12X_CONFIG_H +#define __DB12X_CONFIG_H #include #include @@ -310,4 +310,4 @@ 0x0000FFE0) #endif -#endif /* __CONFIG_H */ +#endif /* __DB12X_CONFIG_H */ diff --git a/u-boot/include/devices.h b/u-boot/include/devices.h index 2d9e282..6c4a847 100644 --- a/u-boot/include/devices.h +++ b/u-boot/include/devices.h @@ -112,4 +112,4 @@ int drv_usbtty_init (void); int drv_nc_init (void); #endif -#endif /* _DEVICES_H_ */ +#endif /* _DEVICES_H_ */ diff --git a/u-boot/include/environment.h b/u-boot/include/environment.h index 8aa6590..87da304 100644 --- a/u-boot/include/environment.h +++ b/u-boot/include/environment.h @@ -73,7 +73,7 @@ #if defined(CFG_ENV_ADDR_REDUND) || defined(CFG_ENV_OFFSET_REDUND) #define CFG_REDUNDAND_ENVIRONMENT 1 #endif -#endif /* CFG_ENV_IS_IN_FLASH */ +#endif /* CFG_ENV_IS_IN_FLASH */ #if defined(CFG_ENV_IS_IN_NAND) # ifndef CFG_ENV_OFFSET @@ -105,4 +105,4 @@ typedef struct environment_s { unsigned char data[ENV_SIZE]; /* Environment data */ } env_t; -#endif /* _ENVIRONMENT_H_ */ +#endif /* _ENVIRONMENT_H_ */ diff --git a/u-boot/include/exports.h b/u-boot/include/exports.h index 9598449..1c87940 100644 --- a/u-boot/include/exports.h +++ b/u-boot/include/exports.h @@ -2,44 +2,47 @@ #define __EXPORTS_H__ #ifndef __ASSEMBLY__ - #include -/* These are declarations of exported functions available in C code */ -unsigned long get_version(void); -int getc(void); -int tstc(void); -void putc(const char); -void puts(const char*); -void printf(const char* fmt, ...); -void install_hdlr(int, interrupt_handler_t*, void*); -void free_hdlr(int); -void *malloc(size_t); -void free(void*); -void udelay(unsigned long); -unsigned long get_timer(unsigned long); -void do_reset(void); -void app_startup(char **); - -#endif /* ifndef __ASSEMBLY__ */ +/* + * These are declarations of exported + * functions available in C code + */ +unsigned long get_timer(unsigned long); +unsigned long get_version(void); + +void app_startup(char **); +void do_reset(void); +void free(void*); +void free_hdlr(int); +void install_hdlr(int, interrupt_handler_t*, void*); +void printf(const char* fmt, ...); +void putc(const char); +void puts(const char*); +void udelay(unsigned long); +void *malloc(size_t); + +int getc(void); +int tstc(void); +#endif /* ifndef __ASSEMBLY__ */ enum { -#define EXPORT_FUNC(x) XF_ ## x , -EXPORT_FUNC(get_version) -EXPORT_FUNC(getc) -EXPORT_FUNC(tstc) -EXPORT_FUNC(putc) -EXPORT_FUNC(puts) -EXPORT_FUNC(printf) -EXPORT_FUNC(install_hdlr) -EXPORT_FUNC(free_hdlr) -EXPORT_FUNC(malloc) -EXPORT_FUNC(free) -EXPORT_FUNC(udelay) -EXPORT_FUNC(get_timer) -EXPORT_FUNC(do_reset) -#undef EXPORT_FUNC -XF_MAX + #define EXPORT_FUNC(x) XF_ ## x , + EXPORT_FUNC(get_version) + EXPORT_FUNC(getc) + EXPORT_FUNC(tstc) + EXPORT_FUNC(putc) + EXPORT_FUNC(puts) + EXPORT_FUNC(printf) + EXPORT_FUNC(install_hdlr) + EXPORT_FUNC(free_hdlr) + EXPORT_FUNC(malloc) + EXPORT_FUNC(free) + EXPORT_FUNC(udelay) + EXPORT_FUNC(get_timer) + EXPORT_FUNC(do_reset) + #undef EXPORT_FUNC + XF_MAX }; #define XF_VERSION 2 @@ -48,4 +51,4 @@ XF_MAX extern gd_t *global_data; #endif -#endif /* __EXPORTS_H__ */ +#endif /* __EXPORTS_H__ */ diff --git a/u-boot/include/image.h b/u-boot/include/image.h index ad86284..49f5383 100644 --- a/u-boot/include/image.h +++ b/u-boot/include/image.h @@ -34,48 +34,48 @@ /* * Operating System Codes */ -#define IH_OS_INVALID 0 /* Invalid OS */ -#define IH_OS_OPENBSD 1 /* OpenBSD */ -#define IH_OS_NETBSD 2 /* NetBSD */ -#define IH_OS_FREEBSD 3 /* FreeBSD */ -#define IH_OS_4_4BSD 4 /* 4.4BSD */ -#define IH_OS_LINUX 5 /* Linux */ -#define IH_OS_SVR4 6 /* SVR4 */ -#define IH_OS_ESIX 7 /* Esix */ -#define IH_OS_SOLARIS 8 /* Solaris */ -#define IH_OS_IRIX 9 /* Irix */ -#define IH_OS_SCO 10 /* SCO */ -#define IH_OS_DELL 11 /* Dell */ -#define IH_OS_NCR 12 /* NCR */ -#define IH_OS_LYNXOS 13 /* LynxOS */ -#define IH_OS_VXWORKS 14 /* VxWorks */ -#define IH_OS_PSOS 15 /* pSOS */ -#define IH_OS_QNX 16 /* QNX */ -#define IH_OS_U_BOOT 17 /* Firmware */ -#define IH_OS_RTEMS 18 /* RTEMS */ -#define IH_OS_ARTOS 19 /* ARTOS */ -#define IH_OS_UNITY 20 /* Unity OS */ +#define IH_OS_INVALID 0 /* Invalid OS */ +#define IH_OS_OPENBSD 1 /* OpenBSD */ +#define IH_OS_NETBSD 2 /* NetBSD */ +#define IH_OS_FREEBSD 3 /* FreeBSD */ +#define IH_OS_4_4BSD 4 /* 4.4BSD */ +#define IH_OS_LINUX 5 /* Linux */ +#define IH_OS_SVR4 6 /* SVR4 */ +#define IH_OS_ESIX 7 /* Esix */ +#define IH_OS_SOLARIS 8 /* Solaris */ +#define IH_OS_IRIX 9 /* Irix */ +#define IH_OS_SCO 10 /* SCO */ +#define IH_OS_DELL 11 /* Dell */ +#define IH_OS_NCR 12 /* NCR */ +#define IH_OS_LYNXOS 13 /* LynxOS */ +#define IH_OS_VXWORKS 14 /* VxWorks */ +#define IH_OS_PSOS 15 /* pSOS */ +#define IH_OS_QNX 16 /* QNX */ +#define IH_OS_U_BOOT 17 /* Firmware */ +#define IH_OS_RTEMS 18 /* RTEMS */ +#define IH_OS_ARTOS 19 /* ARTOS */ +#define IH_OS_UNITY 20 /* Unity OS */ /* * CPU Architecture Codes (supported by Linux) */ -#define IH_CPU_INVALID 0 /* Invalid CPU */ -#define IH_CPU_ALPHA 1 /* Alpha */ -#define IH_CPU_ARM 2 /* ARM */ -#define IH_CPU_I386 3 /* Intel x86 */ -#define IH_CPU_IA64 4 /* IA64 */ -#define IH_CPU_MIPS 5 /* MIPS */ +#define IH_CPU_INVALID 0 /* Invalid CPU */ +#define IH_CPU_ALPHA 1 /* Alpha */ +#define IH_CPU_ARM 2 /* ARM */ +#define IH_CPU_I386 3 /* Intel x86 */ +#define IH_CPU_IA64 4 /* IA64 */ +#define IH_CPU_MIPS 5 /* MIPS */ #define IH_CPU_MIPS64 6 /* MIPS 64 Bit */ -#define IH_CPU_PPC 7 /* PowerPC */ -#define IH_CPU_S390 8 /* IBM S390 */ -#define IH_CPU_SH 9 /* SuperH */ -#define IH_CPU_SPARC 10 /* Sparc */ +#define IH_CPU_PPC 7 /* PowerPC */ +#define IH_CPU_S390 8 /* IBM S390 */ +#define IH_CPU_SH 9 /* SuperH */ +#define IH_CPU_SPARC 10 /* Sparc */ #define IH_CPU_SPARC64 11 /* Sparc 64 Bit */ -#define IH_CPU_M68K 12 /* M68K */ -#define IH_CPU_NIOS 13 /* Nios-32 */ +#define IH_CPU_M68K 12 /* M68K */ +#define IH_CPU_NIOS 13 /* Nios-32 */ #define IH_CPU_MICROBLAZE 14 /* MicroBlaze */ -#define IH_CPU_NIOS2 15 /* Nios-II */ -#define IH_CPU_BLACKFIN 16 /* Blackfin */ +#define IH_CPU_NIOS2 15 /* Nios-II */ +#define IH_CPU_BLACKFIN 16 /* Blackfin */ /* * Image Types @@ -116,43 +116,42 @@ * as command interpreter (=> Shell Scripts). */ -#define IH_TYPE_INVALID 0 /* Invalid Image */ -#define IH_TYPE_STANDALONE 1 /* Standalone Program */ -#define IH_TYPE_KERNEL 2 /* OS Kernel Image */ -#define IH_TYPE_RAMDISK 3 /* RAMDisk Image */ -#define IH_TYPE_MULTI 4 /* Multi-File Image */ -#define IH_TYPE_FIRMWARE 5 /* Firmware Image */ -#define IH_TYPE_SCRIPT 6 /* Script file */ -#define IH_TYPE_FILESYSTEM 7 /* Filesystem Image (any type) */ +#define IH_TYPE_INVALID 0 /* Invalid Image */ +#define IH_TYPE_STANDALONE 1 /* Standalone Program */ +#define IH_TYPE_KERNEL 2 /* OS Kernel Image */ +#define IH_TYPE_RAMDISK 3 /* RAMDisk Image */ +#define IH_TYPE_MULTI 4 /* Multi-File Image */ +#define IH_TYPE_FIRMWARE 5 /* Firmware Image */ +#define IH_TYPE_SCRIPT 6 /* Script file */ +#define IH_TYPE_FILESYSTEM 7 /* Filesystem Image (any type) */ /* * Compression Types */ -#define IH_COMP_NONE 0 /* No Compression Used */ -#define IH_COMP_GZIP 1 /* gzip Compression Used */ -#define IH_COMP_BZIP2 2 /* bzip2 Compression Used */ -#define IH_COMP_LZMA 3 /* lzma Compression Used */ +#define IH_COMP_NONE 0 /* no compression */ +#define IH_COMP_GZIP 1 /* gzip compression */ +#define IH_COMP_BZIP2 2 /* bzip2 compression */ +#define IH_COMP_LZMA 3 /* lzma compression */ -#define IH_MAGIC 0x27051956 /* Image Magic Number */ -#define IH_NMLEN 32 /* Image Name Length */ +#define IH_MAGIC 0x27051956 /* Image Magic Number */ +#define IH_NMLEN 32 /* Image Name Length */ /* - * all data in network byte order (aka natural aka bigendian) + * All data in network byte order (aka natural aka bigendian) */ - typedef struct image_header { - uint32_t ih_magic; /* Image Header Magic Number */ - uint32_t ih_hcrc; /* Image Header CRC Checksum */ - uint32_t ih_time; /* Image Creation Timestamp */ - uint32_t ih_size; /* Image Data Size */ - uint32_t ih_load; /* Data Load Address */ - uint32_t ih_ep; /* Entry Point Address */ - uint32_t ih_dcrc; /* Image Data CRC Checksum */ - uint8_t ih_os; /* Operating System */ - uint8_t ih_arch; /* CPU architecture */ - uint8_t ih_type; /* Image Type */ - uint8_t ih_comp; /* Compression Type */ - uint8_t ih_name[IH_NMLEN]; /* Image Name */ + uint32_t ih_magic; /* Image Header Magic Number */ + uint32_t ih_hcrc; /* Image Header CRC Checksum */ + uint32_t ih_time; /* Image Creation Timestamp */ + uint32_t ih_size; /* Image Data Size */ + uint32_t ih_load; /* Data Load Address */ + uint32_t ih_ep; /* Entry Point Address */ + uint32_t ih_dcrc; /* Image Data CRC Checksum */ + uint8_t ih_os; /* Operating System */ + uint8_t ih_arch; /* CPU architecture */ + uint8_t ih_type; /* Image Type */ + uint8_t ih_comp; /* Compression Type */ + uint8_t ih_name[IH_NMLEN]; /* Image Name */ } image_header_t; -#endif /* __IMAGE_H__ */ +#endif /* __IMAGE_H__ */ diff --git a/u-boot/include/lcd.h b/u-boot/include/lcd.h index 35c8a07..1b4c344 100644 --- a/u-boot/include/lcd.h +++ b/u-boot/include/lcd.h @@ -280,4 +280,4 @@ void lcd_printf (const char *fmt, ...); /************************************************************************/ -#endif /* _LCD_H_ */ +#endif /* _LCD_H_ */ diff --git a/u-boot/include/linux/stat.h b/u-boot/include/linux/stat.h index f9422cb..3296bcc 100644 --- a/u-boot/include/linux/stat.h +++ b/u-boot/include/linux/stat.h @@ -65,7 +65,7 @@ struct stat { unsigned long __unused5; }; -#endif /* __PPC__ */ +#endif /* __PPC__ */ #if defined (__ARM__) || defined (__I386__) || defined (__M68K__) || defined (__blackfin__) @@ -92,7 +92,7 @@ struct stat { unsigned long __unused5; }; -#endif /* __ARM__ */ +#endif /* __ARM__ */ #if defined (__MIPS__) @@ -123,7 +123,7 @@ struct stat { long st_pad4[14]; }; -#endif /* __MIPS__ */ +#endif /* __MIPS__ */ #ifdef __cplusplus } diff --git a/u-boot/include/lists.h b/u-boot/include/lists.h index 804b5cd..4c560cb 100644 --- a/u-boot/include/lists.h +++ b/u-boot/include/lists.h @@ -74,4 +74,4 @@ int ListInsertAfterItem(list_t list, void *ptrToItem, void *ptrToItemToInser int ListInsertBeforeItem(list_t list, void *ptrToItem, void *ptrToItemToInsertBefore, CompareFunction compareFunction); #endif /* 0 */ -#endif /* _LISTS_H_ */ +#endif /* _LISTS_H_ */ diff --git a/u-boot/include/malloc.h b/u-boot/include/malloc.h index 47154b0..922e5aa 100644 --- a/u-boot/include/malloc.h +++ b/u-boot/include/malloc.h @@ -244,7 +244,7 @@ #include /* for size_t */ #else #include -#endif /* __STD_C */ +#endif /* __STD_C */ #ifdef __cplusplus extern "C" { diff --git a/u-boot/include/net.h b/u-boot/include/net.h index fe6ba56..ffecb9b 100644 --- a/u-boot/include/net.h +++ b/u-boot/include/net.h @@ -19,7 +19,7 @@ # define CONFIG_NET_MULTI # endif # endif -#endif /* CONFIG_8xx */ +#endif /* CONFIG_8xx */ #if defined(CONFIG_MPC5xxx) # if !defined(CONFIG_NET_MULTI) @@ -27,7 +27,7 @@ # define CONFIG_NET_MULTI # endif # endif -#endif /* CONFIG_MPC5xxx */ +#endif /* CONFIG_MPC5xxx */ #if !defined(CONFIG_NET_MULTI) && defined(CONFIG_CPM2) #include diff --git a/u-boot/include/pci.h b/u-boot/include/pci.h index 6e09b16..c032678 100644 --- a/u-boot/include/pci.h +++ b/u-boot/include/pci.h @@ -373,4 +373,4 @@ struct pci_controller { int current_busno; }; -#endif /* _PCI_H */ +#endif /* _PCI_H */ diff --git a/u-boot/include/rtc.h b/u-boot/include/rtc.h index a742077..d5802f8 100644 --- a/u-boot/include/rtc.h +++ b/u-boot/include/rtc.h @@ -60,4 +60,4 @@ void GregorianDay(struct rtc_time *); void to_tm(int, struct rtc_time *); unsigned long mktime(unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int); -#endif /* _RTC_H_ */ +#endif /* _RTC_H_ */ diff --git a/u-boot/include/tplink_image.h b/u-boot/include/tplink_image.h index 2d4e9f0..1553a2b 100644 --- a/u-boot/include/tplink_image.h +++ b/u-boot/include/tplink_image.h @@ -42,4 +42,4 @@ typedef struct tplink_image_header { /* ofs (size): what */ uint8_t ih_pad[354]; /* 0x9E (354): padding, not used... */ } tplink_image_header_t; -#endif /* __TPLINK_IMAGE_H__ */ +#endif /* __TPLINK_IMAGE_H__ */ diff --git a/u-boot/include/version.h b/u-boot/include/version.h index b56d2e9..8c1f111 100644 --- a/u-boot/include/version.h +++ b/u-boot/include/version.h @@ -26,4 +26,4 @@ #include "version_autogenerated.h" -#endif /* __VERSION_H__ */ +#endif /* __VERSION_H__ */ diff --git a/u-boot/net/bootp.c b/u-boot/net/bootp.c index 1dac5f5..aec4dd1 100644 --- a/u-boot/net/bootp.c +++ b/u-boot/net/bootp.c @@ -686,7 +686,7 @@ void BootpRequest(void){ for(reg = 0; reg < sum; reg++){ udelay(1000); /* Wait 1ms */ } -#endif /* CONFIG_BOOTP_RANDOM_DELAY */ +#endif /* CONFIG_BOOTP_RANDOM_DELAY */ printf("Sending DHCP discover... %d\n", ++BootpTry); @@ -988,7 +988,7 @@ static void DhcpHandler(uchar * pkt, unsigned dest, unsigned src, unsigned len){ #ifdef CFG_BOOTFILE_PREFIX if(strncmp(bp->bp_file, CFG_BOOTFILE_PREFIX, strlen(CFG_BOOTFILE_PREFIX)) == 0 ){ -#endif /* CFG_BOOTFILE_PREFIX */ +#endif /* CFG_BOOTFILE_PREFIX */ #ifdef DEBUG puts("TRANSITIONING TO REQUESTING STATE\n"); @@ -1007,7 +1007,7 @@ static void DhcpHandler(uchar * pkt, unsigned dest, unsigned src, unsigned len){ #ifdef CFG_BOOTFILE_PREFIX } -#endif /* CFG_BOOTFILE_PREFIX */ +#endif /* CFG_BOOTFILE_PREFIX */ return; break; diff --git a/u-boot/tools/envcrc.c b/u-boot/tools/envcrc.c index 179e44b..12e0e86 100644 --- a/u-boot/tools/envcrc.c +++ b/u-boot/tools/envcrc.c @@ -56,7 +56,7 @@ # if defined(CFG_ENV_ADDR_REDUND) || defined(CFG_ENV_OFFSET_REDUND) # define CFG_REDUNDAND_ENVIRONMENT 1 # endif -#endif /* CFG_ENV_IS_IN_FLASH */ +#endif /* CFG_ENV_IS_IN_FLASH */ #ifdef CFG_REDUNDAND_ENVIRONMENT # define ENV_HEADER_SIZE (sizeof(unsigned long) + 1) @@ -70,7 +70,7 @@ #ifdef ENV_IS_EMBEDDED extern unsigned int env_size; extern unsigned char environment; -#endif /* ENV_IS_EMBEDDED */ +#endif /* ENV_IS_EMBEDDED */ int main (int argc, char **argv) { diff --git a/u-boot/tools/mkimage.c b/u-boot/tools/mkimage.c index 205db48..6c775ed 100644 --- a/u-boot/tools/mkimage.c +++ b/u-boot/tools/mkimage.c @@ -53,7 +53,7 @@ typedef unsigned int uint32_t; #define ntohl(a) SWAP_LONG(a) #define htonl(a) SWAP_LONG(a) -#endif /* __WIN32__ */ +#endif /* __WIN32__ */ #ifndef O_BINARY /* should be define'd on __WIN32__ */ #define O_BINARY 0 -- 2.25.1