2005-03-26 13:56:25

by Jesper Juhl

[permalink] [raw]
Subject: [PATCH][1/6] cifs: inode.c cleanup - function definitions (whitespace changes only)

Clean up function definitione. Return value on same line as function name,
consistent spacing between arguments, etc.


Signed-off-by: Jesper Juhl <[email protected]>


--- linux-2.6.12-rc1-mm3-orig/fs/cifs/inode.c 2005-03-25 15:28:59.000000000 +0100
+++ linux-2.6.12-rc1-mm3/fs/cifs/inode.c 2005-03-26 00:33:52.000000000 +0100
@@ -30,10 +30,8 @@
#include "cifs_debug.h"
#include "cifs_fs_sb.h"

-int
-cifs_get_inode_info_unix(struct inode **pinode,
- const unsigned char *search_path,
- struct super_block *sb,int xid)
+int cifs_get_inode_info_unix(struct inode **pinode,
+ const unsigned char *search_path, struct super_block *sb, int xid)
{
int rc = 0;
FILE_UNIX_BASIC_INFO findData;
@@ -182,9 +180,9 @@ cifs_get_inode_info_unix(struct inode **
return rc;
}

-int
-cifs_get_inode_info(struct inode **pinode, const unsigned char *search_path,
- FILE_ALL_INFO * pfindData, struct super_block *sb, int xid)
+int cifs_get_inode_info(struct inode **pinode,
+ const unsigned char *search_path, FILE_ALL_INFO *pfindData,
+ struct super_block *sb, int xid)
{
int rc = 0;
struct cifsTconInfo *pTcon;
@@ -353,8 +351,7 @@ cifs_get_inode_info(struct inode **pinod
return rc;
}

-void
-cifs_read_inode(struct inode *inode)
+void cifs_read_inode(struct inode *inode)
{ /* gets root inode */
int xid;
struct cifs_sb_info *cifs_sb;
@@ -369,8 +366,7 @@ cifs_read_inode(struct inode *inode)
_FreeXid(xid);
}

-int
-cifs_unlink(struct inode *inode, struct dentry *direntry)
+int cifs_unlink(struct inode *inode, struct dentry *direntry)
{
int rc = 0;
int xid;
@@ -489,8 +485,7 @@ cifs_unlink(struct inode *inode, struct
return rc;
}

-int
-cifs_mkdir(struct inode *inode, struct dentry *direntry, int mode)
+int cifs_mkdir(struct inode *inode, struct dentry *direntry, int mode)
{
int rc = 0;
int xid;
@@ -556,8 +551,7 @@ cifs_mkdir(struct inode *inode, struct d
return rc;
}

-int
-cifs_rmdir(struct inode *inode, struct dentry *direntry)
+int cifs_rmdir(struct inode *inode, struct dentry *direntry)
{
int rc = 0;
int xid;
@@ -600,9 +594,8 @@ cifs_rmdir(struct inode *inode, struct d
return rc;
}

-int
-cifs_rename(struct inode *source_inode, struct dentry *source_direntry,
- struct inode *target_inode, struct dentry *target_direntry)
+int cifs_rename(struct inode *source_inode, struct dentry *source_direntry,
+ struct inode *target_inode, struct dentry *target_direntry)
{
char *fromName;
char *toName;
@@ -702,8 +695,7 @@ cifs_rename_exit:
return rc;
}

-int
-cifs_revalidate(struct dentry *direntry)
+int cifs_revalidate(struct dentry *direntry)
{
int xid;
int rc = 0;
@@ -826,7 +818,8 @@ cifs_revalidate(struct dentry *direntry)
return rc;
}

-int cifs_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat)
+int cifs_getattr(struct vfsmount *mnt, struct dentry *dentry,
+ struct kstat *stat)
{
int err = cifs_revalidate(dentry);
if (!err)
@@ -855,8 +848,7 @@ static int cifs_truncate_page(struct add
return rc;
}

-int
-cifs_setattr(struct dentry *direntry, struct iattr *attrs)
+int cifs_setattr(struct dentry *direntry, struct iattr *attrs)
{
int xid;
struct cifs_sb_info *cifs_sb;
@@ -1054,8 +1046,7 @@ cifs_setattr(struct dentry *direntry, st
return rc;
}

-void
-cifs_delete_inode(struct inode *inode)
+void cifs_delete_inode(struct inode *inode)
{
cFYI(1, ("In cifs_delete_inode, inode = 0x%p ", inode));
/* may have to add back in if and when safe distributed caching of


2005-03-26 16:44:51

by Alexey Dobriyan

[permalink] [raw]
Subject: Re: [PATCH][1/6] cifs: inode.c cleanup - function definitions (whitespace changes only)

On Saturday 26 March 2005 16:57, Jesper Juhl wrote:
> Clean up function definitione. Return value on same line as function name,
> consistent spacing between arguments, etc.

> --- linux-2.6.12-rc1-mm3-orig/fs/cifs/inode.c
> +++ linux-2.6.12-rc1-mm3/fs/cifs/inode.c

> -int
> -cifs_get_inode_info_unix(struct inode **pinode,
> - const unsigned char *search_path,
> - struct super_block *sb,int xid)
> +int cifs_get_inode_info_unix(struct inode **pinode,
> + const unsigned char *search_path, struct super_block *sb, int xid)

Looks like code in fs/cifs/ align parameters after bracket.

int cifs_get_inode_info_unix(struct inode **pinode,
const unsigned char *search_path,
struct super_block *sb, int xid)


2005-03-26 18:04:31

by Jesper Juhl

[permalink] [raw]
Subject: Re: [PATCH][1/6] cifs: inode.c cleanup - function definitions (whitespace changes only)

On Sat, 26 Mar 2005, Alexey Dobriyan wrote:

> Looks like code in fs/cifs/ align parameters after bracket.
>

When I started doing these cleanups I asked Steve if the form I'd chosen
was OK with him - several styles were in use in different files (and even
within files, so I picked one style to make consistent), and he indicated
that the style I'd picked was OK by him. Once I get through all the files
it'll be consistent throughout.

--
Jesper