* [Cocci] Patch macros
@ 2014-02-14 15:35 Andi Kleen
2014-02-14 15:51 ` Julia Lawall
0 siblings, 1 reply; 4+ messages in thread
From: Andi Kleen @ 2014-02-14 15:35 UTC (permalink / raw)
To: cocci
Hi,
I was trying to replace static asmlinkage with static. However
it always gives a cocci parsing error. I assume the problem is that
asmlinkage is really a macro (for __attribute__((visible)) in
my case). How to handle this in cocci?
Thanks,
-Andi
@@
type T;
@@
- static asmlinkage T
+ static T
--
ak at linux.intel.com -- Speaking for myself only
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Cocci] Patch macros
2014-02-14 15:35 [Cocci] Patch macros Andi Kleen
@ 2014-02-14 15:51 ` Julia Lawall
2014-02-14 19:56 ` Andi Kleen
0 siblings, 1 reply; 4+ messages in thread
From: Julia Lawall @ 2014-02-14 15:51 UTC (permalink / raw)
To: cocci
On Fri, 14 Feb 2014, Andi Kleen wrote:
>
> Hi,
>
> I was trying to replace static asmlinkage with static. However
> it always gives a cocci parsing error. I assume the problem is that
> asmlinkage is really a macro (for __attribute__((visible)) in
> my case). How to handle this in cocci?
Unfortunately, I don't think it is possible. The Coccinelle C parser
doesn't have any notion of asmlinkage, and so it skips over it.
julia
>
> Thanks,
>
> -Andi
>
> @@
> type T;
> @@
> - static asmlinkage T
> + static T
>
>
> --
> ak at linux.intel.com -- Speaking for myself only
> _______________________________________________
> Cocci mailing list
> Cocci at systeme.lip6.fr
> https://systeme.lip6.fr/mailman/listinfo/cocci
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Cocci] Patch macros
2014-02-14 15:51 ` Julia Lawall
@ 2014-02-14 19:56 ` Andi Kleen
2014-02-14 20:14 ` Julia Lawall
0 siblings, 1 reply; 4+ messages in thread
From: Andi Kleen @ 2014-02-14 19:56 UTC (permalink / raw)
To: cocci
On Fri, Feb 14, 2014 at 04:51:18PM +0100, Julia Lawall wrote:
> On Fri, 14 Feb 2014, Andi Kleen wrote:
>
> >
> > Hi,
> >
> > I was trying to replace static asmlinkage with static. However
> > it always gives a cocci parsing error. I assume the problem is that
> > asmlinkage is really a macro (for __attribute__((visible)) in
> > my case). How to handle this in cocci?
>
> Unfortunately, I don't think it is possible. The Coccinelle C parser
> doesn't have any notion of asmlinkage, and so it skips over it.
I was hoping there was a way to tell cocci about the macros.
Ok, back to sed then for this.
Thanks Julia.
-Andi
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Cocci] Patch macros
2014-02-14 19:56 ` Andi Kleen
@ 2014-02-14 20:14 ` Julia Lawall
0 siblings, 0 replies; 4+ messages in thread
From: Julia Lawall @ 2014-02-14 20:14 UTC (permalink / raw)
To: cocci
On Fri, 14 Feb 2014, Andi Kleen wrote:
> On Fri, Feb 14, 2014 at 04:51:18PM +0100, Julia Lawall wrote:
> > On Fri, 14 Feb 2014, Andi Kleen wrote:
> >
> > >
> > > Hi,
> > >
> > > I was trying to replace static asmlinkage with static. However
> > > it always gives a cocci parsing error. I assume the problem is that
> > > asmlinkage is really a macro (for __attribute__((visible)) in
> > > my case). How to handle this in cocci?
> >
> > Unfortunately, I don't think it is possible. The Coccinelle C parser
> > doesn't have any notion of asmlinkage, and so it skips over it.
>
> I was hoping there was a way to tell cocci about the macros.
It can be informed about some macros, but unfortunately in this position
it doesn't expect anything at all. It considers the __attribute__ things
to be nonexistent as well.
julia
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-02-14 20:14 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-14 15:35 [Cocci] Patch macros Andi Kleen
2014-02-14 15:51 ` Julia Lawall
2014-02-14 19:56 ` Andi Kleen
2014-02-14 20:14 ` Julia Lawall
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.