From: SangHee Kim Date: Wed, 28 Apr 2010 12:31:53 +0000 (+0900) Subject: recovery: code clean up X-Git-Tag: JD16_20100430~5 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6dd2b23e2b0dbd24530491403e76f967b50bf69d;p=kernel%2Fu-boot.git recovery: code clean up --- diff --git a/recovery/board/samsung/universal/universal.c b/recovery/board/samsung/universal/universal.c index 6674e62..6041202 100644 --- a/recovery/board/samsung/universal/universal.c +++ b/recovery/board/samsung/universal/universal.c @@ -12,7 +12,7 @@ #include "onenand.h" #ifdef RECOVERY_DEBUG -#define PUTS(s) serial_puts (DEBUG_MARK""s) +#define PUTS(s) serial_puts(DEBUG_MARK""s) #else #define PUTS(s) #endif @@ -21,7 +21,8 @@ typedef int (init_fnc_t) (void); DECLARE_GLOBAL_DATA_PTR; -static struct s5pc110_gpio *gpio_base = (struct s5pc110_gpio *) S5PC110_GPIO_BASE; +static struct s5pc110_gpio *gpio_base = + (struct s5pc110_gpio *) S5PC110_GPIO_BASE; static void sdelay(unsigned long usec) { diff --git a/recovery/recovery.c b/recovery/recovery.c index 5c64677..80b336e 100644 --- a/recovery/recovery.c +++ b/recovery/recovery.c @@ -10,7 +10,7 @@ #include "onenand.h" #ifdef RECOVERY_DEBUG -#define PUTS(s) serial_puts (DEBUG_MARK""s) +#define PUTS(s) serial_puts(DEBUG_MARK""s) #else #define PUTS(s) #endif @@ -51,7 +51,7 @@ void start_recovery_boot(void) serial_init(); serial_puts("\n"); - + if (board_check_condition()) recovery_boot(); else diff --git a/recovery/serial.c b/recovery/serial.c index cfd086b..c25bf28 100644 --- a/recovery/serial.c +++ b/recovery/serial.c @@ -8,44 +8,45 @@ static struct serial_device *serial_current = NULL; -struct serial_device *__default_serial_console (void) +struct serial_device *__default_serial_console(void) { return &s5pc1xx_serial2_device; } -struct serial_device *default_serial_console(void) __attribute__((weak, alias("__default_serial_console"))); +struct serial_device *default_serial_console(void) + __attribute__((weak, alias("__default_serial_console"))); void serial_putc(const char c) { if (!serial_current) { - struct serial_device *dev = default_serial_console (); + struct serial_device *dev = default_serial_console(); - dev->putc (c); + dev->putc(c); return; } - serial_current->putc (c); + serial_current->putc(c); } void serial_puts(const char *s) { if (!serial_current) { - struct serial_device *dev = default_serial_console (); + struct serial_device *dev = default_serial_console(); - dev->puts (s); + dev->puts(s); return; } - serial_current->puts (s); + serial_current->puts(s); } int serial_init(void) { if (!serial_current) { - struct serial_device *dev = default_serial_console (); + struct serial_device *dev = default_serial_console(); - return dev->init (); + return dev->init(); } - return serial_current->init (); + return serial_current->init(); } diff --git a/recovery/usbd.c b/recovery/usbd.c index bd4f7cc..6e657cc 100644 --- a/recovery/usbd.c +++ b/recovery/usbd.c @@ -12,7 +12,7 @@ #include "onenand.h" #ifdef RECOVERY_DEBUG -#define PUTS(s) serial_puts (DEBUG_MARK"usb: "s) +#define PUTS(s) serial_puts(DEBUG_MARK"usb: "s) #else #define PUTS(s) #endif @@ -74,8 +74,7 @@ static int process_data(struct usbd_ops *usbd) if (recvlen < len) { PUTS("Error: wrong image size\n"); *((ulong *) usbd->tx_data) = STATUS_RETRY; - } - else + } else *((ulong *) usbd->tx_data) = STATUS_DONE; usbd->send_data(usbd->tx_data, usbd->tx_len);