summaryrefslogtreecommitdiff
path: root/common/lynxkdi.c
diff options
context:
space:
mode:
authorStephen Warren <swarren@nvidia.com>2011-10-18 11:11:49 +0000
committerWolfgang Denk <wd@denx.de>2011-10-22 01:13:35 +0200
commit712fbcf384b7fbe6118325f21dad98150b24f13b (patch)
tree38db6246dcd8d5f3ec59692d37a6bc83d4b0be3d /common/lynxkdi.c
parent83c484d7ecb62a9dfe8adb0da9a04cfb8bbb478b (diff)
checkpatch whitespace cleanups
This avoids the following checkpatch warning in later patches: ERROR: "(foo*)" should be "(foo *)" ERROR: space required before the open brace '{' ERROR: space prohibited before that close parenthesis ')' ERROR: spaces required around that '||' (ctx:WxV) WARNING: space prohibited between function name and open parenthesis '(' WARNING: line over 80 characters This fixes all the white-space warnings/errors in my subsequent patch, and within this current patch. A number of other checkpatch warnings and errors are still present in this patch itself, but are beyond simple whitespace fixes, so are not solved by this patch. v2: New patch Signed-off-by: Stephen Warren <swarren@nvidia.com> Tested-by: Simon Glass <sjg@chromium.org> Tested-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'common/lynxkdi.c')
-rw-r--r--common/lynxkdi.c34
1 files changed, 18 insertions, 16 deletions
diff --git a/common/lynxkdi.c b/common/lynxkdi.c
index b23135bd75..22ad384ef6 100644
--- a/common/lynxkdi.c
+++ b/common/lynxkdi.c
@@ -23,45 +23,47 @@
DECLARE_GLOBAL_DATA_PTR;
#if defined(CONFIG_MPC8260) || defined(CONFIG_440EP) || defined(CONFIG_440GR)
-void lynxkdi_boot (image_header_t *hdr)
+void lynxkdi_boot(image_header_t *hdr)
{
- void (*lynxkdi)(void) = (void(*)(void))image_get_ep (hdr);
+ void (*lynxkdi)(void) = (void(*)(void))image_get_ep(hdr);
lynxos_bootparms_t *parms = (lynxos_bootparms_t *)0x0020;
bd_t *kbd;
- u32 *psz = (u32 *)(image_get_load (hdr) + 0x0204);
+ u32 *psz = (u32 *)(image_get_load(hdr) + 0x0204);
- memset (parms, 0, sizeof(*parms));
+ memset(parms, 0, sizeof(*parms));
kbd = gd->bd;
parms->clock_ref = kbd->bi_busfreq;
parms->dramsz = kbd->bi_memsize;
eth_getenv_enetaddr("ethaddr", parms->ethaddr);
- mtspr (SPRN_SPRG2, 0x0020);
+ mtspr(SPRN_SPRG2, 0x0020);
/* Do a simple check for Bluecat so we can pass the
* kernel command line parameters.
*/
- if (le32_to_cpu (*psz) == image_get_data_size (hdr)) { /* FIXME: NOT SURE HERE ! */
+ /* FIXME: NOT SURE HERE ! */
+ if (le32_to_cpu(*psz) == image_get_data_size(hdr)) {
char *args;
- char *cmdline = (char *)(image_get_load (hdr) + 0x020c);
+ char *cmdline = (char *)(image_get_load(hdr) + 0x020c);
int len;
- printf ("Booting Bluecat KDI ...\n");
- udelay (200*1000); /* Allow serial port to flush */
- if ((args = getenv ("bootargs")) == NULL)
+ printf("Booting Bluecat KDI ...\n");
+ udelay(200*1000); /* Allow serial port to flush */
+ if ((args = getenv("bootargs")) == NULL)
args = "";
/* Prepend the cmdline */
- len = strlen (args);
- if (len && (len + strlen (cmdline) + 2 < (0x0400 - 0x020c))) {
- memmove (cmdline + strlen (args) + 1, cmdline, strlen (cmdline));
- strcpy (cmdline, args);
+ len = strlen(args);
+ if (len && (len + strlen(cmdline) + 2 < (0x0400 - 0x020c))) {
+ memmove(cmdline + strlen(args) + 1, cmdline,
+ strlen(cmdline));
+ strcpy(cmdline, args);
cmdline[len] = ' ';
}
}
else {
- printf ("Booting LynxOS KDI ...\n");
+ printf("Booting LynxOS KDI ...\n");
}
- lynxkdi ();
+ lynxkdi();
}
#else
#error "Lynx KDI support not implemented for configured CPU"