Hi,

using this simple script

===
@@
@@

-       i2c_set_clientdata(..., NULL);
===

I get unwanted empty lines with 0.2.2 if multiple lines are removed. Examples:

HANDLING: drivers/mfd/88pm860x-i2c.c
diff = 
diff -u -p a/88pm860x-i2c.c b/88pm860x-i2c.c
--- a/88pm860x-i2c.c 2010-03-30 06:18:17.000000000 +0200
+++ b/88pm860x-i2c.c 2010-03-30 06:24:24.000000000 +0200
@@ -199,8 +199,7 @@ static int __devexit pm860x_remove(struc
 
        pm860x_device_exit(chip);
        i2c_unregister_device(chip->companion);
-       i2c_set_clientdata(chip->companion, NULL);
-       i2c_set_clientdata(chip->client, NULL);
+       
        kfree(chip);
        return 0;
 }

HANDLING: drivers/mfd/max8925-i2c.c
diff = 
diff -u -p a/max8925-i2c.c b/max8925-i2c.c
--- a/max8925-i2c.c 2010-03-30 06:18:17.000000000 +0200
+++ b/max8925-i2c.c 2010-03-30 06:24:23.000000000 +0200
@@ -172,9 +172,8 @@ static int __devexit max8925_remove(stru
        max8925_device_exit(chip);
        i2c_unregister_device(chip->adc);
        i2c_unregister_device(chip->rtc);
-       i2c_set_clientdata(chip->adc, NULL);
-       i2c_set_clientdata(chip->rtc, NULL);
-       i2c_set_clientdata(chip->i2c, NULL);
+       
+       
        kfree(chip);
        return 0;
 }

Kind regards,

   Wolfram

PS: Would it be acceptable to extend the syntax of -inplace to be similar to
sed (making backups optional)? Something like this:

       -inplace[=SUFFIX]

              edit files in place (makes backup if extension supplied)

Having git, I'd like to drop them as backups are not needed but they make 'git
status' a bit messy.

-- 
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