On Wed, Mar 31, 2010 at 09:55:55PM +0200, Julia Lawall wrote:
> On Wed, 31 Mar 2010, Frederic Weisbecker wrote:
> 
> > Hi,
> > 
> > I'm trying to fetch all declarations of a variable of a given
> > type and patch one of its field assignment.
> > 
> > In this particular case, I want to do this:
> > 
> > struct file_operations foo = {
> >     .....
> > -   .ioctl = blah,
> > +   .unlocked_ioctl = blah,
> >     .....
> > };
> 
> Make the script as above, but with just three dots each time, instead of 
> five.

Why is that? I thought isomorphism will handle that as placement of struct
members can be random anyhow? Even more, the original patch works fine for me:

HANDLING: drivers/sbus/char/openprom.c
diff = 
diff -u -p a/openprom.c b/openprom.c
--- a/openprom.c 2010-03-31 15:28:17.000000000 +0200
+++ b/openprom.c 2010-04-01 04:31:46.000000000 +0200
@@ -709,7 +709,7 @@ static int openprom_release(struct inode
 static const struct file_operations openprom_fops = {
        .owner =        THIS_MODULE,
        .llseek =       no_llseek,
-       .ioctl =        openprom_ioctl,
+       .unlocked_ioctl = openprom_ioctl,
        .compat_ioctl = openprom_compat_ioctl,
        .open =         openprom_open,
        .release =      openprom_release,

'-parse_cocci' will also give me the same output with and without the '...'?
(using coccinelle 0.2.2 with its standard.h and .iso files)

Confused,

   Wolfram

-- 
Pengutronix e.K.                           | Wolfram Sang                |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

Attachment: signature.asc
Description: Digital signature

_______________________________________________
Cocci mailing list
[email protected]
http://lists.diku.dk/mailman/listinfo/cocci
(Web access from inside DIKUs LAN only)

Reply via email to