Hello,
with the attached semantic patch coccinelle (from Debian; version
0.2.5.deb-3) barfs with:
~/linux$ spatch -sp_file platform_device_register_full.cocci
arch/arm/plat-mxc/devices/platform-fec.c
init_defs_builtins: /usr/share/coccinelle/standard.h
424 425
Fatal error: exception Failure("plus: parse error:
= File "platform_device_register_full.cocci", line 7, column 62,
charpos = 424
around = '{', whole content =
+platform_device_register_full(&((struct platform_device_info){ .name = Ename,
.id = Eid, .res = Eres, .num_res
I admit not having tested a newer version of coccinelle, but scanning
the changelog suggests that this is not "fixed" in later versions.
I havn't looked into coccinelle's code, but I imagine that it shouldn't
be too hard to add support for that construct given some knowledge of
the code.
I'd be happy to test patches that add support for that.
Having said that it's entirely possible that I'm just unable to tell
coccinelle what I want from it, so suggestions to fix the semantic patch
are welcome, too, of course.
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | http://www.pengutronix.de/ |
// +platform_device_register_full(&((struct platform_device_info){ .name =
Ename, .id = Eid, .res = Eres, .num_res = Enum_res, .data = Edata, .size_data =
Esize_data, .dma_mask = Edma_mask, }));
@@
expression Ename, Eid, Eres, Enum_res, Edata, Esize_data, Edma_mask;
@@
-imx_add_platform_device_dmamask(Ename, Eid, Eres, Enum_res, Edata, Esize_data,
Edma_mask)
+platform_device_register_full(&((struct platform_device_info){ .name = Ename,
.id = Eid, .res = Eres, .num_res = Enum_res, .data = Edata, .size_data =
Esize_data, .dma_mask = Edma_mask, }))
_______________________________________________
Cocci mailing list
[email protected]
http://lists.diku.dk/mailman/listinfo/cocci
(Web access from inside DIKUs LAN only)