Skip to content
Snippets Groups Projects
Commit 2765c4d1 authored by Simon Glass's avatar Simon Glass
Browse files

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: default avatarSimon Glass <sjg@chromium.org>
parent ed73508d
No related branches found
No related tags found
No related merge requests found
......@@ -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) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment