Commit 8f6a15f0 authored by Linus Torvalds's avatar Linus Torvalds

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
parents 3eb3c33c 88a1fc21
// SPDX-License-Identifier: GPL-2.0-only // 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 // Keywords: pm_runtime
// Confidence: Medium // Confidence: Medium
......
...@@ -50,11 +50,26 @@ func(...) ...@@ -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@ @rmin depends on !patch@
identifier func; identifier func;
expression x, y; expression x, y;
binary operator cmp = {<, <=}; binary operator cmp = {<, <=};
position p; position p != errcode.p;
@@ @@
func(...) func(...)
...@@ -116,21 +131,6 @@ 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@ @pmin depends on patch@
identifier func; identifier func;
expression x, y; expression x, y;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment