Skip to contentSkip to conversation

davinci_nand: fix modular build with CONFIG_OF=y

PATCH In review Sergei Shtylyov 5 participants 5 messages Jan 3, 2013 – Jan 11, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 davinci_nand: fix modular build with CONFIG_OF=y

Commit cdeadd712f52b16a9285386d61ee26fd14eb4085 (mtd: nand: davinci: add OF support for davinci nand controller) has never been really build tested with the driver as a module. When the driver is built-in, the missing semicolon after structure initializer is "compensated" by MODULE_DEVICE_TABLE() macro being empty and so the initializer using the trailing semicolon on the next line; when the driver is built as a module, compilation error ensues, and as the 'davinci_all_defconfig' has the NAND driver modular, this error prevents DaVinci family kernel from building...

---
The patch is atop of the recent Linus' tree.
Sekhar, have you build tested at least 3.8-rc1?

 drivers/mtd/nand/davinci_nand.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mtd/nand/davinci_nand.c +1 -1
Index: linux/drivers/mtd/nand/davinci_nand.c
===================================================================
@@ -523,7 +523,7 @@ static struct nand_ecclayout hwecc4_2048
 static const struct of_device_id davinci_nand_of_match[] = {
 	{.compatible = "ti,davinci-nand", },
 	{},
-}
+};
 MODULE_DEVICE_TABLE(of, davinci_nand_of_match);
 
 static struct davinci_nand_pdata
Acked-by on v2 1/1
#1 lore raw

Hi Sergei,

Quoted 9 lines · Sergei Shtylyov

Commit cdeadd712f52b16a9285386d61ee26fd14eb4085 (mtd: nand: davinci: add OF support for davinci nand controller) has never been really build tested with the driver as a module. When the driver is built-in, the missing semicolon after structure initializer is "compensated" by MODULE_DEVICE_TABLE() macro being empty and so the initializer using the trailing semicolon on the next line; when the driver is built as a module, compilation error ensues, and as the 'davinci_all_defconfig' has the NAND driver modular, this error prevents DaVinci family kernel from building...

Quoted 6 lines

---
The patch is atop of the recent Linus' tree.
Sekhar, have you build tested at least 3.8-rc1?

v3.8-rc2 builds and boots fine. 'make modules' needs your patch, of course. For this patch, FWIW:

Thanks,
Sekhar

Acked-by on v2 1/1
#2 lore raw
In reply to Sergei Shtylyov

Hello Sergei

Quoted 24 lines · Sergei Shtylyov

Commit cdeadd712f52b16a9285386d61ee26fd14eb4085 (mtd: nand: davinci: add OF support for davinci nand controller) has never been really build tested with the driver as a module. When the driver is built-in, the missing semicolon after structure initializer is "compensated" by MODULE_DEVICE_TABLE() macro being empty and so the initializer using the trailing semicolon on the next line; when the driver is built as a module, compilation error ensues, and as the 'davinci_all_defconfig' has the NAND driver modular, this error prevents DaVinci family kernel from building...

---
The patch is atop of the recent Linus' tree.
Sekhar, have you build tested at least 3.8-rc1?

  drivers/mtd/nand/davinci_nand.c |    2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux/drivers/mtd/nand/davinci_nand.c
===================================================================

drivers/mtd/nand/davinci_nand.c static struct nand_ecclayout hwecc4_2048 · line 529

Quoted 8 lines
drivers/mtd/nand/davinci_nand.c +1 -1
@@ -523,7 +523,7 @@ static struct nand_ecclayout hwecc4_2048
  static const struct of_device_id davinci_nand_of_match[] = {
  	{.compatible = "ti,davinci-nand", },
  	{},
-}
+};
  MODULE_DEVICE_TABLE(of, davinci_nand_of_match);
 
  static struct davinci_nand_pdata

Thanks for detecting this!

bye,
Heiko

Signature · 2 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
#3 lore raw
In reply to Sergei Shtylyov

Hello.

Quoted 9 lines · Sergei Shtylyov

Commit cdeadd712f52b16a9285386d61ee26fd14eb4085 (mtd: nand: davinci: add OF support for davinci nand controller) has never been really build tested with the driver as a module. When the driver is built-in, the missing semicolon after structure initializer is "compensated" by MODULE_DEVICE_TABLE() macro being empty and so the initializer using the trailing semicolon on the next line; when the driver is built as a module, compilation error ensues, and as the 'davinci_all_defconfig' has the NAND driver modular, this error prevents DaVinci family kernel from building...

Quoted 5 lines

---
The patch is atop of the recent Linus' tree.

OK, a week has passed. Anybody going to queue this up for 3.8?

WBR, Sergei

#4 lore raw
Quoted 4 lines · Sergei Shtylyov
Quoted 2 lines

The patch is atop of the recent Linus' tree.

OK, a week has passed. Anybody going to queue this up for 3.8?

I've just applied it to my tree; I'll send it in a day or so. Thanks for the reminder.

Signature · 1 line
dwmw2