summaryrefslogtreecommitdiff
path: root/cmd/sata.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2016-05-01 11:36:01 -0600
committerSimon Glass <sjg@chromium.org>2016-05-17 09:54:43 -0600
commit2765c4d147011c9ac80cc014661321829056ee25 (patch)
tree13a7314a2afa4db5a7e2657ace5d4a3dc2b41a01 /cmd/sata.c
parented73508dec40afee7c90048fac510796bf91314d (diff)
dm: sata: Fix code style problems in cmd/sata.c
This file has a few coding style problems. Fix these to make future updates easier. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'cmd/sata.c')
-rw-r--r--cmd/sata.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/cmd/sata.c b/cmd/sata.c
index 8748ccef69..b1a64d9969 100644
--- a/cmd/sata.c
+++ b/cmd/sata.c
@@ -105,25 +105,27 @@ static int do_sata(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
case 1:
return CMD_RET_USAGE;
case 2:
- if (strncmp(argv[1],"inf", 3) == 0) {
+ if (strncmp(argv[1], "inf", 3) == 0) {
int i;
+
putc('\n');
for (i = 0; i < CONFIG_SYS_SATA_MAX_DEVICE; ++i) {
if (sata_dev_desc[i].type == DEV_TYPE_UNKNOWN)
continue;
- printf ("SATA device %d: ", i);
+ printf("SATA device %d: ", i);
dev_print(&sata_dev_desc[i]);
}
return 0;
- } else if (strncmp(argv[1],"dev", 3) == 0) {
- if ((sata_curr_device < 0) || (sata_curr_device >= CONFIG_SYS_SATA_MAX_DEVICE)) {
+ } else if (strncmp(argv[1], "dev", 3) == 0) {
+ if (sata_curr_device < 0 ||
+ sata_curr_device >= CONFIG_SYS_SATA_MAX_DEVICE) {
puts("\nno SATA devices available\n");
return 1;
}
printf("\nSATA device %d: ", sata_curr_device);
dev_print(&sata_dev_desc[sata_curr_device]);
return 0;
- } else if (strncmp(argv[1],"part",4) == 0) {
+ } else if (strncmp(argv[1], "part", 4) == 0) {
int dev, ok;
for (ok = 0, dev = 0; dev < CONFIG_SYS_SATA_MAX_DEVICE; ++dev) {