From: Randy Dunlap <rdunlap@xenotime.net>
To: lkml <linux-kernel@vger.kernel.org>
Cc: devel@driverdev.osuosl.org, gregkh@suse.de
Subject: [PATCH] staging/android/lowmemorykiller: fix module param errors
Date: Fri, 31 Jul 2009 11:10:45 -0700 [thread overview]
Message-ID: <20090731111045.8dfd1ea5.rdunlap@xenotime.net> (raw)
From: Randy Dunlap <randy.dunlap@oracle.com>
Move module_params to near the end of the source file so that
their references are already known/defined. Fixes build errors:
drivers/staging/android/lowmemorykiller.c: In function '__check_cost':
drivers/staging/android/lowmemorykiller.c:60: error: 'lowmem_shrinker' undeclared (first use in this function)
drivers/staging/android/lowmemorykiller.c: At top level:
drivers/staging/android/lowmemorykiller.c:60: error: 'lowmem_shrinker' undeclared here (not in a function)
drivers/staging/android/lowmemorykiller.c:60: warning: type defaults to 'int' in declaration of 'type name'
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
---
drivers/staging/android/lowmemorykiller.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
--- linux-next-20090731.orig/drivers/staging/android/lowmemorykiller.c
+++ linux-next-20090731/drivers/staging/android/lowmemorykiller.c
@@ -57,13 +57,6 @@ static int lowmem_minfree_size = 4;
printk(x); \
} while (0)
-module_param_named(cost, lowmem_shrinker.seeks, int, S_IRUGO | S_IWUSR);
-module_param_array_named(adj, lowmem_adj, int, &lowmem_adj_size,
- S_IRUGO | S_IWUSR);
-module_param_array_named(minfree, lowmem_minfree, uint, &lowmem_minfree_size,
- S_IRUGO | S_IWUSR);
-module_param_named(debug_level, lowmem_debug_level, uint, S_IRUGO | S_IWUSR);
-
static int lowmem_shrink(int nr_to_scan, gfp_t gfp_mask)
{
struct task_struct *p;
@@ -166,6 +159,13 @@ static void __exit lowmem_exit(void)
unregister_shrinker(&lowmem_shrinker);
}
+module_param_named(cost, lowmem_shrinker.seeks, int, S_IRUGO | S_IWUSR);
+module_param_array_named(adj, lowmem_adj, int, &lowmem_adj_size,
+ S_IRUGO | S_IWUSR);
+module_param_array_named(minfree, lowmem_minfree, uint, &lowmem_minfree_size,
+ S_IRUGO | S_IWUSR);
+module_param_named(debug_level, lowmem_debug_level, uint, S_IRUGO | S_IWUSR);
+
module_init(lowmem_init);
module_exit(lowmem_exit);
---
~Randy
LPC 2009, Sept. 23-25, Portland, Oregon
http://linuxplumbersconf.org/2009/
next reply other threads:[~2009-07-31 18:10 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-31 18:10 Randy Dunlap [this message]
2009-07-31 18:14 ` [PATCH] staging/android/lowmemorykiller: fix module param errors Robert P. J. Day
2009-07-31 18:22 ` Randy Dunlap
2009-08-10 19:34 ` patch staging-android-lowmemorykiller-fix-module-param-errors.patch added to gregkh-2.6 tree gregkh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090731111045.8dfd1ea5.rdunlap@xenotime.net \
--to=rdunlap@xenotime.net \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@suse.de \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox