* [PATCH] xfs: get rid of count from xfs_iomap_write_allocate()
@ 2013-09-29 10:56 Jeff Liu
2013-09-29 22:35 ` Dave Chinner
0 siblings, 1 reply; 3+ messages in thread
From: Jeff Liu @ 2013-09-29 10:56 UTC (permalink / raw)
To: xfs@oss.sgi.com
From: Jie Liu <jeff.liu@oracle.com>
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>
---
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(-)
diff --git a/fs/xfs/xfs_aops.c b/fs/xfs/xfs_aops.c
index e51e581..f3f95f0 100644
--- a/fs/xfs/xfs_aops.c
+++ b/fs/xfs/xfs_aops.c
@@ -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);
diff --git a/fs/xfs/xfs_iomap.c b/fs/xfs/xfs_iomap.c
index 8d4d49b..521fdf2 100644
--- a/fs/xfs/xfs_iomap.c
+++ b/fs/xfs/xfs_iomap.c
@@ -655,7 +655,6 @@ int
xfs_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;
diff --git a/fs/xfs/xfs_iomap.h b/fs/xfs/xfs_iomap.h
index 8061576..411fbb8 100644
--- a/fs/xfs/xfs_iomap.h
+++ b/fs/xfs/xfs_iomap.h
@@ -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__*/
--
1.7.9.5
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] xfs: get rid of count from xfs_iomap_write_allocate()
2013-09-29 10:56 [PATCH] xfs: get rid of count from xfs_iomap_write_allocate() Jeff Liu
@ 2013-09-29 22:35 ` Dave Chinner
2013-10-01 20:58 ` Ben Myers
0 siblings, 1 reply; 3+ messages in thread
From: Dave Chinner @ 2013-09-29 22:35 UTC (permalink / raw)
To: Jeff Liu; +Cc: xfs@oss.sgi.com
On Sun, Sep 29, 2013 at 06:56:04PM +0800, Jeff Liu wrote:
> From: Jie Liu <jeff.liu@oracle.com>
>
> 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,
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.
> 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.
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 <dchinner@redhat.com>
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] xfs: get rid of count from xfs_iomap_write_allocate()
2013-09-29 22:35 ` Dave Chinner
@ 2013-10-01 20:58 ` Ben Myers
0 siblings, 0 replies; 3+ messages in thread
From: Ben Myers @ 2013-10-01 20:58 UTC (permalink / raw)
To: Jeff Liu; +Cc: xfs@oss.sgi.com, Dave Chinner
On Mon, Sep 30, 2013 at 08:35:11AM +1000, Dave Chinner wrote:
> On Sun, Sep 29, 2013 at 06:56:04PM +0800, Jeff Liu wrote:
> > From: Jie Liu <jeff.liu@oracle.com>
> >
> > 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,
>
> 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.
>
> > 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.
>
> 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 <dchinner@redhat.com>
Applied.
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-10-01 20:58 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-29 10:56 [PATCH] xfs: get rid of count from xfs_iomap_write_allocate() Jeff Liu
2013-09-29 22:35 ` Dave Chinner
2013-10-01 20:58 ` Ben Myers
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox