The patch titled fs/char_dev.c: remove useless loop has been added to the -mm tree. Its filename is fs-char_devc-remove-useless-loop.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find out what to do about this The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/ ------------------------------------------------------ Subject: fs/char_dev.c: remove useless loop From: Renzo Davoli <renzo@xxxxxxxxxxx> There are two useless lines in fs/char_dev.c. 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: Renzo Davoli <renzo@xxxxxxxxxxx> Cc: Al Viro <viro@xxxxxxxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- fs/char_dev.c | 2 -- 1 file changed, 2 deletions(-) diff -puN fs/char_dev.c~fs-char_devc-remove-useless-loop fs/char_dev.c --- a/fs/char_dev.c~fs-char_devc-remove-useless-loop +++ a/fs/char_dev.c @@ -278,8 +278,6 @@ int register_chrdev(unsigned int major, cdev->owner = fops->owner; cdev->ops = fops; kobject_set_name(&cdev->kobj, "%s", name); - for (s = strchr(kobject_name(&cdev->kobj),'/'); s; s = strchr(s, '/')) - *s = '!'; err = cdev_add(cdev, MKDEV(cd->major, 0), 256); if (err) _ Patches currently in -mm which might be from renzo@xxxxxxxxxxx are fs-char_devc-remove-useless-loop.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html