Skip to contentSkip to conversation

pxa3xx_nand: fix compile warning

PATCH New Haojian Zhuang 3 participants 4 messages Jul 28, 2010 Memory technology devices (MTD)

lore
Share & tools
lore
#1 lore raw

PATCH 2/29 pxa3xx_nand: fix compile warning

Quoted 18 lines · Haojian Zhuang

From c374a3f27c56f9112b97960eaa3194a08db6f4a4 Mon Sep 17 00:00:00 2001
From: Lei Wen <[email protected]>
Date: Tue, 22 Jun 2010 20:19:35 +0800
Subject: [PATCH 02/29] pxa3xx_nand: fix compile warning

The compile output as below:
WARNING: modpost: Found 1 section mismatch(es).

---
?drivers/mtd/nand/pxa3xx_nand.c | ? ?2 +-
?1 files changed, 1 insertions(+), 1 deletions(-)

drivers/mtd/nand/pxa3xx_nand.c +0 -0
index 3ffcbcd..52cec28 100644

drivers/mtd/nand/pxa3xx_nand.c static void pxa3xx_nand_init_mtd(struct mtd_info *mtd, · line 1072

Quoted 5 lines
drivers/mtd/nand/pxa3xx_nand.c +1 -1
@@ -1069,7 +1069,7 @@ static void pxa3xx_nand_init_mtd(struct mtd_info *mtd,
 ? ? ? ?this->chip_delay = 25;
 ?}
 
-static int pxa3xx_nand_probe(struct platform_device *pdev)
+static int __devinit pxa3xx_nand_probe(struct platform_device *pdev)

Ack

Quoted 6 lines
drivers/mtd/nand/pxa3xx_nand.c +0 -1
 ?{
 ? ? ? ?struct pxa3xx_nand_platform_data *pdata;
 ? ? ? ?struct pxa3xx_nand_info *info;
--

1.7.0.4

#2 lore raw

PATCH 2/29 pxa3xx_nand: fix compile warning

Quoted 23 lines · Eric Miao
Quoted 21 lines · Haojian Zhuang

From c374a3f27c56f9112b97960eaa3194a08db6f4a4 Mon Sep 17 00:00:00 2001
From: Lei Wen <[email protected]>
Date: Tue, 22 Jun 2010 20:19:35 +0800
Subject: [PATCH 02/29] pxa3xx_nand: fix compile warning

The compile output as below:
WARNING: modpost: Found 1 section mismatch(es).

---
?drivers/mtd/nand/pxa3xx_nand.c | ? ?2 +-
?1 files changed, 1 insertions(+), 1 deletions(-)

drivers/mtd/nand/pxa3xx_nand.c +0 -0
index 3ffcbcd..52cec28 100644
@@ -1069,7 +1069,7 @@ static void pxa3xx_nand_init_mtd(struct mtd_info *mtd,
 ? ? ? ?this->chip_delay = 25;
 ?}
 
Quoted 4 lines

drivers/mtd/nand/pxa3xx_nand.c static void pxa3xx_nand_init_mtd(struct mtd_info *mtd, · line 1072

Quoted 2 lines
drivers/mtd/nand/pxa3xx_nand.c +1 -1
-static int pxa3xx_nand_probe(struct platform_device *pdev)
+static int __devinit pxa3xx_nand_probe(struct platform_device *pdev)

Ack

__devinit is not always the right thing for this. Not having any attribute is the safest thing. Having any kind of init tag means that there's a circumstance when the function will be freed, and if the function pointer is called...

#3 lore raw

PATCH 2/29 pxa3xx_nand: fix compile warning

Quoted 29 lines · Russell King - ARM Linux
Quoted 23 lines · Eric Miao
Quoted 21 lines · Haojian Zhuang

From c374a3f27c56f9112b97960eaa3194a08db6f4a4 Mon Sep 17 00:00:00 2001
From: Lei Wen <[email protected]>
Date: Tue, 22 Jun 2010 20:19:35 +0800
Subject: [PATCH 02/29] pxa3xx_nand: fix compile warning

The compile output as below:
WARNING: modpost: Found 1 section mismatch(es).

---
?drivers/mtd/nand/pxa3xx_nand.c | ? ?2 +-
?1 files changed, 1 insertions(+), 1 deletions(-)

drivers/mtd/nand/pxa3xx_nand.c +0 -0
index 3ffcbcd..52cec28 100644
@@ -1069,7 +1069,7 @@ static void pxa3xx_nand_init_mtd(struct mtd_info *mtd,
 ? ? ? ?this->chip_delay = 25;
 ?}
 
Quoted 4 lines

drivers/mtd/nand/pxa3xx_nand.c static void pxa3xx_nand_init_mtd(struct mtd_info *mtd, · line 1072

Quoted 2 lines
drivers/mtd/nand/pxa3xx_nand.c +1 -1
-static int pxa3xx_nand_probe(struct platform_device *pdev)
+static int __devinit pxa3xx_nand_probe(struct platform_device *pdev)

Ack

Quoted 5 lines

__devinit is not always the right thing for this. ?Not having any attribute is the safest thing. ?Having any kind of init tag means that there's a circumstance when the function will be freed, and if the function pointer is called...

Should be quite safe if all the NAND devices are registered during the initcall phase, which is normally true. Yet indeed will create problems if they are registered later, e.g. in modules.