pxa3xx_nand: fix compile warning
PATCH 2/29 pxa3xx_nand: fix compile warning
PATCH 2/29 pxa3xx_nand: fix compile warning
Quoted 18 lines · Haojian Zhuang
From
c374a3f27c56f9112b97960eaa3194a08db6f4a4Mon 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 warningThe compile output as below:
WARNING: modpost: Found 1 section mismatch(es).Signed-off-by Lei Wen <[email protected]>---
?drivers/mtd/nand/pxa3xx_nand.c | ? ?2 +-
?1 files changed, 1 insertions(+), 1 deletions(-)drivers/mtd/nand/pxa3xx_nand.c +0
-0
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
PATCH 2/29 pxa3xx_nand: fix compile warning
Quoted 23 lines · Eric Miao
Quoted 21 lines · Haojian Zhuang
From
c374a3f27c56f9112b97960eaa3194a08db6f4a4Mon 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 warningThe compile output as below:
WARNING: modpost: Found 1 section mismatch(es).Signed-off-by Lei Wen <[email protected]>---
?drivers/mtd/nand/pxa3xx_nand.c | ? ?2 +-
?1 files changed, 1 insertions(+), 1 deletions(-)drivers/mtd/nand/pxa3xx_nand.c +0
-0@@ -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...
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
c374a3f27c56f9112b97960eaa3194a08db6f4a4Mon 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 warningThe compile output as below:
WARNING: modpost: Found 1 section mismatch(es).Signed-off-by Lei Wen <[email protected]>---
?drivers/mtd/nand/pxa3xx_nand.c | ? ?2 +-
?1 files changed, 1 insertions(+), 1 deletions(-)drivers/mtd/nand/pxa3xx_nand.c +0
-0@@ -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
__devinitis 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.