mtd: nand: mxc_nand: mark 'const' properly

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Fri Aug 30 16:59:05 EDT 2013


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=b2ac0376107b9350fbaf5abd94d33c4a07aa86c0
Commit:     b2ac0376107b9350fbaf5abd94d33c4a07aa86c0
Parent:     9a589c8bad41d117184c0b7d658956d525354af5
Author:     Jingoo Han <jg1.han at samsung.com>
AuthorDate: Wed Aug 7 16:18:52 2013 +0900
Committer:  David Woodhouse <David.Woodhouse at intel.com>
CommitDate: Fri Aug 30 21:51:52 2013 +0100

    mtd: nand: mxc_nand: mark 'const' properly
    
    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 at samsung.com>
    Signed-off-by: Brian Norris <computersforpeace at gmail.com>
    Signed-off-by: David Woodhouse <David.Woodhouse at intel.com>
---
 drivers/mtd/nand/mxc_nand.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mtd/nand/mxc_nand.c b/drivers/mtd/nand/mxc_nand.c
index a99ff1d..ce8242b 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)



More information about the linux-mtd-cvs mailing list