Skip to contentSkip to conversation

cocci script from 2016 - assignment in if ?

DISCUSSION [email protected] 2 participants 3 messages Jun 25, 2020

lore
Share & tools
lore
#1 lore raw
Quoted 5 lines · On Wed, 24 Jun 2020, [email protected] wrote:

https://lore.kernel.org/patchwork/patch/649705/

Any particular reason this wasn't applied?

I ask because I added something similar recently to checkpatch.

It probably slipped through the cracks at the time the Coccinelle scripts maintainer disappeared. I can check and see if it does anything more than your script.

julia

#2 lore raw
Quoted 5 lines · Julia Lawall
Quoted 2 lines · On Wed, 24 Jun 2020, [email protected] wrote:

https://lore.kernel.org/patchwork/patch/649705/

Quoted 7 lines
Quoted 3 lines

Any particular reason this wasn't applied?

I ask because I added something similar recently to checkpatch.

It probably slipped through the cracks at the time the Coccinelle scripts maintainer disappeared. I can check and see if it does anything more than your script.

The checkpatch thing only works on single lines, so this cocci script looks more whitespace robust but this script doesn't appear to handle code like

	if (!(foo = bar(...)))
		baz;

where the checkpatch thing converts it OK.