make drivers/mtd/cmdlinepart.c:mtdpart_setup() static
PATCH 1/1 make drivers/mtd/cmdlinepart.c:mtdpart_setup() static
This patch makes the needlessly global mtdpart_setup() static.
drivers/mtd/cmdlinepart.c renamed from drivers/mtd/cmdlinepart.c.old +1 -1
@@ -346,7 +346,7 @@* * This function needs to be visible for bootloaders. */ -int mtdpart_setup (char *s) +static int mtdpart_setup (char *s) { cmdline = s;return 1 ;
drivers/mtd/cmdlinepart.c 2006-06-26 23:18:51.000000000 +0200 line 349
Quoted 12 lines · Adrian Bunk
This patch makes the needlessly global
mtdpart_setup()static.Signed-off-by Adrian Bunk <[email protected]>drivers/mtd/cmdlinepart.c 2006-06-26 23:18:51.000000000 +0200 renamed from drivers/mtd/cmdlinepart.c.old 2006-06-26 23:18:39.000000000 +0200 +1
-1@@ -346,7 +346,7 @@ * * This function needs to be visible for bootloaders. */ -int mtdpart_setup(char *s) +static int mtdpart_setup(char *s)
Patch lacks sufficient explanation. Explain the relevance of the comment immediately above the function declaration, in the context of your patch. Explain your decision to change the behaviour, but not change the comment itself.
Think. Or you will be replaced with a small shell script.
Signature · 1 line
dwmw2
Quoted 5 lines · David Woodhouse
Quoted 4 lines · Adrian Bunk
This patch makes the needlessly global
mtdpart_setup()static.Signed-off-by Adrian Bunk <[email protected]>
Quoted 13 lines
drivers/mtd/cmdlinepart.c 2006-06-26 23:18:51.000000000 +0200 line 349
Quoted 8 lines
drivers/mtd/cmdlinepart.c 2006-06-26 23:18:51.000000000 +0200 renamed from drivers/mtd/cmdlinepart.c.old 2006-06-26 23:18:39.000000000 +0200 +1
-1@@ -346,7 +346,7 @@ * * This function needs to be visible for bootloaders. */ -int mtdpart_setup(char *s) +static int mtdpart_setup(char *s)Patch lacks sufficient explanation. Explain the relevance of the comment immediately above the function declaration, in the context of your patch. Explain your decision to change the behaviour, but not change the comment itself.
My explanation regarding the relevance of the comment is that it seems to be nonsense.
Do I miss something, or why and how should a bootloader access in-kernel functions?
Quoted 1 line
Think. Or you will be replaced with a small shell script.
No problem, I'm waiting for your submission of Adrian 1.0 ;-)
Quoted 1 line
dwmw2
cu
Adrian
Signature · 4 lines
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon SeedQuoted 20 lines · Adrian Bunk
Quoted 5 lines · David Woodhouse
Quoted 4 lines · Adrian Bunk
This patch makes the needlessly global
mtdpart_setup()static.Signed-off-by Adrian Bunk <[email protected]>Quoted 13 lines
drivers/mtd/cmdlinepart.c 2006-06-26 23:18:51.000000000 +0200 line 349
Quoted 8 lines
drivers/mtd/cmdlinepart.c 2006-06-26 23:18:51.000000000 +0200 renamed from drivers/mtd/cmdlinepart.c.old 2006-06-26 23:18:39.000000000 +0200 +1
-1@@ -346,7 +346,7 @@ * * This function needs to be visible for bootloaders. */ -int mtdpart_setup(char *s) +static int mtdpart_setup(char *s)Patch lacks sufficient explanation. Explain the relevance of the comment immediately above the function declaration, in the context of your patch. Explain your decision to change the behaviour, but not change the comment itself.
Quoted 5 lines
My explanation regarding the relevance of the comment is that it seems to be nonsense.
Do I miss something, or why and how should a bootloader access in-kernel functions?
I'm not entirely sure, but allegedly it does -- Juha, can you elaborate?
Signature · 1 line
dwmw2
Quoted 12 lines · David Woodhouse
Quoted 12 lines
Quoted 12 lines
drivers/mtd/cmdlinepart.c 2006-06-26 23:18:51.000000000 +0200 line 349
Quoted 8 lines
drivers/mtd/cmdlinepart.c 2006-06-26 23:18:51.000000000 +0200 renamed from drivers/mtd/cmdlinepart.c.old 2006-06-26 23:18:39.000000000 +0200 +1
-1@@ -346,7 +346,7 @@ * * This function needs to be visible for bootloaders. */ -int mtdpart_setup(char *s) +static int mtdpart_setup(char *s)Patch lacks sufficient explanation. Explain the relevance of the comment immediately above the function declaration, in the context of your patch. Explain your decision to change the behaviour, but not change the comment itself.
Quoted 5 lines
Quoted 3 lines
My explanation regarding the relevance of the comment is that it seems to be nonsense.
Do I miss something, or why and how should a bootloader access in-kernel functions?
I'm not entirely sure, but allegedly it does -- Juha, can you elaborate?
Our bootloader doesn't access in-kernel functions, for obvious reasons.
The comment in cmdlinepart.c is unfortunately inaccurate. The
bootloader does need a mechanism for passing the partition table to the kernel, though. Our partition table is generated on-the-fly by the bootloader to guarantee that each partition gets a certain number of non-bad NAND blocks.
We used to do this by passing the partition table in a string compatible with cmdlinepart syntax. The kernel NAND driver then just passed the string received from the bootloader to mtdpart_setup().
Nowadays there is a better way of doing this, so as far as we are concerned, mtdpart_setup() can be made static again. We'll migrate our MTD drivers to use the platform_data mechanism instead.
Cheers,
Juha
Hello.
Quoted 18 lines · David Woodhouse
Quoted 17 lines
Quoted 17 lines
drivers/mtd/cmdlinepart.c 2006-06-26 23:18:51.000000000 +0200 line 349
Quoted 12 lines
This patch makes the needlessly global
mtdpart_setup()static.Signed-off-by Adrian Bunk <[email protected]>drivers/mtd/cmdlinepart.c 2006-06-26 23:18:51.000000000 +0200 renamed from drivers/mtd/cmdlinepart.c.old 2006-06-26 23:18:39.000000000 +0200 +1
-1@@ -346,7 +346,7 @@ * * This function needs to be visible for bootloaders. */ -int mtdpart_setup(char *s) +static int mtdpart_setup(char *s)Patch lacks sufficient explanation. Explain the relevance of the comment immediately above the function declaration, in the context of your patch. Explain your decision to change the behaviour, but not change the comment itself.
Quoted 5 lines
Quoted 3 lines
My explanation regarding the relevance of the comment is that it seems to be nonsense.
Do I miss something, or why and how should a bootloader access in-kernel functions?
I'm not entirely sure, but allegedly it does -- Juha, can you elaborate?
In addition, this function might be needed to support parsing of the
partition info extracted from the OF device tree (if this way of storing it there will be accepted)...
WBR, Sergei
Quoted 3 lines · Sergei Shtylyov
In addition, this function might be needed to support parsing of the
partition info extracted from the OF device tree (if this way of storing it there will be accepted)...
Yes, we should extend physmap to handle of_devices and partition information represented as a string. It won't be mtdpart_setup() which we use for that though.
Signature · 1 line
dwmw2