Patchwork [7/7] mtd: nand: mxc_nand: mark 'const' properly

login
register
mail settings
Submitter Jingoo Han
Date Aug. 7, 2013, 7:18 a.m.
Message ID <004701ce933e$5eea6c80$1cbf4580$@samsung.com>
Download mbox | patch
Permalink /patch/265363/
State Accepted
Commit b2ac0376107b9350fbaf5abd94d33c4a07aa86c0
Headers show

Comments

Jingoo Han - Aug. 7, 2013, 7:18 a.m.
The values pointed by the pointer are used as read-only.
Also, mtd_device_parse_register() uses 'part_probes[]' as
the second argument which is defined as 'const char * const *types'.
Thus, the 'const' should be moved to be after the '*'.

drivers/mtd/nand/mxc_nand.c:269:25: warning: duplicate const

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
 drivers/mtd/nand/mxc_nand.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch

diff --git a/drivers/mtd/nand/mxc_nand.c b/drivers/mtd/nand/mxc_nand.c
index 0581bd3..1677d89 100644
--- a/drivers/mtd/nand/mxc_nand.c
+++ b/drivers/mtd/nand/mxc_nand.c
@@ -266,7 +266,7 @@  static struct nand_ecclayout nandv2_hw_eccoob_4k = {
 	}
 };
 
-static const char const *part_probes[] = {
+static const char * const part_probes[] = {
 	"cmdlinepart", "RedBoot", "ofpart", NULL };
 
 static void memcpy32_fromio(void *trg, const void __iomem  *src, size_t size)