Skip to contentSkip to conversation

kcov: remove pointless current != NULL check

PATCH Applied Andrey Ryabinin 1 participant 1 message Sep 29, 2017 KCOV

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 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.

---

Changes since v1:
- Collect acks and drop other patches.

 kernel/kcov.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/kcov.c +1 -1
index 3f693a0f6f3e..d9a4ee1f3423 100644
@@ -61,7 +61,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) {
Signature · 1 line
2.13.6