linux-next: build failure after merge of the nand tree
Hi all,
After merging the nand tree, today's linux-next build (x86_64 allmodconfig) failed like this:
FATAL: modpost: drivers/mtd/nand/raw/ams-delta: sizeof(struct of_device_id)=200 is not a modulo of the size of section __mod_of__<identifier>_device_table=64. Fix definition of struct of_device_id in mod_devicetable.h
Maybe caused by commit
966d708517e3 ("mtd: rawnand: ams-delta: Add module device tables")
But I have no idea why.
I have used the nand tree from next-20200310 for today.
Signature · 2 lines
Cheers, Stephen Rothwell
Hi Stephen,
+ Janusz, ams-delta patch author
Stephen Rothwell <[email protected]> wrote on Wed, 11 Mar 2020 13:16:16 +1100:
Quoted 4 lines
Hi all,
After merging the nand tree, today's linux-next build (
x86_64allmodconfig) failed like this:
Thanks for the report.
Quoted 10 lines
FATAL: modpost:
drivers/mtd/nand/raw/ams-delta:sizeof(struct of_device_id)=200 is not a modulo of the size of section __mod_of__<identifier>_device_table=64. Fix definition of structof_device_idinmod_devicetable.hMaybe caused by commit
966d708517e3("mtd: rawnand: ams-delta: Add module device tables")But I have no idea why.
This is strange. I think this is caused because of the addition of a second device table with the same "of" scope. Changing one of them to "platform" (the legacy one) seems to fix the problem.
Janusz, Is the following change okay for you? I would like to apply it today so that linux-next get's updated with the 50+ stack of new patches by tomorrow.
--- a/drivers/mtd/nand/raw/ams-delta.c
+++ b/drivers/mtd/nand/raw/ams-delta.c
@@ -411,7 +411,7 @@ static const struct platform_device_id gpio_nand_plat_id_table[] = {
/* sentinel */
},
};
-MODULE_DEVICE_TABLE(of, gpio_nand_plat_id_table);
+MODULE_DEVICE_TABLE(platform, gpio_nand_plat_id_table);
static struct platform_driver gpio_nand_driver = {
.probe = gpio_nand_probe,Thanks,
Miquèl
Quoted 25 lines · On Wed, 11 Mar 2020 11:10:41 +0100 Miquel Raynal <[email protected]>…
Hi Stephen,
+ Janusz, ams-delta patch author
Stephen Rothwell <[email protected]> wrote on Wed, 11 Mar 2020 13:16:16 +1100:
Quoted 4 lines
Hi all,
After merging the nand tree, today's linux-next build (
x86_64allmodconfig) failed like this:Thanks for the report.
Quoted 10 lines
FATAL: modpost:
drivers/mtd/nand/raw/ams-delta:sizeof(struct of_device_id)=200 is not a modulo of the size of section __mod_of__<identifier>_device_table=64. Fix definition of structof_device_idinmod_devicetable.hMaybe caused by commit
966d708517e3("mtd: rawnand: ams-delta: Add module device tables")But I have no idea why.
Quoted 7 lines
This is strange. I think this is caused because of the addition of a second device table with the same "of" scope. Changing one of them to "platform" (the legacy one) seems to fix the problem.
Janusz, Is the following change okay for you? I would like to apply it today so that linux-next get's updated with the 50+ stack of new patches by tomorrow.
Yep, this change looks good to me, I don't think you need to wait for Janusz' ack to merge it.
Regards,
Boris
Janusz Krzysztofik
Acked-byHi Miquel,
Quoted 33 lines · On Wednesday, March 11, 2020 11:10:41 A.M. CET Miquel Raynal wrote:
Hi Stephen,
+ Janusz, ams-delta patch author
Stephen Rothwell <[email protected]> wrote on Wed, 11 Mar 2020 13:16:16 +1100:
Quoted 4 lines
Hi all,
After merging the nand tree, today's linux-next build (
x86_64allmodconfig) failed like this:Thanks for the report.
Quoted 10 lines
FATAL: modpost:
drivers/mtd/nand/raw/ams-delta:sizeof(struct of_device_id)=200 is not a modulo of the size of section __mod_of__<identifier>_device_table=64. Fix definition of structof_device_idinmod_devicetable.hMaybe caused by commit
966d708517e3("mtd: rawnand: ams-delta: Add module device tables")But I have no idea why.
This is strange. I think this is caused because of the addition of a second device table with the same "of" scope. Changing one of them to "platform" (the legacy one) seems to fix the problem.
Janusz, Is the following change okay for you? I would like to apply it today so that linux-next get's updated with the 50+ stack of new patches by tomorrow.
Quoted 8 lines
--- a/drivers/mtd/nand/raw/ams-delta.c
+++ b/drivers/mtd/nand/raw/ams-delta.c
@@ -411,7 +411,7 @@ static const struct platform_device_id gpio_nand_plat_id_table[] = {
/* sentinel */
},
};
-MODULE_DEVICE_TABLE(of, gpio_nand_plat_id_table);
+MODULE_DEVICE_TABLE(platform, gpio_nand_plat_id_table);Evidently a copy-paste error on my side, sorry for that.
Thanks,
Janusz
Quoted 8 lines
static struct platform_driver gpio_nand_driver = { .probe = gpio_nand_probe,Thanks,
Miquèl