From fdaa05e593dcf385b2fe2db0b7d0cf7785a63837 Mon Sep 17 00:00:00 2001 From: Amit Pundir Date: Fri, 30 Oct 2015 01:16:29 +0530 Subject: [PATCH] lowmemorykiller: use module_param_cb instead of __module_param_call MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Use module_param_cb helper routine instead of __module_param_call otherwise we run into following build error: CC drivers/staging/android/lowmemorykiller.o drivers/staging/android/lowmemorykiller.c:293:28: error: macro "__module_param_call" requires 7 arguments, but only 6 given S_IRUGO | S_IWUSR, -1); ^ drivers/staging/android/lowmemorykiller.c:290:1: warning: data definition has no type or storage class [enabled by default] __module_param_call(MODULE_PARAM_PREFIX, adj, ^ drivers/staging/android/lowmemorykiller.c:290:1: error: type defaults to ‘int’ in declaration of ‘__module_param_call’ [-Werror=implicit-int] drivers/staging/android/lowmemorykiller.c:273:32: warning: ‘lowmem_adj_array_ops’ defined but not used [-Wunused-variable] static struct kernel_param_ops lowmem_adj_array_ops = { ^ cc1: some warnings being treated as errors make[3]: *** [drivers/staging/android/lowmemorykiller.o] Error 1 Signed-off-by: Amit Pundir --- drivers/staging/android/lowmemorykiller.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/staging/android/lowmemorykiller.c b/drivers/staging/android/lowmemorykiller.c index c62d951ada50..4cc3d02eacfb 100644 --- a/drivers/staging/android/lowmemorykiller.c +++ b/drivers/staging/android/lowmemorykiller.c @@ -292,10 +292,9 @@ static const struct kparam_array __param_arr_adj = { */ module_param_named(cost, lowmem_shrinker.seeks, int, S_IRUGO | S_IWUSR); #ifdef CONFIG_ANDROID_LOW_MEMORY_KILLER_AUTODETECT_OOM_ADJ_VALUES -__module_param_call(MODULE_PARAM_PREFIX, adj, - &lowmem_adj_array_ops, - .arr = &__param_arr_adj, - S_IRUGO | S_IWUSR, -1); +module_param_cb(adj, &lowmem_adj_array_ops, + .arr = &__param_arr_adj, + S_IRUGO | S_IWUSR); __MODULE_PARM_TYPE(adj, "array of short"); #else module_param_array_named(adj, lowmem_adj, short, &lowmem_adj_size, -- 2.20.1