From: Jerome Glisse <jglisse@redhat.com>
To: cocci@systeme.lip6.fr
Subject: [Cocci] Changing function pointer typedef
Date: Fri, 8 Mar 2019 13:19:55 -0500 [thread overview]
Message-ID: <20190308181954.GB5618@redhat.com> (raw)
Coccinelle seems to have issue with function pointer. For instance
if i want to add a new argument to a function pointer typdef i need
to replace the whole typedef as one line. For instance:
test.c:
typedef int (*filler_t)(void *, struct page *);
test.spatch:
@@
type T1, T2;
@@
-typedef int (*filler_t)(T1, T2);
+typedef int (*filler_t)(T1, struct address_space *, T2);
Anything else will not work and also if the function pointer typedef
spread accross multiple line then the above does not work, in fact
i have not found a work around for that case.
I am missing some syntax that make this work with coccinelle ?
Cheers,
Jérôme
_______________________________________________
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci
next reply other threads:[~2019-03-08 18:20 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-08 18:19 Jerome Glisse [this message]
2019-03-08 18:57 ` [Cocci] Changing function pointer typedef Julia Lawall
2019-03-08 19:11 ` Jerome Glisse
2019-03-08 19:23 ` Julia Lawall
2019-03-08 19:32 ` Jerome Glisse
2019-03-17 18:43 ` Julia Lawall
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190308181954.GB5618@redhat.com \
--to=jglisse@redhat.com \
--cc=cocci@systeme.lip6.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).