]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
fuse: style fixes
authorMiklos Szeredi <mszeredi@suse.cz>
Wed, 26 Nov 2008 11:03:54 +0000 (12:03 +0100)
committerMiklos Szeredi <miklos@szeredi.hu>
Wed, 26 Nov 2008 11:03:54 +0000 (12:03 +0100)
Fix coding style errors reported by checkpatch and others.  Uptdate
copyright date to 2008.

Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
fs/fuse/control.c
fs/fuse/dev.c
fs/fuse/dir.c
fs/fuse/file.c
fs/fuse/fuse_i.h
fs/fuse/inode.c

index 4f3cab32141584264789ab3446f962d631ba04ab..99c99dfb03738a17496df4f5ea8e656b0c750e70 100644 (file)
@@ -1,6 +1,6 @@
 /*
   FUSE: Filesystem in Userspace
 /*
   FUSE: Filesystem in Userspace
-  Copyright (C) 2001-2006  Miklos Szeredi <miklos@szeredi.hu>
+  Copyright (C) 2001-2008  Miklos Szeredi <miklos@szeredi.hu>
 
   This program can be distributed under the terms of the GNU GPL.
   See the file COPYING.
 
   This program can be distributed under the terms of the GNU GPL.
   See the file COPYING.
@@ -48,11 +48,13 @@ static ssize_t fuse_conn_waiting_read(struct file *file, char __user *buf,
        size_t size;
 
        if (!*ppos) {
        size_t size;
 
        if (!*ppos) {
+               long value;
                struct fuse_conn *fc = fuse_ctl_file_conn_get(file);
                if (!fc)
                        return 0;
 
                struct fuse_conn *fc = fuse_ctl_file_conn_get(file);
                if (!fc)
                        return 0;
 
-               file->private_data=(void *)(long)atomic_read(&fc->num_waiting);
+               value = atomic_read(&fc->num_waiting);
+               file->private_data = (void *)value;
                fuse_conn_put(fc);
        }
        size = sprintf(tmp, "%ld\n", (long)file->private_data);
                fuse_conn_put(fc);
        }
        size = sprintf(tmp, "%ld\n", (long)file->private_data);
index b72361479be25789e8caa4e6be5febe1f276419e..85a23bb524f71119a1057de65653c2d7e9155d03 100644 (file)
@@ -1,6 +1,6 @@
 /*
   FUSE: Filesystem in Userspace
 /*
   FUSE: Filesystem in Userspace
-  Copyright (C) 2001-2006  Miklos Szeredi <miklos@szeredi.hu>
+  Copyright (C) 2001-2008  Miklos Szeredi <miklos@szeredi.hu>
 
   This program can be distributed under the terms of the GNU GPL.
   See the file COPYING.
 
   This program can be distributed under the terms of the GNU GPL.
   See the file COPYING.
@@ -539,8 +539,8 @@ static int fuse_copy_fill(struct fuse_copy_state *cs)
                BUG_ON(!cs->nr_segs);
                cs->seglen = cs->iov[0].iov_len;
                cs->addr = (unsigned long) cs->iov[0].iov_base;
                BUG_ON(!cs->nr_segs);
                cs->seglen = cs->iov[0].iov_len;
                cs->addr = (unsigned long) cs->iov[0].iov_base;
-               cs->iov ++;
-               cs->nr_segs --;
+               cs->iov++;
+               cs->nr_segs--;
        }
        down_read(&current->mm->mmap_sem);
        err = get_user_pages(current, current->mm, cs->addr, 1, cs->write, 0,
        }
        down_read(&current->mm->mmap_sem);
        err = get_user_pages(current, current->mm, cs->addr, 1, cs->write, 0,
@@ -589,9 +589,11 @@ static int fuse_copy_page(struct fuse_copy_state *cs, struct page *page,
                kunmap_atomic(mapaddr, KM_USER1);
        }
        while (count) {
                kunmap_atomic(mapaddr, KM_USER1);
        }
        while (count) {
-               int err;
-               if (!cs->len && (err = fuse_copy_fill(cs)))
-                       return err;
+               if (!cs->len) {
+                       int err = fuse_copy_fill(cs);
+                       if (err)
+                               return err;
+               }
                if (page) {
                        void *mapaddr = kmap_atomic(page, KM_USER1);
                        void *buf = mapaddr + offset;
                if (page) {
                        void *mapaddr = kmap_atomic(page, KM_USER1);
                        void *buf = mapaddr + offset;
@@ -631,9 +633,11 @@ static int fuse_copy_pages(struct fuse_copy_state *cs, unsigned nbytes,
 static int fuse_copy_one(struct fuse_copy_state *cs, void *val, unsigned size)
 {
        while (size) {
 static int fuse_copy_one(struct fuse_copy_state *cs, void *val, unsigned size)
 {
        while (size) {
-               int err;
-               if (!cs->len && (err = fuse_copy_fill(cs)))
-                       return err;
+               if (!cs->len) {
+                       int err = fuse_copy_fill(cs);
+                       if (err)
+                               return err;
+               }
                fuse_copy_do(cs, &val, &size);
        }
        return 0;
                fuse_copy_do(cs, &val, &size);
        }
        return 0;
index fd03330cadeb135979c5229eb861c89155df8de9..9e7c5385699f410e69c16a95a5bf86e1f30818ee 100644 (file)
@@ -1,6 +1,6 @@
 /*
   FUSE: Filesystem in Userspace
 /*
   FUSE: Filesystem in Userspace
-  Copyright (C) 2001-2006  Miklos Szeredi <miklos@szeredi.hu>
+  Copyright (C) 2001-2008  Miklos Szeredi <miklos@szeredi.hu>
 
   This program can be distributed under the terms of the GNU GPL.
   See the file COPYING.
 
   This program can be distributed under the terms of the GNU GPL.
   See the file COPYING.
@@ -204,7 +204,7 @@ static int fuse_dentry_revalidate(struct dentry *entry, struct nameidata *nd)
                                return 0;
                        }
                        spin_lock(&fc->lock);
                                return 0;
                        }
                        spin_lock(&fc->lock);
-                       fi->nlookup ++;
+                       fi->nlookup++;
                        spin_unlock(&fc->lock);
                }
                fuse_put_request(fc, forget_req);
                        spin_unlock(&fc->lock);
                }
                fuse_put_request(fc, forget_req);
@@ -637,9 +637,11 @@ static int fuse_unlink(struct inode *dir, struct dentry *entry)
        if (!err) {
                struct inode *inode = entry->d_inode;
 
        if (!err) {
                struct inode *inode = entry->d_inode;
 
-               /* Set nlink to zero so the inode can be cleared, if
-                   the inode does have more links this will be
-                   discovered at the next lookup/getattr */
+               /*
+                * Set nlink to zero so the inode can be cleared, if the inode
+                * does have more links this will be discovered at the next
+                * lookup/getattr.
+                */
                clear_nlink(inode);
                fuse_invalidate_attr(inode);
                fuse_invalidate_attr(dir);
                clear_nlink(inode);
                fuse_invalidate_attr(inode);
                fuse_invalidate_attr(dir);
index 34930a964b8258067ec957f9e5ff2a974c09cc58..86054f437d1e71c8e569f46c0db67b7f66cf6ae2 100644 (file)
@@ -1,6 +1,6 @@
 /*
   FUSE: Filesystem in Userspace
 /*
   FUSE: Filesystem in Userspace
-  Copyright (C) 2001-2006  Miklos Szeredi <miklos@szeredi.hu>
+  Copyright (C) 2001-2008  Miklos Szeredi <miklos@szeredi.hu>
 
   This program can be distributed under the terms of the GNU GPL.
   See the file COPYING.
 
   This program can be distributed under the terms of the GNU GPL.
   See the file COPYING.
@@ -543,7 +543,7 @@ static int fuse_readpages_fill(void *_data, struct page *page)
                }
        }
        req->pages[req->num_pages] = page;
                }
        }
        req->pages[req->num_pages] = page;
-       req->num_pages ++;
+       req->num_pages++;
        return 0;
 }
 
        return 0;
 }
 
index 35accfdd747f9fde9c561c4fc081939efadd5497..4fc5131f5c9d266132d72faa254d9b21e5aae5ef 100644 (file)
@@ -1,6 +1,6 @@
 /*
   FUSE: Filesystem in Userspace
 /*
   FUSE: Filesystem in Userspace
-  Copyright (C) 2001-2006  Miklos Szeredi <miklos@szeredi.hu>
+  Copyright (C) 2001-2008  Miklos Szeredi <miklos@szeredi.hu>
 
   This program can be distributed under the terms of the GNU GPL.
   See the file COPYING.
 
   This program can be distributed under the terms of the GNU GPL.
   See the file COPYING.
@@ -355,19 +355,19 @@ struct fuse_conn {
        /** Connection failed (version mismatch).  Cannot race with
            setting other bitfields since it is only set once in INIT
            reply, before any other request, and never cleared */
        /** Connection failed (version mismatch).  Cannot race with
            setting other bitfields since it is only set once in INIT
            reply, before any other request, and never cleared */
-       unsigned conn_error : 1;
+       unsigned conn_error:1;
 
        /** Connection successful.  Only set in INIT */
 
        /** Connection successful.  Only set in INIT */
-       unsigned conn_init : 1;
+       unsigned conn_init:1;
 
        /** Do readpages asynchronously?  Only set in INIT */
 
        /** Do readpages asynchronously?  Only set in INIT */
-       unsigned async_read : 1;
+       unsigned async_read:1;
 
        /** Do not send separate SETATTR request before open(O_TRUNC)  */
 
        /** Do not send separate SETATTR request before open(O_TRUNC)  */
-       unsigned atomic_o_trunc : 1;
+       unsigned atomic_o_trunc:1;
 
        /** Filesystem supports NFS exporting.  Only set in INIT */
 
        /** Filesystem supports NFS exporting.  Only set in INIT */
-       unsigned export_support : 1;
+       unsigned export_support:1;
 
        /*
         * The following bitfields are only for optimization purposes
 
        /*
         * The following bitfields are only for optimization purposes
@@ -375,43 +375,43 @@ struct fuse_conn {
         */
 
        /** Is fsync not implemented by fs? */
         */
 
        /** Is fsync not implemented by fs? */
-       unsigned no_fsync : 1;
+       unsigned no_fsync:1;
 
        /** Is fsyncdir not implemented by fs? */
 
        /** Is fsyncdir not implemented by fs? */
-       unsigned no_fsyncdir : 1;
+       unsigned no_fsyncdir:1;
 
        /** Is flush not implemented by fs? */
 
        /** Is flush not implemented by fs? */
-       unsigned no_flush : 1;
+       unsigned no_flush:1;
 
        /** Is setxattr not implemented by fs? */
 
        /** Is setxattr not implemented by fs? */
-       unsigned no_setxattr : 1;
+       unsigned no_setxattr:1;
 
        /** Is getxattr not implemented by fs? */
 
        /** Is getxattr not implemented by fs? */
-       unsigned no_getxattr : 1;
+       unsigned no_getxattr:1;
 
        /** Is listxattr not implemented by fs? */
 
        /** Is listxattr not implemented by fs? */
-       unsigned no_listxattr : 1;
+       unsigned no_listxattr:1;
 
        /** Is removexattr not implemented by fs? */
 
        /** Is removexattr not implemented by fs? */
-       unsigned no_removexattr : 1;
+       unsigned no_removexattr:1;
 
        /** Are file locking primitives not implemented by fs? */
 
        /** Are file locking primitives not implemented by fs? */
-       unsigned no_lock : 1;
+       unsigned no_lock:1;
 
        /** Is access not implemented by fs? */
 
        /** Is access not implemented by fs? */
-       unsigned no_access : 1;
+       unsigned no_access:1;
 
        /** Is create not implemented by fs? */
 
        /** Is create not implemented by fs? */
-       unsigned no_create : 1;
+       unsigned no_create:1;
 
        /** Is interrupt not implemented by fs? */
 
        /** Is interrupt not implemented by fs? */
-       unsigned no_interrupt : 1;
+       unsigned no_interrupt:1;
 
        /** Is bmap not implemented by fs? */
 
        /** Is bmap not implemented by fs? */
-       unsigned no_bmap : 1;
+       unsigned no_bmap:1;
 
        /** Do multi-page cached writes */
 
        /** Do multi-page cached writes */
-       unsigned big_writes : 1;
+       unsigned big_writes:1;
 
        /** The number of requests waiting for completion */
        atomic_t num_waiting;
 
        /** The number of requests waiting for completion */
        atomic_t num_waiting;
index 2e99f34b44350d4791602ff3ff979fafabc9ad86..739595b4196f8495f02fe893e11e15880324a2b7 100644 (file)
@@ -1,6 +1,6 @@
 /*
   FUSE: Filesystem in Userspace
 /*
   FUSE: Filesystem in Userspace
-  Copyright (C) 2001-2006  Miklos Szeredi <miklos@szeredi.hu>
+  Copyright (C) 2001-2008  Miklos Szeredi <miklos@szeredi.hu>
 
   This program can be distributed under the terms of the GNU GPL.
   See the file COPYING.
 
   This program can be distributed under the terms of the GNU GPL.
   See the file COPYING.
@@ -37,10 +37,10 @@ struct fuse_mount_data {
        unsigned rootmode;
        unsigned user_id;
        unsigned group_id;
        unsigned rootmode;
        unsigned user_id;
        unsigned group_id;
-       unsigned fd_present : 1;
-       unsigned rootmode_present : 1;
-       unsigned user_id_present : 1;
-       unsigned group_id_present : 1;
+       unsigned fd_present:1;
+       unsigned rootmode_present:1;
+       unsigned user_id_present:1;
+       unsigned group_id_present:1;
        unsigned flags;
        unsigned max_read;
        unsigned blksize;
        unsigned flags;
        unsigned max_read;
        unsigned blksize;
@@ -250,7 +250,7 @@ struct inode *fuse_iget(struct super_block *sb, u64 nodeid,
 
        fi = get_fuse_inode(inode);
        spin_lock(&fc->lock);
 
        fi = get_fuse_inode(inode);
        spin_lock(&fc->lock);
-       fi->nlookup ++;
+       fi->nlookup++;
        spin_unlock(&fc->lock);
        fuse_change_attributes(inode, attr, attr_valid, attr_version);
 
        spin_unlock(&fc->lock);
        fuse_change_attributes(inode, attr, attr_valid, attr_version);
 
@@ -553,8 +553,7 @@ static struct inode *get_root_inode(struct super_block *sb, unsigned mode)
        return fuse_iget(sb, 1, 0, &attr, 0, 0);
 }
 
        return fuse_iget(sb, 1, 0, &attr, 0, 0);
 }
 
-struct fuse_inode_handle
-{
+struct fuse_inode_handle {
        u64 nodeid;
        u32 generation;
 };
        u64 nodeid;
        u32 generation;
 };
@@ -952,7 +951,7 @@ static inline void unregister_fuseblk(void)
 
 static void fuse_inode_init_once(void *foo)
 {
 
 static void fuse_inode_init_once(void *foo)
 {
-       struct inode * inode = foo;
+       struct inode *inode = foo;
 
        inode_init_once(inode);
 }
 
        inode_init_once(inode);
 }
@@ -1031,7 +1030,7 @@ static int __init fuse_init(void)
 {
        int res;
 
 {
        int res;
 
-       printk("fuse init (API version %i.%i)\n",
+       printk(KERN_INFO "fuse init (API version %i.%i)\n",
               FUSE_KERNEL_VERSION, FUSE_KERNEL_MINOR_VERSION);
 
        INIT_LIST_HEAD(&fuse_conn_list);
               FUSE_KERNEL_VERSION, FUSE_KERNEL_MINOR_VERSION);
 
        INIT_LIST_HEAD(&fuse_conn_list);