From: Ran Xiaokai Date: Wed, 25 Sep 2024 14:31:51 +0000 (+0000) Subject: kcsan: Remove redundant call of kallsyms_lookup_name() X-Git-Tag: v6.13-rc1~189^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b86f7c9fad06b960f3ac5594cb3838a7eaeb1892;p=thirdparty%2Fkernel%2Flinux.git 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 Signed-off-by: Marco Elver --- diff --git a/kernel/kcsan/debugfs.c b/kernel/kcsan/debugfs.c index b14072071889f..2af39ba5b70b9 100644 --- a/kernel/kcsan/debugfs.c +++ b/kernel/kcsan/debugfs.c @@ -179,8 +179,7 @@ retry_alloc: } /* 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);