On 10/23/2016 07:44 PM, Jiri Slaby wrote: > On 10/23/2016, 01:42 PM, Wei Yongjun wrote: >> From: Wei Yongjun <weiyongjun1@xxxxxxxxxx> >> >> Make sure pci_device_id tables are NULL terminated. > > We use ARRAY_SIZE here, so this is incorrect. > Yes, you are right. I had fixed the coccinelle script for detect this. // ---------------------------- @r1@ identifier ids; position p; @@ struct pci_device_id ids@p[] = { ... }; @r2@ identifier drv, r1.ids; @@ struct pci_driver drv = { ..., .id_table = ids, ..., }; @depends on r2@ identifier r1.ids, fld; expression E; @@ ( struct pci_device_id ids[] = { ..., { 0, ... }, }; | struct pci_device_id ids[] = { ..., { .fld = 0, }, }; | struct pci_device_id ids[] = { ..., { ..., .fld = E, ... }, + { }, }; | struct pci_device_id ids[] = { ..., { ..., E, ... }, + { }, }; ) // ---------------------------- -- To unsubscribe from this list: send the line "unsubscribe linux-serial" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html