diff --git a/include/fallback.h b/include/fallback.h index 17db5c6d9f..057681bfc1 100644 --- a/include/fallback.h +++ b/include/fallback.h @@ -11,8 +11,8 @@ void set_boot_successful(void); void boot_successful(void); -#endif /* ASSEMBLY */ +#endif /* ASSEMBLY */ #define RTC_BOOT_BYTE 48 -#endif /* PART_FALLBACK_BOOT_H */ +#endif /* PART_FALLBACK_BOOT_H */ diff --git a/include/lar.h b/include/lar.h index af564d0ad5..ceeb89386b 100644 --- a/include/lar.h +++ b/include/lar.h @@ -36,4 +36,3 @@ struct mem_file { void *start; int len; }; - diff --git a/include/string.h b/include/string.h index 3d056818cc..e69fbaca3d 100644 --- a/include/string.h +++ b/include/string.h @@ -9,7 +9,7 @@ extern void *memmove(void *dest, const void *src, size_t n); extern void *memset(void *s, int c, size_t n); extern int memcmp(const void *s1, const void *s2, size_t n); -extern int sprintf(char * buf, const char *fmt, ...); +extern int sprintf(char *buf, const char *fmt, ...); // yes, linux has fancy ones. We don't care. This stuff gets used // hardly at all. And the pain of including those files is just too high. @@ -18,10 +18,10 @@ extern int sprintf(char * buf, const char *fmt, ...); //extern inline int strlen(char *src) { int i = 0; while (*src++) i++; return i;} -static inline size_t strnlen(const char *src, size_t max) -{ +static inline size_t strnlen(const char *src, size_t max) +{ size_t i = 0; - while((*src++) && (i < max)) { + while ((*src++) && (i < max)) { i++; } return i; @@ -30,7 +30,7 @@ static inline size_t strnlen(const char *src, size_t max) static inline size_t strlen(const char *src) { size_t i = 0; - while(*src++) { + while (*src++) { i++; } return i; @@ -40,13 +40,13 @@ static inline char *strchr(const char *s, int c) { for (; *s; s++) { if (*s == c) - return (char *) s; - } + return (char *)s; + } return 0; } static inline char *strdup(const char *s) -{ +{ size_t sz = strlen(s) + 1; char *d = malloc(sz); memcpy(d, s, sz); @@ -71,7 +71,7 @@ static inline char *strncpy(char *to, const char *from, int count) } static inline int strcmp(const char *s1, const char *s2) -{ +{ int r; while ((r = (*s1 - *s2)) == 0 && *s1) { @@ -79,13 +79,17 @@ static inline int strcmp(const char *s1, const char *s2) s2++; } return r; -} +} static inline int isspace(int c) { switch (c) { - case ' ': case '\f': case '\n': - case '\r': case '\t': case '\v': + case ' ': + case '\f': + case '\n': + case '\r': + case '\t': + case '\v': return 1; default: return 0; @@ -100,8 +104,7 @@ static inline int isdigit(int c) static inline int isxdigit(int c) { return ((c >= '0' && c <= '9') || - (c >= 'a' && c <= 'f') || - (c >= 'A' && c <= 'F')); + (c >= 'a' && c <= 'f') || (c >= 'A' && c <= 'F')); } static inline int isupper(int c) @@ -116,15 +119,15 @@ static inline int islower(int c) static inline int toupper(int c) { - if (islower(c)) - c -= 'a'-'A'; - return c; + if (islower(c)) + c -= 'a' - 'A'; + return c; } static inline int tolower(int c) { - if (isupper(c)) - c -= 'A'-'a'; - return c; + if (isupper(c)) + c -= 'A' - 'a'; + return c; } -#endif /* STRING_H */ +#endif /* STRING_H */ diff --git a/include/uart8250.h b/include/uart8250.h index dc09315dea..00bd902565 100644 --- a/include/uart8250.h +++ b/include/uart8250.h @@ -12,4 +12,4 @@ void uart8250_tx_byte(unsigned base_port, unsigned char data); void uart8250_init(unsigned base_port, unsigned divisor, unsigned lcs); void init_uart8250(unsigned base_port, struct uart8250 *uart); -#endif /* UART8250_H */ +#endif /* UART8250_H */ diff --git a/mainboard/emulation/qemu-i386/config.h b/mainboard/emulation/qemu-i386/config.h index ad5813be65..51e37b1bc3 100644 --- a/mainboard/emulation/qemu-i386/config.h +++ b/mainboard/emulation/qemu-i386/config.h @@ -3,4 +3,3 @@ extern struct chip_operations mainboard_emulation_qemu_i386_ops; struct mainboard_emulation_qemu_i386_config { int nothing; }; - diff --git a/mainboard/emulation/qemu-i386/initram.c b/mainboard/emulation/qemu-i386/initram.c index e79652f518..b930d38f4e 100644 --- a/mainboard/emulation/qemu-i386/initram.c +++ b/mainboard/emulation/qemu-i386/initram.c @@ -30,9 +30,7 @@ int main(void) { printk(BIOS_INFO, "RAM init code started\n"); - die ("Nothing to do."); + die("Nothing to do."); return 0; } - - diff --git a/mainboard/emulation/qemu-i386/mainboard.c b/mainboard/emulation/qemu-i386/mainboard.c index 2b4a1efe6a..1037bb1688 100644 --- a/mainboard/emulation/qemu-i386/mainboard.c +++ b/mainboard/emulation/qemu-i386/mainboard.c @@ -25,4 +25,3 @@ struct chip_operations mainboard_emulation_qemu_i386_ops = { .name = "QEMU Mainboard" }; - diff --git a/mainboard/emulation/qemu-i386/setup_before_car.c b/mainboard/emulation/qemu-i386/setup_before_car.c index 505a8ec44c..f1a009b759 100644 --- a/mainboard/emulation/qemu-i386/setup_before_car.c +++ b/mainboard/emulation/qemu-i386/setup_before_car.c @@ -22,17 +22,17 @@ /* */ -void udelay(int usecs) +void udelay(int usecs) { int i; - for(i = 0; i < usecs; i++) - outb(i&0xff, 0x80); + for (i = 0; i < usecs; i++) + outb(i & 0xff, 0x80); } void setup_before_car(void) { outb(5, 0x80); - + //uart_init(); //console_init(); }