public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] of: mtd: nuke useless const qualifier
@ 2012-07-10 13:35 Bityutskiy, Artem
  2012-07-10 15:35 ` Rob Herring
  0 siblings, 1 reply; 3+ messages in thread
From: Bityutskiy, Artem @ 2012-07-10 13:35 UTC (permalink / raw)
  To: rob.herring@calxeda.com, Grant Likely
  Cc: Arnd Bergmann, Linux Kernel Maling List


[-- Attachment #1.1: Type: text/plain, Size: 1732 bytes --]

From: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>

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.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
---
 drivers/of/of_mtd.c    |    2 +-
 include/linux/of_mtd.h |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/of/of_mtd.c b/drivers/of/of_mtd.c
index e7cad62..a27ec94 100644
--- a/drivers/of/of_mtd.c
+++ b/drivers/of/of_mtd.c
@@ -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;
diff --git a/include/linux/of_mtd.h b/include/linux/of_mtd.h
index bae1b60..ed7f267 100644
--- a/include/linux/of_mtd.h
+++ b/include/linux/of_mtd.h
@@ -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
-- 
1.7.10


[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

[-- Attachment #2: Type: text/plain, Size: 464 bytes --]

---------------------------------------------------------------------
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.

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] of: mtd: nuke useless const qualifier
  2012-07-10 13:35 [PATCH] of: mtd: nuke useless const qualifier Bityutskiy, Artem
@ 2012-07-10 15:35 ` Rob Herring
  2012-07-11  5:49   ` Bityutskiy, Artem
  0 siblings, 1 reply; 3+ messages in thread
From: Rob Herring @ 2012-07-10 15:35 UTC (permalink / raw)
  To: Bityutskiy, Artem; +Cc: Grant Likely, Arnd Bergmann, Linux Kernel Maling List

On 07/10/2012 08:35 AM, Bityutskiy, Artem wrote:
> From: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
> 
> 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.
> 
> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
> ---

Applied. Next time please don't PGP sign patches.

Rob

>  drivers/of/of_mtd.c    |    2 +-
>  include/linux/of_mtd.h |    2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/of/of_mtd.c b/drivers/of/of_mtd.c
> index e7cad62..a27ec94 100644
> --- a/drivers/of/of_mtd.c
> +++ b/drivers/of/of_mtd.c
> @@ -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;
> diff --git a/include/linux/of_mtd.h b/include/linux/of_mtd.h
> index bae1b60..ed7f267 100644
> --- a/include/linux/of_mtd.h
> +++ b/include/linux/of_mtd.h
> @@ -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 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.
> 


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] of: mtd: nuke useless const qualifier
  2012-07-10 15:35 ` Rob Herring
@ 2012-07-11  5:49   ` Bityutskiy, Artem
  0 siblings, 0 replies; 3+ messages in thread
From: Bityutskiy, Artem @ 2012-07-11  5:49 UTC (permalink / raw)
  To: Rob Herring; +Cc: Grant Likely, Arnd Bergmann, Linux Kernel Maling List


[-- Attachment #1.1: Type: text/plain, Size: 378 bytes --]

On Tue, 2012-07-10 at 10:35 -0500, Rob Herring wrote:
> > 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>
> > ---
> 
> Applied. Next time please don't PGP sign patches.

Thanks. Sure, I'll try.

-- 
Best Regards,
Artem Bityutskiy

[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

[-- Attachment #2: Type: text/plain, Size: 464 bytes --]

---------------------------------------------------------------------
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.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-07-11  5:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-10 13:35 [PATCH] of: mtd: nuke useless const qualifier Bityutskiy, Artem
2012-07-10 15:35 ` Rob Herring
2012-07-11  5:49   ` Bityutskiy, Artem

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox