OMAP: NAND: Fix static declaration warning
PATCH v3 1/1 OMAP: NAND: Fix static declaration warning
This patch fixes sparse warning for static declaration of variable "use_dma"
drivers/mtd/nand/omap2.c:114:11: warning: symbol 'use_dma' was not declared. Should it be static?
---
Changes since v1:
- no logical changes, patch seperated from series based Tony's suggestion.
drivers/mtd/nand/omap2.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/mtd/nand/omap2.c +2 -2
@@ -111,11 +111,11 @@ static int use_dma = 1;module_param (use_dma, bool,0 );MODULE_PARM_DESC (use_dma,"enable/disable use of DMA" );#else -const int use_dma; +static const int use_dma;#endif #else const int use_prefetch; -const int use_dma; +static const int use_dma;#endif struct omap_nand_info {
Signature · 1 line
1.7.0.4
PATCH v3 1/1 OMAP2: onenand: Fix static function warnings
Fixes below sparse warning.
drivers/mtd/onenand/omap2.c:577:5: warning: symbol 'omap2_onenand_rephase' was not declared. Should it be static?
---
Changes since v1 and v2:
- no logical changes, patch seperated from series based on Tony's suggestion.
drivers/mtd/onenand/omap2.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/mtd/onenand/omap2.c +1 -1
@@ -574,7 +574,7 @@ static int __adjust_timing(struct device *dev, void *data)return ret; } -int omap2_onenand_rephase (void ) +static int omap2_onenand_rephase (void ) {return driver_for_each_device (&omap2_onenand_driver.driver,NULL ,NULL , __adjust_timing);
Signature · 1 line
1.7.0.4
PATCH v3 1/1 OMAP2/3: NAND: Convert write/read functions to raw read/write
In reply to G, Manjunath KondaiahFollowing sparse warnings exists due to use of writel/w and readl/w functions.
This patch fixes the sparse warnings by converting readl/w functions usage into __raw_readl/__raw_readw functions.
drivers/mtd/nand/omap2.c:484:15: warning: symbol '__v' shadows an earlier one drivers/mtd/nand/omap2.c:484:15: originally declared here
drivers/mtd/onenand/omap2.c:86:9: warning: symbol '__v' shadows an earlier one drivers/mtd/onenand/omap2.c:86:9: originally declared here
---
Changes since v1 and v2:
- no logical changes, patch seperated from series based on Tony's suggestion.
drivers/mtd/nand/omap2.c | 2 +- drivers/mtd/onenand/omap2.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/mtd/nand/omap2.c +1 -1
@@ -481,7 +481,7 @@ static int omap_verify_buf(struct mtd_info *mtd, const u_char * buf, int len) len >>=1 ;while (len--) { -if (*p++ !=cpu_to_le16 (readw (info->nand.IO_ADDR_R))) +if (*p++ !=cpu_to_le16 (__raw_readw (info->nand.IO_ADDR_R)))return -EFAULT ; }
drivers/mtd/onenand/omap2.c +1 -1
@@ -83,7 +83,7 @@ static irqreturn_t omap2_onenand_interrupt(int irq, void *dev_id)static inline unsigned short read_reg (struct omap2_onenand *c,int reg) { -return readw (c->onenand.base + reg); +return __raw_readw (c->onenand.base + reg); } static inline void write_reg(struct omap2_onenand *c, unsigned short value,
Signature · 1 line
1.7.0.4
PATCH v3 1/1 OMAP2/3: NAND: Convert write/read functions to raw read/write
Quoted 8 lines · Manjunath Kondaiah
Following sparse warnings exists due to use of writel/w and readl/w functions.
This patch fixes the sparse warnings by converting readl/w functions usage into __raw_readl/__raw_readw functions.
drivers/mtd/nand/omap2.c:484:15: warning: symbol '__v' shadows an earlier onedrivers/mtd/nand/omap2.c:484:15: originally declared here
Quoted 6 lines
drivers/mtd/onenand/omap2.c:86:9: warning: symbol '__v' shadows an earlier onedrivers/mtd/onenand/omap2.c:86:9: originally declared hereSigned-off-by G, Manjunath Kondaiah <[email protected]>Cc linux-arm-kernel at lists.infradead.orgCc linux-mtd at lists.infradead.org
I've pushed this patch to my l2-mtd-2.6.git.
Signature · 2 lines
Best Regards, Artem Bityutskiy (???????? ?????)
PATCH v3 1/1 TWL IRQ: Fix fucntion declaration warnings
In reply to G, Manjunath KondaiahFixes following sparse warnings for twl4030 and twl6030 irq files.
drivers/mfd/twl4030-irq.c:783:5: warning: symbol 'twl4030_init_irq' was not declared. Should it be static? drivers/mfd/twl4030-irq.c:863:5: warning: symbol 'twl4030_exit_irq' was not declared. Should it be static? drivers/mfd/twl4030-irq.c:873:5: warning: symbol 'twl4030_init_chip_irq' was not declared. Should it be static?
drivers/mfd/twl6030-irq.c:226:5: warning: symbol 'twl6030_init_irq' was not declared. Should it be static? drivers/mfd/twl6030-irq.c:290:5: warning: symbol 'twl6030_exit_irq' was not declared. Should it be static?
---
Changes from v2 to v3:
- Created twl-core.h in drivers/mfd and seperated the patch from sparse fixes based on tony's suggestion.
Changes since v1 to v2:
- no logical change for this patch but sparse fixes series got updated with review comments.
drivers/mfd/twl-core.h | 10 ++++++++++ drivers/mfd/twl4030-irq.c | 1 + drivers/mfd/twl6030-irq.c | 2 ++ 3 files changed, 13 insertions(+), 0 deletions(-) create mode 100644 drivers/mfd/twl-core.h
drivers/mfd/twl-core.h new file +10 -0
@@ -0,0 +1,10 @@ +#ifndef __TWL_CORE_H__ +#define __TWL_CORE_H__ + +extern int twl6030_init_irq (int irq_num,unsigned irq_base,unsigned irq_end); +extern int twl6030_exit_irq (void ); +extern int twl4030_init_irq (int irq_num,unsigned irq_base,unsigned irq_end); +extern int twl4030_exit_irq (void ); +extern int twl4030_init_chip_irq (const char *chip); + +#endif /* __TWL_CORE_H__ */
drivers/mfd/twl4030-irq.c +1 -0
@@ -35,6 +35,7 @@#include <linux/i2c/twl.h> +#include "twl-core.h" /* * TWL4030 IRQ handling has two stages in hardware, and thus in software.
drivers/mfd/twl6030-irq.c +2 -0
@@ -37,6 +37,8 @@#include <linux/kthread.h> #include <linux/i2c/twl.h> +#include "twl-core.h" +/* * TWL6030 (unlike its predecessors, which had two level interrupt handling) * three interrupt registers INT_STS_A, INT_STS_B and INT_STS_C.
Signature · 1 line
1.7.0.4
PATCH v3 1/1 TWL IRQ: Fix fucntion declaration warnings
Hi Samuel,
Quoted 10 lines
-----Original Message-----
From: linux-omap-owner at vger.kernel.org [mailto:linux-omap-owner at vger.kernel.org] On Behalf Of G, Manjunath Kondaiah
Sent: Wednesday, October 06, 2010 3:27 AM
To: linux-omap at vger.kernel.org
Cc: linux-arm-kernel at lists.infradead.org; Samuel Ortiz; Tony Lindgren; Menon, Nishanth
Subject: [PATCH v3] TWL IRQ: Fix fucntion declaration warnings
Quoted 3 lines
Fixes following sparse warnings for twl4030 and twl6030 irq files.
If there are no further comments, can you please push this patch?
-Manjunath
PATCH v3 1/1 TWL IRQ: Fix fucntion declaration warnings
In reply to G, Manjunath KondaiahHi Manjunath,
Quoted 9 lines · Manjunath Kondaiah
Fixes following sparse warnings for twl4030 and twl6030 irq files.
drivers/mfd/twl4030-irq.c:783:5: warning: symbol 'twl4030_init_irq' was not declared. Should it be static?drivers/mfd/twl4030-irq.c:863:5: warning: symbol 'twl4030_exit_irq' was not declared. Should it be static?drivers/mfd/twl4030-irq.c:873:5: warning: symbol 'twl4030_init_chip_irq' was not declared. Should it be static?
drivers/mfd/twl6030-irq.c:226:5: warning: symbol 'twl6030_init_irq' was not declared. Should it be static?drivers/mfd/twl6030-irq.c:290:5: warning: symbol 'twl6030_exit_irq' was not declared. Should it be static?
Patch applied, thanks.
Cheers,
Samuel.
Signature · 2 lines
Intel Open Source Technology Centre http://oss.intel.com/
PATCH v3 1/1 TWL IRQ: Fix fucntion declaration warnings
Quoted 5 lines · Samuel Ortiz
Hi Manjunath,
Quoted 2 lines · Manjunath Kondaiah
Fixes following sparse warnings for twl4030 and twl6030 irq files.
Quoted 8 lines
Quoted 7 lines
drivers/mfd/twl4030-irq.c:783:5: warning: symbol 'twl4030_init_irq' was not declared. Should it be static?drivers/mfd/twl4030-irq.c:863:5: warning: symbol 'twl4030_exit_irq' was not declared. Should it be static?drivers/mfd/twl4030-irq.c:873:5: warning: symbol 'twl4030_init_chip_irq' was not declared. Should it be static?
drivers/mfd/twl6030-irq.c:226:5: warning: symbol 'twl6030_init_irq' was not declared. Should it be static?drivers/mfd/twl6030-irq.c:290:5: warning: symbol 'twl6030_exit_irq' was not declared. Should it be static?Patch applied, thanks.
I didn't get the original patch, so I just now noticed the typo in the Subject. You might want to do s/fucntion/function/
Best regards
Uwe
Signature · 2 lines
Pengutronix e.K. | Uwe Kleine-K?nig | Industrial Linux Solutions | http://www.pengutronix.de/ |
PATCH v3 1/1 TWL IRQ: Fix fucntion declaration warnings
Hi Uwe,
Quoted 10 lines · Uwe Kleine-K?nig
Quoted 9 lines · Samuel Ortiz
Hi Manjunath,
Quoted 6 lines · Manjunath Kondaiah
Fixes following sparse warnings for twl4030 and twl6030 irq files.
drivers/mfd/twl4030-irq.c:783:5: warning: symbol 'twl4030_init_irq' was not declared. Should it be static?drivers/mfd/twl4030-irq.c:863:5: warning: symbol 'twl4030_exit_irq' was not declared. Should it be static?drivers/mfd/twl4030-irq.c:873:5: warning: symbol 'twl4030_init_chip_irq' was not declared. Should it be static?
Quoted 6 lines
Quoted 4 lines
Quoted 3 lines
drivers/mfd/twl6030-irq.c:226:5: warning: symbol 'twl6030_init_irq' was not declared. Should it be static?drivers/mfd/twl6030-irq.c:290:5: warning: symbol 'twl6030_exit_irq' was not declared. Should it be static?Patch applied, thanks.
I didn't get the original patch, so I just now noticed the typo in the Subject. You might want to do s/fucntion/function/
Yes, I noticed as well and fixed it, thanks.
Cheers,
Samuel.
Signature · 2 lines
Intel Open Source Technology Centre http://oss.intel.com/
PATCH v3 1/1 OMAP: NAND: Fix static declaration warning
In reply to G, Manjunath KondaiahQuoted 29 lines · Manjunath Kondaiah
This patch fixes sparse warning for static declaration of variable "
use_dma"
drivers/mtd/nand/omap2.c:114:11: warning: symbol 'use_dma' was not declared. Should it be static?Signed-off-by G, Manjunath Kondaiah <[email protected]>Cc linux-arm-kernel at lists.infradead.orgCc linux-mtd at lists.infradead.orgCc Tony Lindgren <[email protected]>Cc Nishanth Menon <[email protected]>---
Changes since v1:
?- no logical changes, patch seperated from series based Tony's suggestion.?drivers/mtd/nand/omap2.c | ? ?4 ++--
?1 files changed, 2 insertions(+), 2 deletions(-)drivers/mtd/nand/omap2.c +0
-0@@ -111,11 +111,11 @@ static int use_dma = 1; ?module_param(use_dma, bool, 0); ?MODULE_PARM_DESC(use_dma, "enable/disable use of DMA");?#else
drivers/mtd/nand/omap2.c +1
-1-const int use_dma; +static const int use_dma;?#endif
?#else
?const intuse_prefetch;
drivers/mtd/nand/omap2.c
Quoted 2 lines
drivers/mtd/nand/omap2.c +1
-1-const int use_dma; +static const int use_dma;
I did not understand, why did it not pointed same error for 'const int use_prefetch'?
Signature · 2 lines
Regards, Vimal Singh
PATCH v3 1/1 OMAP: NAND: Fix static declaration warning
In reply to G, Manjunath KondaiahQuoted 9 lines · Manjunath Kondaiah
This patch fixes sparse warning for static declaration of variable "
use_dma"
drivers/mtd/nand/omap2.c:114:11: warning: symbol 'use_dma' was not declared. Should it be static?Signed-off-by G, Manjunath Kondaiah <[email protected]>Cc linux-arm-kernel at lists.infradead.orgCc linux-mtd at lists.infradead.orgCc Tony Lindgren <[email protected]>Cc Nishanth Menon <[email protected]>
I've pushed this patch to my l2-mtd-2.6.git.
Signature · 2 lines
Best Regards, Artem Bityutskiy (???????? ?????)