diff mbox series

[U-Boot,v3,5/6] cmd: sysboot: Fix checkpatch WARNING/CHECK

Message ID 20191125080741.2215-6-patrice.chotard@st.com
State Accepted
Commit 51843eaba673daebe0af8ae7912cd1f84a76b685
Delegated to: Tom Rini
Headers show
Series cmd: remove NET and CMD_NET dependency for CMD_PXE | expand

Commit Message

Patrice CHOTARD Nov. 25, 2019, 8:07 a.m. UTC
Fix checkpatch WARNING and CHECK issues

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
---

 cmd/sysboot.c | 25 ++++++++++++-------------
 1 file changed, 12 insertions(+), 13 deletions(-)

Comments

Tom Rini Dec. 6, 2019, 9:48 p.m. UTC | #1
On Mon, Nov 25, 2019 at 09:07:40AM +0100, Patrice Chotard wrote:

> Fix checkpatch WARNING and CHECK issues
> 
> Signed-off-by: Patrice Chotard <patrice.chotard@st.com>

Applied to u-boot/master, thanks!
diff mbox series

Patch

diff --git a/cmd/sysboot.c b/cmd/sysboot.c
index 965799a1cb..793d67d2f5 100644
--- a/cmd/sysboot.c
+++ b/cmd/sysboot.c
@@ -79,20 +79,20 @@  static int do_sysboot(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 		pxefile_addr_str = argv[4];
 	}
 
-	if (argc < 6)
+	if (argc < 6) {
 		filename = env_get("bootfile");
-	else {
+	} else {
 		filename = argv[5];
 		env_set("bootfile", filename);
 	}
 
-	if (strstr(argv[3], "ext2"))
+	if (strstr(argv[3], "ext2")) {
 		do_getfile = do_get_ext2;
-	else if (strstr(argv[3], "fat"))
+	} else if (strstr(argv[3], "fat")) {
 		do_getfile = do_get_fat;
-	else if (strstr(argv[3], "any"))
+	} else if (strstr(argv[3], "any")) {
 		do_getfile = do_get_any;
-	else {
+	} else {
 		printf("Invalid filesystem: %s\n", argv[3]);
 		return 1;
 	}
@@ -111,7 +111,7 @@  static int do_sysboot(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 
 	cfg = parse_pxefile(cmdtp, pxefile_addr_r);
 
-	if (cfg == NULL) {
+	if (!cfg) {
 		printf("Error parsing config file\n");
 		return 1;
 	}
@@ -126,10 +126,9 @@  static int do_sysboot(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 	return 0;
 }
 
-U_BOOT_CMD(
-	sysboot, 7, 1, do_sysboot,
-	"command to get and boot from syslinux files",
-	"[-p] <interface> <dev[:part]> <ext2|fat|any> [addr] [filename]\n"
-	"    - load and parse syslinux menu file 'filename' from ext2, fat\n"
-	"      or any filesystem on 'dev' on 'interface' to address 'addr'"
+U_BOOT_CMD(sysboot, 7, 1, do_sysboot,
+	   "command to get and boot from syslinux files",
+	   "[-p] <interface> <dev[:part]> <ext2|fat|any> [addr] [filename]\n"
+	   "    - load and parse syslinux menu file 'filename' from ext2, fat\n"
+	   "      or any filesystem on 'dev' on 'interface' to address 'addr'"
 );