kcsan: Remove redundant call of kallsyms_lookup_name()

There is no need to repeatedly call kallsyms_lookup_name, we can reuse
the return value of this function.

Signed-off-by: Ran Xiaokai <ran.xiaokai@zte.com.cn>
Signed-off-by: Marco Elver <elver@google.com>
This commit is contained in:
Ran Xiaokai 2024-09-25 14:31:51 +00:00 committed by Marco Elver
parent 59458fa4dd
commit b86f7c9fad

View File

@ -179,8 +179,7 @@ static ssize_t insert_report_filterlist(const char *func)
}
/* Note: deduplicating should be done in userspace. */
report_filterlist.addrs[report_filterlist.used++] =
kallsyms_lookup_name(func);
report_filterlist.addrs[report_filterlist.used++] = addr;
report_filterlist.sorted = false;
raw_spin_unlock_irqrestore(&report_filterlist_lock, flags);