From 45b16d22c64674ccd8c4637456a987463609141c Mon Sep 17 00:00:00 2001 From: Wolfgang Denk Date: Mon, 14 Jul 2008 22:38:42 +0200 Subject: [PATCH] Fix coding style; make code better parsable by external tools Signed-off-by: Wolfgang Denk --- board/snmc/qs850/qs850.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/board/snmc/qs850/qs850.c b/board/snmc/qs850/qs850.c index ba5a8fb0a1..2fbe8aeb51 100644 --- a/board/snmc/qs850/qs850.c +++ b/board/snmc/qs850/qs850.c @@ -86,6 +86,13 @@ const uint sdram_table[] = * * Always return 1 */ +#if defined(CONFIG_QS850) +#define BOARD_IDENTITY "QS850" +#elif defined(CONFIG_QS823) +#define BOARD_IDENTITY "QS823" +#else +#define BOARD_IDENTITY "QS???" +#endif int checkboard (void) { @@ -96,14 +103,8 @@ int checkboard (void) i = getenv_r("serial#", buf, sizeof(buf)); s = (i>0) ? buf : NULL; -#ifdef CONFIG_QS850 - if (!s || strncmp(s, "QS850", 5)) { - puts ("### No HW ID - assuming QS850"); -#endif -#ifdef CONFIG_QS823 - if (!s || strncmp(s, "QS823", 5)) { - puts ("### No HW ID - assuming QS823"); -#endif + if (!s || strncmp(s, BOARD_IDENTITY, 5)) { + puts ("### No HW ID - assuming " BOARD_IDENTITY); } else { for (e=s; *e; ++e) { if (*e == ' ') -- 2.39.5