Skip to contentSkip to conversation

nds32: add NULL entry to the end of_device_id array

PATCH In review YueHaibing 2 participants 2 messages Aug 7, 2018 – Aug 8, 2018

lore
Share & tools
lore

YueHaibing

author
#0 lore raw

PATCH 1/1 nds32: add NULL entry to the end of_device_id array

Make sure of_device_id tables are NULL terminated. Found by coccinelle spatch "misc/of_table.cocci"

---
 arch/nds32/kernel/atl2c.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
arch/nds32/kernel/atl2c.c +2 -1
index 0c6d031..0c5386e 100644
@@ -9,7 +9,8 @@
 
 void __iomem *atl2c_base;
 static const struct of_device_id atl2c_ids[] __initconst = {
-	{.compatible = "andestech,atl2c",}
+	{.compatible = "andestech,atl2c",},
+	{}
 };
 
 static int __init atl2c_of_init(void)
Signature · 1 line
2.7.0
Acked-by on v1 1/1
#1 lore raw

YueHaibing <[email protected]> 於 2018年8月7日 週二 下午12:03寫道:

Quoted 14 lines

Make sure of_device_id tables are NULL terminated. Found by coccinelle spatch "misc/of_table.cocci"

---
 arch/nds32/kernel/atl2c.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
arch/nds32/kernel/atl2c.c +0 -0
index 0c6d031..0c5386e 100644

arch/nds32/kernel/atl2c.c line 16

Quoted 9 lines
arch/nds32/kernel/atl2c.c +2 -1
@@ -9,7 +9,8 @@
 
 void __iomem *atl2c_base;
 static const struct of_device_id atl2c_ids[] __initconst = {
-       {.compatible = "andestech,atl2c",}
+       {.compatible = "andestech,atl2c",},
+       {}
 };
 
 static int __init atl2c_of_init(void)

Hi Yuehaibing,

Thank you for your patch.