xfs: get rid of count from xfs_iomap_write_allocate()
PATCH 1/1 xfs: get rid of count from xfs_iomap_write_allocate()
From: Jie Liu <[email protected]>
Get rid of function variable count from xfs_iomap_write_allocate() as it is unused.
Additionally, checkpatch warn me of the following for this change:
WARNING: extern prototypes should be avoided in .h files +extern int xfs_iomap_write_allocate(struct xfs_inode *, xfs_off_t,
So this patch also remove all extern function prototypes at xfs_iomap.h to suppress it to make this code style in consistent manner in this file.
--- fs/xfs/xfs_aops.c | 2 +- fs/xfs/xfs_iomap.c | 1 - fs/xfs/xfs_iomap.h | 8 ++++---- 3 files changed, 5 insertions(+), 6 deletions(-)
fs/xfs/xfs_aops.c +1 -1
@@ -333,7 +333,7 @@ xfs_map_blocks(if (type ==XFS_IO_DELALLOC && (!nimaps ||isnullstartblock (imap->br_startblock))) { - error =xfs_iomap_write_allocate (ip, offset, count, imap); + error =xfs_iomap_write_allocate (ip, offset, imap);if (!error)trace_xfs_map_blocks_alloc (ip, offset, count, type, imap);return -XFS_ERROR (error);
fs/xfs/xfs_iomap.c +0 -1
@@ -655,7 +655,6 @@ intxfs_iomap_write_allocate ( xfs_inode_t *ip, xfs_off_t offset, - size_t count, xfs_bmbt_irec_t *imap) {xfs_mount_t *mp = ip->i_mount;
fs/xfs/xfs_iomap.h +4 -4
@@ -21,12 +21,12 @@struct xfs_inode ;struct xfs_bmbt_irec ; -extern int xfs_iomap_write_direct (struct xfs_inode *,xfs_off_t ,size_t , +int xfs_iomap_write_direct (struct xfs_inode *,xfs_off_t ,size_t ,struct xfs_bmbt_irec *,int ); -extern int xfs_iomap_write_delay (struct xfs_inode *,xfs_off_t ,size_t , +int xfs_iomap_write_delay (struct xfs_inode *,xfs_off_t ,size_t ,struct xfs_bmbt_irec *); -extern int xfs_iomap_write_allocate (struct xfs_inode *,xfs_off_t ,size_t , +int xfs_iomap_write_allocate (struct xfs_inode *,xfs_off_t ,struct xfs_bmbt_irec *); -extern int xfs_iomap_write_unwritten (struct xfs_inode *,xfs_off_t ,size_t ); +int xfs_iomap_write_unwritten (struct xfs_inode *,xfs_off_t ,size_t );#endif /* __XFS_IOMAP_H__*/
Signature · 6 lines
1.7.9.5 _______________________________________________ xfs mailing list [email protected] http://oss.sgi.com/mailman/listinfo/xfs
Quoted 8 lines · Jeff Liu
From: Jie Liu <[email protected]>
Get rid of function variable count from
xfs_iomap_write_allocate()as it is unused.Additionally, checkpatch warn me of the following for this change:
WARNING: extern prototypes should be avoided in .h files +extern int xfs_iomap_write_allocate(structxfs_inode*,xfs_off_t,
Bah, checkpatch should be considered harmful when run on code that has been around for years. It's a good guide for new code, but...
$ git grep extern fs/xfs/xfs*h |wc -l 345 $ git grep extern include/linux/*h |wc -l 6878 $
.... and the rule of "consistent with existing coding style" when adding code to existing files generally trumps any "style errors" that checkpatch might warn about.
Quoted 2 lines
So this patch also remove all extern function prototypes at
xfs_iomap.hto suppress it to make this code style in consistent manner in this file.
Anyway, it's a cleanup patch to begin with, and there's only a few of them, so it's not worth complaining about.
Cheers,
Dave.
Signature · 7 lines
Dave Chinner [email protected] _______________________________________________ xfs mailing list [email protected] http://oss.sgi.com/mailman/listinfo/xfs
Ben Myers
AppliedQuoted 23 lines · Dave Chinner
Quoted 8 lines · Jeff Liu
From: Jie Liu <[email protected]>
Get rid of function variable count from
xfs_iomap_write_allocate()as it is unused.Additionally, checkpatch warn me of the following for this change:
WARNING: extern prototypes should be avoided in .h files +extern int xfs_iomap_write_allocate(structxfs_inode*,xfs_off_t,Bah, checkpatch should be considered harmful when run on code that has been around for years. It's a good guide for new code, but...
$ git grep extern fs/xfs/xfs*h |wc -l 345 $ git grep extern include/linux/*h |wc -l 6878 $.... and the rule of "consistent with existing coding style" when adding code to existing files generally trumps any "style errors" that checkpatch might warn about.
Quoted 7 lines
Quoted 2 lines
So this patch also remove all extern function prototypes at
xfs_iomap.hto suppress it to make this code style in consistent manner in this file.Anyway, it's a cleanup patch to begin with, and there's only a few of them, so it's not worth complaining about.
Reviewed-by Dave Chinner <[email protected]>
Applied.
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs