]> git.baikalelectronics.ru Git - kernel.git/commit
stacktrace: Get rid of unneeded '!!' pattern
authorJiri Slaby <jslaby@suse.cz>
Mon, 11 Nov 2019 09:26:47 +0000 (10:26 +0100)
committerIngo Molnar <mingo@kernel.org>
Mon, 11 Nov 2019 09:30:59 +0000 (10:30 +0100)
commit0d1b192ce79bf1879b21897fcf540f0f29272656
treea59be5f1465744855193a24005c3c8572b4f51e2
parente95120855f17a0e33db749c2d26010f7df67b007
stacktrace: Get rid of unneeded '!!' pattern

My commit 3b15373244cf ("stacktrace: Don't skip first entry on
noncurrent tasks") adds one or zero to skipnr by "!!(current == tsk)".

But the C99 standard says:

  The == (equal to) and != (not equal to) operators are
  ...
  Each of the operators yields 1 if the specified relation is true and 0
  if it is false.

So there is no need to prepend the above expression by "!!" -- remove it.

Reported-by: Joe Perches <joe@perches.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: https://lkml.kernel.org/r/20191111092647.27419-1-jslaby@suse.cz
Signed-off-by: Ingo Molnar <mingo@kernel.org>
kernel/stacktrace.c