Merge tag 'cocci-for-6.10' of git://git.kernel.org/pub/scm/linux/kernel/git/jlawall/linux
Pull coccinelle updates from Julia Lawall: "One patch slightly improves the text in a comment. The other patch (on minmax.cocci) removes a report about ? being used in return statements that has been generating not very useful suggestions to change idiomatic code" * tag 'cocci-for-6.10' of git://git.kernel.org/pub/scm/linux/kernel/git/jlawall/linux: Coccinelle: pm_runtime: Fix grammar in comment coccinelle: misc: minmax: Suppress reports for err returns
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/// Make sure pm_runtime_* calls does not use unnecessary IS_ERR_VALUE
|
||||
/// Make sure pm_runtime_* calls do not unnecessarily use IS_ERR_VALUE
|
||||
///
|
||||
// Keywords: pm_runtime
|
||||
// Confidence: Medium
|
||||
|
||||
@@ -50,11 +50,26 @@ func(...)
|
||||
...>
|
||||
}
|
||||
|
||||
// Ignore errcode returns.
|
||||
@errcode@
|
||||
position p;
|
||||
identifier func;
|
||||
expression x;
|
||||
binary operator cmp = {<, <=};
|
||||
@@
|
||||
|
||||
func(...)
|
||||
{
|
||||
<...
|
||||
return ((x) cmp@p 0 ? (x) : 0);
|
||||
...>
|
||||
}
|
||||
|
||||
@rmin depends on !patch@
|
||||
identifier func;
|
||||
expression x, y;
|
||||
binary operator cmp = {<, <=};
|
||||
position p;
|
||||
position p != errcode.p;
|
||||
@@
|
||||
|
||||
func(...)
|
||||
@@ -116,21 +131,6 @@ func(...)
|
||||
...>
|
||||
}
|
||||
|
||||
// Don't generate patches for errcode returns.
|
||||
@errcode depends on patch@
|
||||
position p;
|
||||
identifier func;
|
||||
expression x;
|
||||
binary operator cmp = {<, <=};
|
||||
@@
|
||||
|
||||
func(...)
|
||||
{
|
||||
<...
|
||||
return ((x) cmp@p 0 ? (x) : 0);
|
||||
...>
|
||||
}
|
||||
|
||||
@pmin depends on patch@
|
||||
identifier func;
|
||||
expression x, y;
|
||||
|
||||
Reference in New Issue
Block a user