From: Andrey Ryabinin Date: Fri, 17 Nov 2017 23:30:42 +0000 (-0800) Subject: kcov: remove pointless current != NULL check X-Git-Tag: v4.19~2135^2~18 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fcf4edac049a8bca41658970292e2dfdbc9d5f62;p=platform%2Fkernel%2Flinux-rpi.git kcov: remove pointless current != NULL check __sanitizer_cov_trace_pc() is a hot code, so it's worth to remove pointless '!current' check. Current is never NULL. Link: http://lkml.kernel.org/r/20170929162221.32500-1-aryabinin@virtuozzo.com Signed-off-by: Andrey Ryabinin Acked-by: Dmitry Vyukov Acked-by: Mark Rutland Cc: Andrey Konovalov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/kernel/kcov.c b/kernel/kcov.c index fc6af9e..d9f9fa9 100644 --- a/kernel/kcov.c +++ b/kernel/kcov.c @@ -62,7 +62,7 @@ void notrace __sanitizer_cov_trace_pc(void) * We are interested in code coverage as a function of a syscall inputs, * so we ignore code executed in interrupts. */ - if (!t || !in_task()) + if (!in_task()) return; mode = READ_ONCE(t->kcov_mode); if (mode == KCOV_MODE_TRACE) {