> I don't know why you would even expect this to work.

I suggest to take another look at related information sources.
https://en.cppreference.com/w/c/language/struct_initialization


> .remove is not a mainingful construct in the C language.

I got an other impression from the declaration of a known data structure.
https://elixir.bootlin.com/linux/v5.4-rc2/source/include/linux/platform_device.h#L188
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/linux/platform_device.h?id=153a971ff578e9c8c5eadc9463c1d73a6adc8693#n190


> It is part of one, but it is not a construct by itself.

I am trying to improve source code analysis also around the usage
of function pointers.

But I have found some interesting information by the following search approach.

@find@
identifier action, driver;
@@
 static struct platform_driver driver =
 {
 ...,
 .remove = action,
 ...
 };

@display@
identifier find.action;
type T;
@@
 T action(...)
 {
 <+...
*kfree(...);
 ...+>
 }


So I guess that the clarification can become more interesting also for
the influence of commas and related SmPL constructs.

Regards,
Markus
_______________________________________________
Cocci mailing list
[email protected]
https://systeme.lip6.fr/mailman/listinfo/cocci

Reply via email to