Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=a7a0475497f9018e2e28cd421ee467d2ad68643e
Commit:     a7a0475497f9018e2e28cd421ee467d2ad68643e
Parent:     90bc61359de0148f8627073d68a22edc7ed9893d
Author:     Tejun Heo <[EMAIL PROTECTED]>
AuthorDate: Thu Aug 2 21:38:02 2007 +0900
Committer:  Greg Kroah-Hartman <[EMAIL PROTECTED]>
CommitDate: Fri Oct 12 14:51:03 2007 -0700

    sysfs: cosmetic changes in sysfs_lookup()
    
    * remove space between * and symbol name in variable declaration.
    
    * kill unnecessary new line.
    
    * kill 'found' and test 'sd' instead.
    
    Signed-off-by: Tejun Heo <[EMAIL PROTECTED]>
    Acked-by: Cornelia Huck <[EMAIL PROTECTED]>
    Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>
---
 fs/sysfs/dir.c |   15 +++++----------
 1 files changed, 5 insertions(+), 10 deletions(-)

diff --git a/fs/sysfs/dir.c b/fs/sysfs/dir.c
index 837073d..5da8da8 100644
--- a/fs/sysfs/dir.c
+++ b/fs/sysfs/dir.c
@@ -756,24 +756,19 @@ static struct dentry * sysfs_lookup(struct inode *dir, 
struct dentry *dentry,
                                struct nameidata *nd)
 {
        struct dentry *ret = NULL;
-       struct sysfs_dirent * parent_sd = dentry->d_parent->d_fsdata;
-       struct sysfs_dirent * sd;
+       struct sysfs_dirent *parent_sd = dentry->d_parent->d_fsdata;
+       struct sysfs_dirent *sd;
        struct bin_attribute *bin_attr;
        struct inode *inode;
-       int found = 0;
 
        mutex_lock(&sysfs_mutex);
 
-       for (sd = parent_sd->s_children; sd; sd = sd->s_sibling) {
-               if (sysfs_type(sd) &&
-                   !strcmp(sd->s_name, dentry->d_name.name)) {
-                       found = 1;
+       for (sd = parent_sd->s_children; sd; sd = sd->s_sibling)
+               if (sysfs_type(sd) && !strcmp(sd->s_name, dentry->d_name.name))
                        break;
-               }
-       }
 
        /* no such entry */
-       if (!found)
+       if (!sd)
                goto out_unlock;
 
        /* attach dentry and inode */
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to