of: mtd: nuke useless const qualifier
PATCH 1/1 of: mtd: nuke useless const qualifier
From: Artem Bityutskiy <[email protected]>
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 function return type [-Wignored-qualifiers]
Remove also the unnecessary "extern" qualifier to be consistent with other declarations in this file.
--- drivers/of/of_mtd.c | 2 +- include/linux/of_mtd.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/of/of_mtd.c +1 -1
@@ -32,7 +32,7 @@ static const char *nand_ecc_modes[] = {* The function gets ecc mode string from property 'nand-ecc-mode', * and return its index in nand_ecc_modes table, or errno in error case. */ -const int of_get_nand_ecc_mode (struct device_node *np) +int of_get_nand_ecc_mode (struct device_node *np) {const char *pm;int err, i;
include/linux/of_mtd.h +1 -1
@@ -11,7 +11,7 @@#ifdef CONFIG_OF_MTD #include <linux/of.h> -extern const int of_get_nand_ecc_mode (struct device_node *np); +int of_get_nand_ecc_mode (struct device_node *np);int of_get_nand_bus_width (struct device_node *np);bool of_get_nand_on_flash_bbt (struct device_node *np);#endif
Signature · 1 line
1.7.10
---------------------------------------------------------------------
Intel Finland Oy
Registered Address: PL 281, 00181 Helsinki
Business Identity Code: 0357606 - 4
Domiciled in Helsinki
This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.
Rob Herring
AppliedQuoted 12 lines · Artem
From: Artem Bityutskiy <[email protected]>
This patch does the following:
-const intof_get_nand_ecc_mode(struct device_node *np)+intof_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 function return type [-Wignored-qualifiers]
Quoted 5 lines
Remove also the unnecessary "extern" qualifier to be consistent with other declarations in this file.
Signed-off-by Artem Bityutskiy <[email protected]>---
Applied. Next time please don't PGP sign patches.
Rob
Quoted 44 lines
drivers/of/of_mtd.c | 2 +- include/linux/of_mtd.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)drivers/of/of_mtd.c +1
-1@@ -32,7 +32,7 @@ static const char *nand_ecc_modes[] = {* The function gets ecc mode string from property 'nand-ecc-mode', * and return its index in nand_ecc_modes table, or errno in error case. */ -const int of_get_nand_ecc_mode (struct device_node *np) +int of_get_nand_ecc_mode (struct device_node *np) {const char *pm;int err, i;include/linux/of_mtd.h +1
-2@@ -11,7 +11,7 @@#ifdef CONFIG_OF_MTD #include <linux/of.h> -extern const int of_get_nand_ecc_mode (struct device_node *np); +int of_get_nand_ecc_mode (struct device_node *np);int of_get_nand_bus_width (struct device_node *np);bool of_get_nand_on_flash_bbt (struct device_node *np);#endif ---------------------------------------------------------------------Intel Finland Oy
Registered Address: PL 281, 00181 Helsinki
Business Identity Code: 0357606 - 4
Domiciled in HelsinkiThis e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.
Quoted 7 lines · Rob Herring
Quoted 5 lines
Remove also the unnecessary "extern" qualifier to be consistent with other declarations in this file.
Signed-off-by Artem Bityutskiy <[email protected]>---
Applied. Next time please don't PGP sign patches.
Thanks. Sure, I'll try.
Signature · 2 lines
Best Regards, Artem Bityutskiy
---------------------------------------------------------------------
Intel Finland Oy
Registered Address: PL 281, 00181 Helsinki
Business Identity Code: 0357606 - 4
Domiciled in Helsinki
This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.