Hello, I tried spatch command again with few other files and it ran successfully. (with the same ret.cocci file I sent) spatch --sp-file ret.cocci --no-includes ~/git/kernels/staging/drivers/staging/sm750fb/ddk750_chip.c > ret.out init_defs_builtins: /usr/lib64/coccinelle/standard.h HANDLING: /home/euri/git/kernels/staging/drivers/staging/sm750fb/ddk750_chip.c diff = output of ret.out --- /home/varsha/git/kernels/staging/drivers/staging/sm750fb/ddk750_chip.c +++ /tmp/cocci-output-3058-919028-ddk750_chip.c @@ -397,13 +397,11 @@ unsigned int sm750_format_pll_reg(struct * register. On returning a 32 bit number, the value can be * applied to any PLL in the calling function. */ - reg = PLL_CTRL_POWER | + return PLL_CTRL_POWER | #ifndef VALIDATION_CHIP ((POD << PLL_CTRL_POD_SHIFT) & PLL_CTRL_POD_MASK) | #endif ((OD << PLL_CTRL_OD_SHIFT) & PLL_CTRL_OD_MASK) | ((N << PLL_CTRL_N_SHIFT) & PLL_CTRL_N_MASK) | ((M << PLL_CTRL_M_SHIFT) & PLL_CTRL_M_MASK); - - return reg; } But nothing with dim2_sysfs.c file and even ret.out file is empty. But no errors this time. spatch --sp-file ret.cocci --no-includes ~/git/kernels/staging/drivers/staging/most/hdm-dim2/dim2_sysfs.c > ret.out init_defs_builtins: /usr/lib64/coccinelle/standard.h HANDLING: /home/euri/git/kernels/staging/drivers/staging/most/hdm-dim2/dim2_sysfs.c Does coccinelle need driver to be compiled as a module? As hdm_dim2 driver is not but sm750fb driver is compiled as a module. Does coccinelle require executable file to work? Thanks, Varsha