Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

xfs: get rid of count from xfs_iomap_write_allocate()

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.

Signed-off-by: Jie Liu <jeff.liu@oracle.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Ben Myers <bpm@sgi.com>

authored by

Jie Liu and committed by
Ben Myers
0799a3e8 aaaae980

+5 -6
+1 -1
fs/xfs/xfs_aops.c
··· 333 333 334 334 if (type == XFS_IO_DELALLOC && 335 335 (!nimaps || isnullstartblock(imap->br_startblock))) { 336 - error = xfs_iomap_write_allocate(ip, offset, count, imap); 336 + error = xfs_iomap_write_allocate(ip, offset, imap); 337 337 if (!error) 338 338 trace_xfs_map_blocks_alloc(ip, offset, count, type, imap); 339 339 return -XFS_ERROR(error);
-1
fs/xfs/xfs_iomap.c
··· 655 655 xfs_iomap_write_allocate( 656 656 xfs_inode_t *ip, 657 657 xfs_off_t offset, 658 - size_t count, 659 658 xfs_bmbt_irec_t *imap) 660 659 { 661 660 xfs_mount_t *mp = ip->i_mount;
+4 -4
fs/xfs/xfs_iomap.h
··· 21 21 struct xfs_inode; 22 22 struct xfs_bmbt_irec; 23 23 24 - extern int xfs_iomap_write_direct(struct xfs_inode *, xfs_off_t, size_t, 24 + int xfs_iomap_write_direct(struct xfs_inode *, xfs_off_t, size_t, 25 25 struct xfs_bmbt_irec *, int); 26 - extern int xfs_iomap_write_delay(struct xfs_inode *, xfs_off_t, size_t, 26 + int xfs_iomap_write_delay(struct xfs_inode *, xfs_off_t, size_t, 27 27 struct xfs_bmbt_irec *); 28 - extern int xfs_iomap_write_allocate(struct xfs_inode *, xfs_off_t, size_t, 28 + int xfs_iomap_write_allocate(struct xfs_inode *, xfs_off_t, 29 29 struct xfs_bmbt_irec *); 30 - extern int xfs_iomap_write_unwritten(struct xfs_inode *, xfs_off_t, size_t); 30 + int xfs_iomap_write_unwritten(struct xfs_inode *, xfs_off_t, size_t); 31 31 32 32 #endif /* __XFS_IOMAP_H__*/