Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

of: mtd: nuke useless const qualifier

This patch does the following:
-const int of_get_nand_ecc_mode(struct device_node *np)
+int of_get_nand_ecc_mode(struct device_node *np)

because:
1. it is probably just a typo?
2. it causes warnings like this when people assing the returned
value to an 'int' variable:
include/linux/of_mtd.h:14:18: warning: type qualifiers ignored on functi=
on return type [-Wignored-qualifiers]

Remove also the unnecessary "extern" qualifier to be consistent with other
declarations in this file.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: Rob Herring <rob.herring@calxeda.com>

authored by

Artem Bityutskiy and committed by
Rob Herring
e95d8aaf 74a7f084

+2 -2
+1 -1
drivers/of/of_mtd.c
··· 32 32 * The function gets ecc mode string from property 'nand-ecc-mode', 33 33 * and return its index in nand_ecc_modes table, or errno in error case. 34 34 */ 35 - const int of_get_nand_ecc_mode(struct device_node *np) 35 + int of_get_nand_ecc_mode(struct device_node *np) 36 36 { 37 37 const char *pm; 38 38 int err, i;
+1 -1
include/linux/of_mtd.h
··· 11 11 12 12 #ifdef CONFIG_OF_MTD 13 13 #include <linux/of.h> 14 - extern const int of_get_nand_ecc_mode(struct device_node *np); 14 + int of_get_nand_ecc_mode(struct device_node *np); 15 15 int of_get_nand_bus_width(struct device_node *np); 16 16 bool of_get_nand_on_flash_bbt(struct device_node *np); 17 17 #endif