Commit graph

2 commits

Author SHA1 Message Date
Denis Efremov
aeb300c1db coccinelle: misc: minmax: suppress patch generation for err returns
There is a standard idiom for "if 'ret' holds an error, return it":
	return ret < 0 ? ret : 0;

Developers prefer to keep the things as they are because stylistic
change to "return min(ret, 0);" breaks readability.

Let's suppress automatic generation for this type of patches.

Signed-off-by: Denis Efremov <efremov@linux.com>
2021-05-01 21:27:10 +02:00
Denis Efremov
5f66f73b9f coccinelle: misc: add minmax script
Check for opencoded min(), max() implementations.

Signed-off-by: Denis Efremov <efremov@linux.com>
Signed-off-by: Julia Lawall <julia.lawall@inria.fr>
2021-05-01 21:23:56 +02:00