lkml.org 
[lkml]   [2008]   [Apr]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] xfs: remove unused params from functions in xfs/quota/*
Date
Hi David,

This patch deals with remaining cases of unused parameters in fs/xfs/quota/*
as far as I can see so far. The rest of unused parameters
in fs/xfs/quota/* cannot be easily eliminated due to addresses
of functions being taken.

Code size difference on 32-bit x86:
393289 2904 2952 399145 61729 linux-2.6-xfs8-TEST/fs/xfs/xfs.o
393236 2904 2952 399092 616f4 linux-2.6-xfs9-TEST/fs/xfs/xfs.o

Compile tested only.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
--
vda
diff -urpN linux-2.6-xfs8/fs/xfs/quota/xfs_dquot.c linux-2.6-xfs9/fs/xfs/quota/xfs_dquot.c
--- linux-2.6-xfs8/fs/xfs/quota/xfs_dquot.c 2008-04-22 11:34:01.000000000 +0200
+++ linux-2.6-xfs9/fs/xfs/quota/xfs_dquot.c 2008-04-22 15:12:08.000000000 +0200
@@ -640,7 +640,11 @@ xfs_qm_dqtobp(
* and release the buffer immediately.
*
*/
-/* ARGSUSED */
+#ifndef DEBUG
+/* "id" is used only for debugging */
+#define xfs_qm_dqread(tpp, id, dqp, flags) \
+ xfs_qm_dqread(tpp, dqp, flags)
+#endif
STATIC int
xfs_qm_dqread(
xfs_trans_t **tpp,
diff -urpN linux-2.6-xfs8/fs/xfs/quota/xfs_qm.c linux-2.6-xfs9/fs/xfs/quota/xfs_qm.c
--- linux-2.6-xfs8/fs/xfs/quota/xfs_qm.c 2008-04-22 11:34:31.000000000 +0200
+++ linux-2.6-xfs9/fs/xfs/quota/xfs_qm.c 2008-04-22 15:12:54.000000000 +0200
@@ -65,6 +65,8 @@ kmem_zone_t *qm_dqtrxzone;

static cred_t xfs_zerocr;

+/* "str" and "n" are unused */
+#define xfs_qm_list_init(list, str, n) xfs_qm_list_init(list)
STATIC void xfs_qm_list_init(xfs_dqlist_t *, char *, int);
STATIC void xfs_qm_list_destroy(xfs_dqlist_t *);

@@ -210,10 +212,10 @@ xfs_qm_destroy(
* structures are pretty independent, but it helps the XQM keep a
* global view of what's going on.
*/
-/* ARGSUSED */
STATIC int
xfs_qm_hold_quotafs_ref(
- struct xfs_mount *mp)
+ void
+ /*struct xfs_mount *mp*/)
{
/*
* Need to lock the xfs_Gqm structure for things like this. For example,
@@ -243,7 +245,8 @@ xfs_qm_hold_quotafs_ref(
/* ARGSUSED */
STATIC void
xfs_qm_rele_quotafs_ref(
- struct xfs_mount *mp)
+ void
+ /*struct xfs_mount *mp*/)
{
xfs_dquot_t *dqp, *nextdqp;

@@ -1122,7 +1125,7 @@ xfs_qm_init_quotainfo(
/*
* Tell XQM that we exist as soon as possible.
*/
- if ((error = xfs_qm_hold_quotafs_ref(mp))) {
+ if ((error = xfs_qm_hold_quotafs_ref(/* mp */))) {
return error;
}

@@ -1233,7 +1236,7 @@ xfs_qm_destroy_quotainfo(
* when the XQM structure should be freed. We cannot assume
* that xfs_Gqm is non-null after this point.
*/
- xfs_qm_rele_quotafs_ref(mp);
+ xfs_qm_rele_quotafs_ref(/* mp */);

spinlock_destroy(&qi->qi_pinlock);
xfs_qm_list_destroy(&qi->qi_dqlist);
\
 
 \ /
  Last update: 2008-04-22 15:43    [W:0.516 / U:0.824 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site