• Renzo Davoli's avatar
    There are two useless lines in fs/char_dev.c. · 3796c12a
    Renzo Davoli authored
    In register_chrdev there is a loop to change all '/' into '!' in the
    kernel object name.
    This code is useless as the same substitution is in kobject_set_name_vargs in
    lib/kobject.c:
    228         /* ewww... some of these buggers have '/' in the name ... */
    229         while ((s = strchr(kobj->name, '/')))
    230                 s[0] = '!';
    
    kobject_set_name_vargs is called by kobject_set_name.
    kobject_set_name is called just above the useless loop.
    Signed-off-by: default avatarRenzo Davoli <renzo@cs.unibo.it>
    Cc: Al Viro <viro@zeniv.linux.org.uk>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    3796c12a
char_dev.c 13.9 KB