Skip to content

Commit b86f7c9

Browse files
ranxiaokaimelver
authored andcommitted
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 <[email protected]> Signed-off-by: Marco Elver <[email protected]>
1 parent 59458fa commit b86f7c9

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

kernel/kcsan/debugfs.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,8 +179,7 @@ static ssize_t insert_report_filterlist(const char *func)
179179
}
180180

181181
/* Note: deduplicating should be done in userspace. */
182-
report_filterlist.addrs[report_filterlist.used++] =
183-
kallsyms_lookup_name(func);
182+
report_filterlist.addrs[report_filterlist.used++] = addr;
184183
report_filterlist.sorted = false;
185184

186185
raw_spin_unlock_irqrestore(&report_filterlist_lock, flags);

0 commit comments

Comments
 (0)