<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/scripts/coccinelle/misc/minmax.cocci, branch linux-rolling-stable</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-rolling-stable</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-rolling-stable'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2024-05-20T19:31:20Z</updated>
<entry>
<title>coccinelle: misc: minmax: Suppress reports for err returns</title>
<updated>2024-05-20T19:31:20Z</updated>
<author>
<name>Ricardo Ribalda</name>
<email>ribalda@chromium.org</email>
</author>
<published>2024-04-15T21:15:18Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=e4655196e21fdfb3a3c60e930d48b97a9f3ec693'/>
<id>urn:sha1:e4655196e21fdfb3a3c60e930d48b97a9f3ec693</id>
<content type='text'>
Most of the people prefer:

return ret &lt; 0 ? ret: 0;

than:

return min(ret, 0);

Let's tweak the cocci file to ignore those lines completely.

Signed-off-by: Ricardo Ribalda &lt;ribalda@chromium.org&gt;
Signed-off-by: Julia Lawall &lt;Julia.Lawall@inria.fr&gt;
</content>
</entry>
<entry>
<title>coccinelle: misc: minmax: suppress patch generation for err returns</title>
<updated>2021-05-01T19:27:10Z</updated>
<author>
<name>Denis Efremov</name>
<email>efremov@linux.com</email>
</author>
<published>2021-04-28T06:03:50Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=aeb300c1dbfc77b493728f608dd14d6814676546'/>
<id>urn:sha1:aeb300c1dbfc77b493728f608dd14d6814676546</id>
<content type='text'>
There is a standard idiom for "if 'ret' holds an error, return it":
	return ret &lt; 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 &lt;efremov@linux.com&gt;
</content>
</entry>
<entry>
<title>coccinelle: misc: add minmax script</title>
<updated>2021-05-01T19:23:56Z</updated>
<author>
<name>Denis Efremov</name>
<email>efremov@linux.com</email>
</author>
<published>2021-03-09T06:39:03Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=5f66f73b9ff4dcabd4e2405ba9c32e80e02f9408'/>
<id>urn:sha1:5f66f73b9ff4dcabd4e2405ba9c32e80e02f9408</id>
<content type='text'>
Check for opencoded min(), max() implementations.

Signed-off-by: Denis Efremov &lt;efremov@linux.com&gt;
Signed-off-by: Julia Lawall &lt;julia.lawall@inria.fr&gt;
</content>
</entry>
</feed>
