Skip to content

Commit e95d8aa

Browse files
dedekindRob Herring
authored andcommitted
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>
1 parent 74a7f08 commit e95d8aa

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

‎drivers/of/of_mtd.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ static const char *nand_ecc_modes[] = {
3232
* The function gets ecc mode string from property 'nand-ecc-mode',
3333
* and return its index in nand_ecc_modes table, or errno in error case.
3434
*/
35-
const int of_get_nand_ecc_mode(struct device_node *np)
35+
int of_get_nand_ecc_mode(struct device_node *np)
3636
{
3737
const char *pm;
3838
int err, i;

‎include/linux/of_mtd.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
#ifdef CONFIG_OF_MTD
1313
#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);
1515
int of_get_nand_bus_width(struct device_node *np);
1616
bool of_get_nand_on_flash_bbt(struct device_node *np);
1717
#endif

0 commit comments

Comments
 (0)