Skip to content

Commit

Permalink
proc: save LOC in __xlate_proc_name()
Browse files Browse the repository at this point in the history
Can't look at this verbosity anymore.

Link: https://lkml.kernel.org/r/YFYXAp/[email protected]
Signed-off-by: Alexey Dobriyan <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Alexey Dobriyan authored and torvalds committed May 7, 2021
1 parent f4bf74d commit b793cd9
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions fs/proc/generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -166,15 +166,8 @@ static int __xlate_proc_name(const char *name, struct proc_dir_entry **ret,
const char *cp = name, *next;
struct proc_dir_entry *de;

de = *ret;
if (!de)
de = &proc_root;

while (1) {
next = strchr(cp, '/');
if (!next)
break;

de = *ret ?: &proc_root;
while ((next = strchr(cp, '/')) != NULL) {
de = pde_subdir_find(de, cp, next - cp);
if (!de) {
WARN(1, "name '%s'\n", name);
Expand Down

0 comments on commit b793cd9

Please sign in to comment.