Skip to contentSkip to conversation

cmd: ubi: Make ubi_detach() static

PATCH New Stefan Roese 4 participants 4 messages Oct 31, 2018 – Nov 22, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cmd: ubi: Make ubi_detach() static

Its only called from this file, so make it static. While at it, remove some occurances of multiple blank lines as well.

Cc Boris Brezillon <[email protected]>
Cc Miquel Raynal <[email protected]>
Cc Jagan Teki <[email protected]>
---
 cmd/ubi.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
cmd/ubi.c +1 -4
index 2b74a98144..a12ac703eb 100644
@@ -101,7 +101,6 @@ static int ubi_check(char *name)
 	return 1;
 }
 
-
 static int verify_mkvol_req(const struct ubi_device *ubi,
 			    const struct ubi_mkvol_req *req)
 {
@@ -415,7 +414,7 @@ static int ubi_dev_scan(struct mtd_info *info, const char *vid_header_offset)
 	return 0;
 }
 
-int ubi_detach(void)
+static int ubi_detach(void)
 {
 #ifdef CONFIG_CMD_UBIFS
 	/*
@@ -473,7 +472,6 @@ static int do_ubi(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 	if (argc < 2)
 		return CMD_RET_USAGE;
 
-
 	if (strcmp(argv[1], "detach") == 0) {
 		if (argc < 2)
 			return CMD_RET_USAGE;
@@ -481,7 +479,6 @@ static int do_ubi(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 		return ubi_detach();
 	}
 
-
 	if (strcmp(argv[1], "part") == 0) {
 		const char *vid_header_offset = NULL;
 
Signature · 1 line
2.19.1
#1 lore raw

PATCH 1/1 cmd: ubi: Make ubi_detach() static

Stefan Roese <[email protected]> wrote on Wed, 31 Oct 2018 12:37:20 +0100:

Quoted 11 lines

Its only called from this file, so make it static. While at it, remove some occurances of multiple blank lines as well.

Cc Boris Brezillon <[email protected]>
Cc Miquel Raynal <[email protected]>
Cc Jagan Teki <[email protected]>
---
 cmd/ubi.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

Thanks,
Miquèl

#2 lore raw

PATCH 1/1 cmd: ubi: Make ubi_detach() static

In reply to Stefan Roese
Quoted 5 lines · On Wed, 31 Oct 2018 12:37:20 +0100 Stefan Roese <[email protected]> wrote:

Its only called from this file, so make it static. While at it, remove some occurances of multiple blank lines as well.

Cc Boris Brezillon <[email protected]>
Quoted 43 lines
Cc Miquel Raynal <[email protected]>
Cc Jagan Teki <[email protected]>
---
 cmd/ubi.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
cmd/ubi.c +1 -4
index 2b74a98144..a12ac703eb 100644
@@ -101,7 +101,6 @@ static int ubi_check(char *name)
 	return 1;
 }
 
-
 static int verify_mkvol_req(const struct ubi_device *ubi,
 			    const struct ubi_mkvol_req *req)
 {
@@ -415,7 +414,7 @@ static int ubi_dev_scan(struct mtd_info *info, const char *vid_header_offset)
 	return 0;
 }
 
-int ubi_detach(void)
+static int ubi_detach(void)
 {
 #ifdef CONFIG_CMD_UBIFS
 	/*
@@ -473,7 +472,6 @@ static int do_ubi(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 	if (argc < 2)
 		return CMD_RET_USAGE;
 
-
 	if (strcmp(argv[1], "detach") == 0) {
 		if (argc < 2)
 			return CMD_RET_USAGE;
@@ -481,7 +479,6 @@ static int do_ubi(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 		return ubi_detach();
 	}
 
-
 	if (strcmp(argv[1], "part") == 0) {
 		const char *vid_header_offset = NULL;