All of lore.kernel.org
 help / color / mirror / Atom feed
* [Cocci] Help with SMPL
@ 2012-09-26 14:36 Peter Senna Tschudin
  2012-09-26 15:27 ` Lars-Peter Clausen
  0 siblings, 1 reply; 10+ messages in thread
From: Peter Senna Tschudin @ 2012-09-26 14:36 UTC (permalink / raw)
  To: cocci

Dear List,

I'm trying to make a semantic patch for the case described on the patch:
http://www.mail-archive.com/linux-media at vger.kernel.org/msg52660.html

Some relevant code snippets:

http://lxr.free-electrons.com/source/drivers/media/video/em28xx/em28xx.h#L482
-- // --
struct em28xx {
...
int model;              /* index in the device_data struct */
...
struct em28xx_board board;
...
}
-- // --

http://lxr.free-electrons.com/source/drivers/media/video/em28xx/em28xx.h#L690
-- // --
...
extern struct em28xx_board em28xx_boards[];
...
-- // --

I'm trying the semantic patch:
@@
type T;
expression to,from,flag;
@@
- memcpy((T)&to,(T)&from,flag);
+ to = from;

But it is not working. How can I specify "to" and "from" for match
cases like this?

Thanks,

Peter
-- 
Peter

^ permalink raw reply	[flat|nested] 10+ messages in thread
[parent not found: <CA+MoWDpBor-e+69ioxPH-kWcdnd8iYE3E9aXjC79dNO+_COxeg@mail.gmail.com>]

end of thread, other threads:[~2012-09-27 17:54 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-26 14:36 [Cocci] Help with SMPL Peter Senna Tschudin
2012-09-26 15:27 ` Lars-Peter Clausen
2012-09-26 15:40   ` Ezequiel Garcia
2012-09-26 16:01     ` Lars-Peter Clausen
2012-09-26 16:02       ` Ezequiel Garcia
2012-09-26 16:06       ` Peter Senna Tschudin
2012-09-26 15:57   ` Peter Senna Tschudin
     [not found] <CA+MoWDpBor-e+69ioxPH-kWcdnd8iYE3E9aXjC79dNO+_COxeg@mail.gmail.com>
     [not found] ` <501BEA35.5030008@redhat.com>
     [not found]   ` <501BFA96.6080803@metafoo.de>
     [not found]     ` <alpine.DEB.2.02.1208031832490.2827@hadrien>
     [not found]       ` <501C0878.1010906@metafoo.de>
     [not found]         ` <alpine.DEB.2.02.1208032309470.1928@localhost6.localdomain6>
2012-09-27 15:29           ` [Cocci] Help with SmPL Peter Senna Tschudin
2012-09-27 16:30             ` Håkon Løvdal
2012-09-27 17:54               ` Håkon Løvdal

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.