Commit 8f6a15f0 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
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
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
// 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
+16 −16
Original line number Diff line number Diff line
@@ -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;