Skip to content

Commit 8f6a15f

Browse files
committed
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
2 parents 3eb3c33 + 88a1fc2 commit 8f6a15f

File tree

2 files changed

+17
-17
lines changed

2 files changed

+17
-17
lines changed

scripts/coccinelle/api/pm_runtime.cocci

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// SPDX-License-Identifier: GPL-2.0-only
2-
/// Make sure pm_runtime_* calls does not use unnecessary IS_ERR_VALUE
2+
/// Make sure pm_runtime_* calls do not unnecessarily use IS_ERR_VALUE
33
///
44
// Keywords: pm_runtime
55
// Confidence: Medium

scripts/coccinelle/misc/minmax.cocci

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,26 @@ func(...)
5050
...>
5151
}
5252

53+
// Ignore errcode returns.
54+
@errcode@
55+
position p;
56+
identifier func;
57+
expression x;
58+
binary operator cmp = {<, <=};
59+
@@
60+
61+
func(...)
62+
{
63+
<...
64+
return ((x) cmp@p 0 ? (x) : 0);
65+
...>
66+
}
67+
5368
@rmin depends on !patch@
5469
identifier func;
5570
expression x, y;
5671
binary operator cmp = {<, <=};
57-
position p;
72+
position p != errcode.p;
5873
@@
5974

6075
func(...)
@@ -116,21 +131,6 @@ func(...)
116131
...>
117132
}
118133

119-
// Don't generate patches for errcode returns.
120-
@errcode depends on patch@
121-
position p;
122-
identifier func;
123-
expression x;
124-
binary operator cmp = {<, <=};
125-
@@
126-
127-
func(...)
128-
{
129-
<...
130-
return ((x) cmp@p 0 ? (x) : 0);
131-
...>
132-
}
133-
134134
@pmin depends on patch@
135135
identifier func;
136136
expression x, y;

0 commit comments

Comments
 (0)