On 04/09/2019 10:43, David Laight wrote: > From: Alexey Dobriyan >> Sent: 03 September 2019 19:19 > ... >>> How did you come up with this changeset, did you pickaxe for some regexp? >> >> No, manually, backtracking up to the call chain. >> Maybe I missed a few places. > > Renaming the structure field and getting the compiler to find all the uses can help. > > David > It's a good idea but sadly doesn't cover whatever the config doesn't compile. A safer starting point could be --- @state_var@ struct task_struct *p; identifier var; @@ ( var = p->state | p->state = var ) @@ identifier state_var.var; @@ - var + FIXME --- But I'm hoping we can get something even better from coccinelle, stay tuned... > - > Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK > Registration No: 1397386 (Wales) >