Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759846AbZCaOGW (ORCPT ); Tue, 31 Mar 2009 10:06:22 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755749AbZCaOGM (ORCPT ); Tue, 31 Mar 2009 10:06:12 -0400 Received: from wa-out-1112.google.com ([209.85.146.178]:62327 "EHLO wa-out-1112.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751162AbZCaOGL (ORCPT ); Tue, 31 Mar 2009 10:06:11 -0400 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=xAT1hHSZyJGdFx5T5b85Ug0OnzndaZOqjObp6TwcEpU4hK6ppdADiKgX24leNJof4O JAoHOpp8ZH46EoRPV/eY93wfojKGbqXWvY3Q6nVsYq59GxJX51G1ZNgooH/GZdFzMz37 OJMrYfEam73ae19aEdENABka9Hav3uT5VqmZk= MIME-Version: 1.0 In-Reply-To: <20090331091653.GU28946@ZenIV.linux.org.uk> References: <20090330163619.d08ba85e.akpm@linux-foundation.org> <20090331060423.GR28946@ZenIV.linux.org.uk> <20090331091653.GU28946@ZenIV.linux.org.uk> Date: Tue, 31 Mar 2009 19:35:54 +0530 Message-ID: Subject: Re: [PATCH] : Code cleanup for fs/inode.c as per checkpatch.pl From: Manish Katiyar To: Al Viro Cc: Andrew Morton , trivial@kernel.org, LKML , mkatiyar@gmail.com Content-Type: multipart/mixed; boundary=00163645730a65e08204666ab3f8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 26054 Lines: 621 --00163645730a65e08204666ab3f8 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On Tue, Mar 31, 2009 at 2:46 PM, Al Viro wrote: > On Tue, Mar 31, 2009 at 02:32:37PM +0530, Manish Katiyar wrote: > >> -static struct inode * find_inode(struct super_block * sb, struct hlist_= head *head, int (*test)(struct inode *, void *), void *data) >> +static struct inode *find_inode(struct super_block *sb, struct hlist_he= ad *head, >> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 int (*test)(st= ruct inode *, void *), void *data) > > If you are splitting it, split it all the way, esp. the last line. > >> -static struct inode * get_new_inode(struct super_block *sb, struct hlis= t_head *head, int (*test)(struct inode *, void *), int (*set)(struct inode = *, void *), void *data) >> +static struct inode *get_new_inode(struct super_block *sb, >> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 struct hlist_h= ead *head, >> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 int (*test)(st= ruct inode *, void *), >> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 int (*set)(str= uct inode *, void *), void *data) > > Ditto, and that's even more serious case - here 'void *data' part is > really obfuscated. Hi Al Viro, Thanks for suggestions. Below is the updated patch. I have also attached it= . Code cleanup for fs/inode.c as per checkpatch.pl Before: total: 24 errors, 25 warnings, 1546 lines checked After: total: 0 errors, 0 warnings, 1539 lines checked Signed-off-by: Manish Katiyar --- fs/inode.c | 81 ++++++++++++++++++++++++++------------------------------= ---- 1 files changed, 35 insertions(+), 46 deletions(-) diff --git a/fs/inode.c b/fs/inode.c index 913ab2d..c44b199 100644 --- a/fs/inode.c +++ b/fs/inode.c @@ -98,7 +98,7 @@ static DEFINE_MUTEX(iprune_mutex); */ struct inodes_stat_t inodes_stat; -static struct kmem_cache * inode_cachep __read_mostly; +static struct kmem_cache *inode_cachep __read_mostly; static void wake_up_inode(struct inode *inode) { @@ -123,7 +123,7 @@ struct inode *inode_init_always(struct super_block *sb, struct inode *inode) static struct inode_operations empty_iops; static const struct file_operations empty_fops; - struct address_space * const mapping =3D &inode->i_data; + struct address_space *const mapping =3D &inode->i_data; inode->i_sb =3D sb; inode->i_blkbits =3D sb->s_blocksize_bits; @@ -206,7 +206,7 @@ static struct inode *alloc_inode(struct super_block *sb= ) return NULL; } -void destroy_inode(struct inode *inode) +void destroy_inode(struct inode *inode) { BUG_ON(inode_has_buffers(inode)); security_inode_free(inode); @@ -242,12 +242,11 @@ void inode_init_once(struct inode *inode) mutex_init(&inode->inotify_mutex); #endif } - EXPORT_SYMBOL(inode_init_once); static void init_once(void *foo) { - struct inode * inode =3D (struct inode *) foo; + struct inode *inode =3D (struct inode *) foo; inode_init_once(inode); } @@ -255,7 +254,7 @@ static void init_once(void *foo) /* * inode_lock must be held */ -void __iget(struct inode * inode) +void __iget(struct inode *inode) { if (atomic_read(&inode->i_count)) { atomic_inc(&inode->i_count); @@ -279,7 +278,7 @@ void clear_inode(struct inode *inode) { might_sleep(); invalidate_inode_buffers(inode); - + BUG_ON(inode->i_data.nrpages); BUG_ON(!(inode->i_state & I_FREEING)); BUG_ON(inode->i_state & I_CLEAR); @@ -293,7 +292,6 @@ void clear_inode(struct inode *inode) cd_forget(inode); inode->i_state =3D I_CLEAR; } - EXPORT_SYMBOL(clear_inode); /* @@ -341,8 +339,8 @@ static int invalidate_list(struct list_head *head, struct list_head *dispose) next =3D head->next; for (;;) { - struct list_head * tmp =3D next; - struct inode * inode; + struct list_head *tmp =3D next; + struct inode *inode; /* * We can reschedule here without worrying about the list's @@ -378,7 +376,7 @@ static int invalidate_list(struct list_head *head, struct list_head *dispose) * fails because there are busy inodes then a non zero value is returned. * If the discard is successful all the inodes have been discarded. */ -int invalidate_inodes(struct super_block * sb) +int invalidate_inodes(struct super_block *sb) { int busy; LIST_HEAD(throw_away); @@ -394,7 +392,6 @@ int invalidate_inodes(struct super_block * sb) return busy; } - EXPORT_SYMBOL(invalidate_inodes); static int can_unuse(struct inode *inode) @@ -490,7 +487,7 @@ static int shrink_icache_memory(int nr, gfp_t gfp_mask) * Nasty deadlock avoidance. We may hold various FS locks, * and we don't want to recurse into the FS that called us * in clear_inode() and friends.. - */ + */ if (!(gfp_mask & __GFP_FS)) return -1; prune_icache(nr); @@ -510,10 +507,13 @@ static void __wait_on_freeing_inode(struct inode *ino= de); * by hand after calling find_inode now! This simplifies iunique and won't * add any additional branch in the common code. */ -static struct inode * find_inode(struct super_block * sb, struct hlist_head *head, int (*test)(struct inode *, void *), void *data) +static struct inode *find_inode(struct super_block *sb, + struct hlist_head *head, + int (*test)(struct inode *, void *), + void *data) { struct hlist_node *node; - struct inode * inode =3D NULL; + struct inode *inode =3D NULL; repeat: hlist_for_each_entry(inode, node, head, i_hash) { @@ -534,10 +534,11 @@ repeat: * find_inode_fast is the fast path version of find_inode, see the comment= at * iget_locked for details. */ -static struct inode * find_inode_fast(struct super_block * sb, struct hlist_head *head, unsigned long ino) +static struct inode *find_inode_fast(struct super_block *sb, + struct hlist_head *head, unsigned long ino) { struct hlist_node *node; - struct inode * inode =3D NULL; + struct inode *inode =3D NULL; repeat: hlist_for_each_entry(inode, node, head, i_hash) { @@ -617,10 +618,10 @@ struct inode *new_inode(struct super_block *sb) * here to attempt to avoid that. */ static unsigned int last_ino; - struct inode * inode; + struct inode *inode; spin_lock_prefetch(&inode_lock); -=09 + inode =3D alloc_inode(sb); if (inode) { spin_lock(&inode_lock); @@ -631,7 +632,6 @@ struct inode *new_inode(struct super_block *sb) } return inode; } - EXPORT_SYMBOL(new_inode); void unlock_new_inode(struct inode *inode) @@ -659,7 +659,6 @@ void unlock_new_inode(struct inode *inode) inode->i_state &=3D ~(I_LOCK|I_NEW); wake_up_inode(inode); } - EXPORT_SYMBOL(unlock_new_inode); /* @@ -668,13 +667,17 @@ EXPORT_SYMBOL(unlock_new_inode); * We no longer cache the sb_flags in i_flags - see fs.h * -- rmk@arm.uk.linux.org */ -static struct inode * get_new_inode(struct super_block *sb, struct hlist_head *head, int (*test)(struct inode *, void *), int (*set)(struct inode *, void *), void *data) +static struct inode *get_new_inode(struct super_block *sb, + struct hlist_head *head, + int (*test)(struct inode *, void *), + int (*set)(struct inode *, void *), + void *data) { - struct inode * inode; + struct inode *inode; inode =3D alloc_inode(sb); if (inode) { - struct inode * old; + struct inode *old; spin_lock(&inode_lock); /* We released the lock, so.. */ @@ -716,13 +719,14 @@ set_failed: * get_new_inode_fast is the fast path version of get_new_inode, see the * comment at iget_locked for details. */ -static struct inode * get_new_inode_fast(struct super_block *sb, struct hlist_head *head, unsigned long ino) +static struct inode *get_new_inode_fast(struct super_block *sb, + struct hlist_head *head, unsigned long ino) { - struct inode * inode; + struct inode *inode; inode =3D alloc_inode(sb); if (inode) { - struct inode * old; + struct inode *old; spin_lock(&inode_lock); /* We released the lock, so.. */ @@ -808,7 +812,6 @@ struct inode *igrab(struct inode *inode) spin_unlock(&inode_lock); return inode; } - EXPORT_SYMBOL(igrab); /** @@ -909,7 +912,6 @@ struct inode *ilookup5_nowait(struct super_block *sb, unsigned long hashval, return ifind(sb, head, test, data, 0); } - EXPORT_SYMBOL(ilookup5_nowait); /** @@ -938,7 +940,6 @@ struct inode *ilookup5(struct super_block *sb, unsigned long hashval, return ifind(sb, head, test, data, 1); } - EXPORT_SYMBOL(ilookup5); /** @@ -961,7 +962,6 @@ struct inode *ilookup(struct super_block *sb, unsigned long ino) return ifind_fast(sb, head, ino); } - EXPORT_SYMBOL(ilookup); /** @@ -1000,7 +1000,6 @@ struct inode *iget5_locked(struct super_block *sb, unsigned long hashval, */ return get_new_inode(sb, head, test, set, data); } - EXPORT_SYMBOL(iget5_locked); /** @@ -1032,7 +1031,6 @@ struct inode *iget_locked(struct super_block *sb, unsigned long ino) */ return get_new_inode_fast(sb, head, ino); } - EXPORT_SYMBOL(iget_locked); int insert_inode_locked(struct inode *inode) @@ -1061,7 +1059,6 @@ int insert_inode_locked(struct inode *inode) iput(old); } } - EXPORT_SYMBOL(insert_inode_locked); int insert_inode_locked4(struct inode *inode, unsigned long hashval, @@ -1091,7 +1088,6 @@ int insert_inode_locked4(struct inode *inode, unsigned long hashval, iput(old); } } - EXPORT_SYMBOL(insert_inode_locked4); /** @@ -1109,7 +1105,6 @@ void __insert_inode_hash(struct inode *inode, unsigned long hashval) hlist_add_head(&inode->i_hash, head); spin_unlock(&inode_lock); } - EXPORT_SYMBOL(__insert_inode_hash); /** @@ -1124,7 +1119,6 @@ void remove_inode_hash(struct inode *inode) hlist_del_init(&inode->i_hash); spin_unlock(&inode_lock); } - EXPORT_SYMBOL(remove_inode_hash); /* @@ -1171,7 +1165,6 @@ void generic_delete_inode(struct inode *inode) BUG_ON(inode->i_state !=3D I_CLEAR); destroy_inode(inode); } - EXPORT_SYMBOL(generic_delete_inode); static void generic_forget_inode(struct inode *inode) @@ -1218,12 +1211,11 @@ void generic_drop_inode(struct inode *inode) else generic_forget_inode(inode); } - EXPORT_SYMBOL_GPL(generic_drop_inode); /* * Called when we're dropping the last reference - * to an inode. + * to an inode. * * Call the FS "drop()" function, defaulting to * the legacy UNIX filesystem behaviour.. @@ -1243,7 +1235,7 @@ static inline void iput_final(struct inode *inode) } /** - * iput - put an inode + * iput - put an inode * @inode: inode to put * * Puts an inode, dropping its usage count. If the inode use count hits @@ -1260,7 +1252,6 @@ void iput(struct inode *inode) iput_final(inode); } } - EXPORT_SYMBOL(iput); /** @@ -1271,10 +1262,10 @@ EXPORT_SYMBOL(iput); * Returns the block number on the device holding the inode that * is the disk block number for the block of the file requested. * That is, asked for block 4 of inode 1 the function will return the - * disk block relative to the disk start that holds that block of the + * disk block relative to the disk start that holds that block of the * file. */ -sector_t bmap(struct inode * inode, sector_t block) +sector_t bmap(struct inode *inode, sector_t block) { sector_t res =3D 0; if (inode->i_mapping->a_ops->bmap) @@ -1377,7 +1368,6 @@ void file_update_time(struct file *file) mark_inode_dirty_sync(inode); mnt_drop_write(file->f_path.mnt); } - EXPORT_SYMBOL(file_update_time); int inode_needs_sync(struct inode *inode) @@ -1388,7 +1378,6 @@ int inode_needs_sync(struct inode *inode) return 1; return 0; } - EXPORT_SYMBOL(inode_needs_sync); int inode_wait(void *word) --=20 1.5.4.3 Thanks - Manish > --00163645730a65e08204666ab3f8 Content-Type: text/x-diff; charset=US-ASCII; name="0001-do-cleanups-in-fs-inode.c.patch" Content-Disposition: attachment; filename="0001-do-cleanups-in-fs-inode.c.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_fsyo5wo70 RnJvbSBhOGJjMzIwOWQ0N2Q5ZWE4ODgwN2Y1NDA0MGZhMjc3YTQ2ODAzNjFkIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBNYW5pc2ggS2F0aXlhciA8bWthdGl5YXJAZ21haWwuY29tPgpE YXRlOiBUdWUsIDMxIE1hciAyMDA5IDE5OjM4OjQ5ICswNTMwClN1YmplY3Q6IFtQQVRDSF0gZG8g Y2xlYW51cHMgaW4gZnMvaW5vZGUuYwoKClNpZ25lZC1vZmYtYnk6IE1hbmlzaCBLYXRpeWFyIDxt a2F0aXlhckBnbWFpbC5jb20+Ci0tLQogZnMvaW5vZGUuYyB8ICAgODEgKysrKysrKysrKysrKysr KysrKysrKysrKystLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tCiAxIGZpbGVzIGNo YW5nZWQsIDM1IGluc2VydGlvbnMoKyksIDQ2IGRlbGV0aW9ucygtKQoKZGlmZiAtLWdpdCBhL2Zz L2lub2RlLmMgYi9mcy9pbm9kZS5jCmluZGV4IDkxM2FiMmQuLmM0NGIxOTkgMTAwNjQ0Ci0tLSBh L2ZzL2lub2RlLmMKKysrIGIvZnMvaW5vZGUuYwpAQCAtOTgsNyArOTgsNyBAQCBzdGF0aWMgREVG SU5FX01VVEVYKGlwcnVuZV9tdXRleCk7CiAgKi8KIHN0cnVjdCBpbm9kZXNfc3RhdF90IGlub2Rl c19zdGF0OwogCi1zdGF0aWMgc3RydWN0IGttZW1fY2FjaGUgKiBpbm9kZV9jYWNoZXAgX19yZWFk X21vc3RseTsKK3N0YXRpYyBzdHJ1Y3Qga21lbV9jYWNoZSAqaW5vZGVfY2FjaGVwIF9fcmVh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gKndvcmQpCi0tIAoxLjUuNC4zCgo= --00163645730a65e08204666ab3f8-- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/