xfs:Make the function,xfs_alloc_lookup_eq static
PATCH 1/12 xfs:Make the function,xfs_alloc_lookup_eq static
This makes the function,xfs_alloc_lookup_eq static as there are no calls to this function outside the definition file for this function, xfs_alloc.c.
--- fs/xfs/libxfs/xfs_alloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/xfs/libxfs/xfs_alloc.c +1 -1
@@ -52,7 +52,7 @@ STATIC int xfs_alloc_ag_vextent_small(xfs_alloc_arg_t *,/* * Lookup the record equal to [bno, len] in the btree given by cur. */ -STATIC int /* error */ +static int /* error */ xfs_alloc_lookup_eq( struct xfs_btree_cur *cur, /* btree cursor */ xfs_agblock_t bno, /* starting block of extent */
Signature · 6 lines
2.1.4 _______________________________________________ xfs mailing list [email protected] http://oss.sgi.com/mailman/listinfo/xfs
PATCH 2/12 xfs:Make the function,xfs_alloc_update static
This makes the function xfs_alloc_update now to be a statically defined function due to no callers outside of the declarition file,xfs_alloc.c.
--- fs/xfs/libxfs/xfs_alloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/xfs/libxfs/xfs_alloc.c +1 -1
@@ -101,7 +101,7 @@ xfs_alloc_lookup_le(* by [bno, len]. * This either works (return 0) or gets an EFSCORRUPTED error. */ -STATIC int /* error */ +static int /* error */ xfs_alloc_update( struct xfs_btree_cur *cur, /* btree cursor */ xfs_agblock_t bno, /* starting block of extent */
Signature · 6 lines
2.1.4 _______________________________________________ xfs mailing list [email protected] http://oss.sgi.com/mailman/listinfo/xfs
PATCH 3/12 xfs:Make the function,xfs_alloc_compute_aligned static
In reply to Nicholas KrauseThis makes the function,xfs_alloc_compute_aligned static now as there are no callers outside of the function's declariton file.
--- fs/xfs/libxfs/xfs_alloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/xfs/libxfs/xfs_alloc.c +1 -1
@@ -139,7 +139,7 @@ xfs_alloc_get_rec(* Compute aligned version of the found extent. * Takes alignment and min length into account. */ -STATIC void +static void xfs_alloc_compute_aligned( xfs_alloc_arg_t *args, /* allocation argument structure */ xfs_agblock_t foundbno, /* starting block in found extent */
Signature · 6 lines
2.1.4 _______________________________________________ xfs mailing list [email protected] http://oss.sgi.com/mailman/listinfo/xfs
PATCH 4/12 xfs:Make the function,xfs_alloc_fix_len static
In reply to Nicholas KrauseThis properly makes the function,xfs_alloc_fix_len static due to no callers outside of the file this function is declared and defined in.
--- fs/xfs/libxfs/xfs_alloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/xfs/libxfs/xfs_alloc.c +1 -1
@@ -239,7 +239,7 @@ xfs_alloc_compute_diff(* If len is too small it is returned unchanged. * If len hits maxlen it is left alone. */ -STATIC void +static void xfs_alloc_fix_len (xfs_alloc_arg_t *args)/* allocation argument structure */ {
Signature · 6 lines
2.1.4 _______________________________________________ xfs mailing list [email protected] http://oss.sgi.com/mailman/listinfo/xfs
PATCH 5/12 xfs:Make the function, xfs_alloc_fix_minleft static
In reply to Nicholas KrauseThis makes the function, xfs_alloc_fix_minleft to be static due to no callers of this function outside the file,xfs_alloc.c.
--- fs/xfs/libxfs/xfs_alloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/xfs/libxfs/xfs_alloc.c +1 -1
@@ -272,7 +272,7 @@ xfs_alloc_fix_len(* Fix up length if there is too little space left in the a.g. * Return 1 if ok, 0 if too little, should give up. */ -STATIC int +static int xfs_alloc_fix_minleft (xfs_alloc_arg_t *args)/* allocation argument structure */ {
Signature · 6 lines
2.1.4 _______________________________________________ xfs mailing list [email protected] http://oss.sgi.com/mailman/listinfo/xfs
PATCH 6/12 xfs:Make the function,xfs_alloc_fixup_trees static
In reply to Nicholas KrauseThis makes the function,xfs_alloc_fixup_trees static now due to it having no external callers outside of the file,xfs_alloc.c.
--- fs/xfs/libxfs/xfs_alloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/xfs/libxfs/xfs_alloc.c +1 -1
@@ -301,7 +301,7 @@ xfs_alloc_fix_minleft(* Flags are passed in indicating whether the cursors are set to the * relevant records. */ -STATIC int /* error code */ +static int /* error code */ xfs_alloc_fixup_trees( xfs_btree_cur_t *cnt_cur, /* cursor for by-size btree */ xfs_btree_cur_t *bno_cur, /* cursor for by-block btree */
Signature · 6 lines
2.1.4 _______________________________________________ xfs mailing list [email protected] http://oss.sgi.com/mailman/listinfo/xfs
PATCH 7/12 xfs:Make the function,xfs_alloc_read_agfl static
In reply to Nicholas KrauseThis makes the function,xfs_alloc_read_agfl static now due to having no external callers outside the file,xfs_alloc.c.
--- fs/xfs/libxfs/xfs_alloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/xfs/libxfs/xfs_alloc.c +1 -1
@@ -526,7 +526,7 @@ const struct xfs_buf_ops xfs_agfl_buf_ops = {/* * Read in the allocation group free block array. */ -STATIC int /* error */ +static int /* error */ xfs_alloc_read_agfl( xfs_mount_t *mp, /* mount point structure */ xfs_trans_t *tp, /* transaction pointer */
Signature · 6 lines
2.1.4 _______________________________________________ xfs mailing list [email protected] http://oss.sgi.com/mailman/listinfo/xfs
PATCH 8/12 xfs:Make the function,xfs_alloc_update_counters static
In reply to Nicholas KrauseThis makes the function,xfs_alloc_update_counters static now due to no external callers to this function for other files.
--- fs/xfs/libxfs/xfs_alloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/xfs/libxfs/xfs_alloc.c +1 -1
@@ -548,7 +548,7 @@ xfs_alloc_read_agfl(return 0 ; } -STATIC int +static int xfs_alloc_update_counters( struct xfs_trans *tp, struct xfs_perag *pag,
Signature · 6 lines
2.1.4 _______________________________________________ xfs mailing list [email protected] http://oss.sgi.com/mailman/listinfo/xfs
PATCH 9/12 xfs:Make the function,xfs_alloc_ag_vextent static
In reply to Nicholas KrauseThis makes the function,xfs_alloc_ag_vextent static now due to its only callers being in the same file as this function's declaration and definition.
--- fs/xfs/libxfs/xfs_alloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/xfs/libxfs/xfs_alloc.c +1 -1
@@ -581,7 +581,7 @@ xfs_alloc_update_counters(* and of the form k * prod + mod unless there's nothing that large. * Return the starting a.g. block, or NULLAGBLOCK if we can't do it. */ -STATIC int /* error */ +static int /* error */ xfs_alloc_ag_vextent (xfs_alloc_arg_t *args)/* argument structure for allocation */ {
Signature · 6 lines
2.1.4 _______________________________________________ xfs mailing list [email protected] http://oss.sgi.com/mailman/listinfo/xfs
PATCH 10/12 xfs:Make the function, xfs_alloc_find_best_extent static
In reply to Nicholas KrauseThis makes the function, xfs_alloc_find_best_extent to be static now due to having no external calls to this function.
--- fs/xfs/libxfs/xfs_alloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/xfs/libxfs/xfs_alloc.c +1 -1
@@ -760,7 +760,7 @@ error0:* Search the btree in a given direction via the search cursor and compare * the records found against the good extent we've already found. */ -STATIC int +static int xfs_alloc_find_best_extent( struct xfs_alloc_arg *args, /* allocation argument structure */ struct xfs_btree_cur **gcur, /* good cursor */
Signature · 6 lines
2.1.4 _______________________________________________ xfs mailing list [email protected] http://oss.sgi.com/mailman/listinfo/xfs
PATCH 11/12 xfs:Make the function,xfs_free_ag_extent static
In reply to Nicholas KrauseThis makes the function,xfs_free_ag_extent static now due to having no external callers from outside the declaration file,xfs_alloc.c.
--- fs/xfs/libxfs/xfs_alloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/xfs/libxfs/xfs_alloc.c +1 -1
@@ -1542,7 +1542,7 @@ error0:/* * Free the extent starting at agno/bno for length. */ -STATIC int /* error */ +static int /* error */ xfs_free_ag_extent( xfs_trans_t *tp, /* transaction pointer */ xfs_buf_t *agbp, /* buffer for a.g. freelist header */
Signature · 6 lines
2.1.4 _______________________________________________ xfs mailing list [email protected] http://oss.sgi.com/mailman/listinfo/xfs
PATCH 12/12 xfs:Make the function,xfs_alloc_fix_freelist static
In reply to Nicholas KrauseThis makes the function,xfs_alloc_fix_freelist static now due to it having no external callers.
--- fs/xfs/libxfs/xfs_alloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/xfs/libxfs/xfs_alloc.c +1 -1
@@ -1842,7 +1842,7 @@ xfs_alloc_longest_free_extent(* Decide whether to use this allocation group for this allocation. * If so, fix up the btree freelist's size. */ -STATIC int /* error */ +static int /* error */ xfs_alloc_fix_freelist (xfs_alloc_arg_t *args,/* allocation argument structure */ int flags)/* XFS_ALLOC_FLAG_... */
Signature · 6 lines
2.1.4 _______________________________________________ xfs mailing list [email protected] http://oss.sgi.com/mailman/listinfo/xfs
Quoted 3 lines · Nicholas Krause
This makes the function,xfs_alloc_lookup_eq static as there are no calls to this function outside the definition file for this function,
xfs_alloc.c.
Nic, please stop trolling our lists.
Thank you, and *plonk*
Quoted 9 lines · Christoph Hellwig
Quoted 3 lines · Nicholas Krause
This makes the function,xfs_alloc_lookup_eq static as there are no calls to this function outside the definition file for this function,
xfs_alloc.c.Nic, please stop trolling our lists.
Thank you, and *plonk*
I am no trying to troll here, these are built tested and apply fine for me.
Nick
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
Quoted 14 lines · Nicholas Krause
This makes the function,xfs_alloc_lookup_eq static as there are no calls to this function outside the definition file for this function,
xfs_alloc.c.Signed-off-by Nicholas Krause <[email protected]>--- fs/xfs/libxfs/xfs_alloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)fs/xfs/libxfs/xfs_alloc.c +0
-0
fs/xfs/libxfs/xfs_alloc.c STATIC int xfs_alloc_ag_vextent_small(xfs_alloc_arg_t *, · line 58
Quoted 8 lines
fs/xfs/libxfs/xfs_alloc.c +1
-1@@ -52,7 +52,7 @@ STATIC int xfs_alloc_ag_vextent_small(xfs_alloc_arg_t *,/* * Lookup the record equal to [bno, len] in the btree given by cur. */ -STATIC int /* error */ +static int /* error */ xfs_alloc_lookup_eq( struct xfs_btree_cur *cur, /* btree cursor */ xfs_agblock_t bno, /* starting block of extent */
Please have a look at what STATIC actually means, and then use the sparse checker to confirm that these functions are already static for a CONFIG_XFS_DEBUG=n build.
i.e. STATIC is a stack usage minimisation and debugging aid, not something that is broken and needs fixing.
Cheers,
Dave.
Signature · 2 lines
Dave Chinner [email protected]
Quoted 28 lines · Dave Chinner
Quoted 14 lines · Nicholas Krause
This makes the function,xfs_alloc_lookup_eq static as there are no calls to this function outside the definition file for this function,
xfs_alloc.c.Signed-off-by Nicholas Krause <[email protected]>--- fs/xfs/libxfs/xfs_alloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)fs/xfs/libxfs/xfs_alloc.c +0
-0fs/xfs/libxfs/xfs_alloc.c STATIC int xfs_alloc_ag_vextent_small(xfs_alloc_arg_t *, · line 58
Quoted 8 lines
fs/xfs/libxfs/xfs_alloc.c +1
-1@@ -52,7 +52,7 @@ STATIC int xfs_alloc_ag_vextent_small(xfs_alloc_arg_t *,/* * Lookup the record equal to [bno, len] in the btree given by cur. */ -STATIC int /* error */ +static int /* error */ xfs_alloc_lookup_eq( struct xfs_btree_cur *cur, /* btree cursor */ xfs_agblock_t bno, /* starting block of extent */Please have a look at what STATIC actually means, and then use the sparse checker to confirm that these functions are already static for a
CONFIG_XFS_DEBUG=nbuild.
Quoted 7 lines
i.e. STATIC is a stack usage minimisation and debugging aid, not something that is broken and needs fixing.
Cheers,
Dave.
That's Ok I wasn't sure if that was there for those reasons.Next time I will be more careful and check out the macros I don't known. :( Sorry,
Nick
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs