[ltp] [PATCH 1/1] force_io is of type int, so check for this type instead of bool.

Joerg Mayer linux-thinkpad@linux-thinkpad.org
Tue, 16 Apr 2013 19:40:09 +0200


Fixes the following warning:

  CC [M]  /home/jmayer/work/thinkpad/git/thinkpad_ec.o
In file included from /usr/src/linux-3.8.7-1/include/linux/module.h:17:0,
                 from /home/jmayer/work/thinkpad/git/thinkpad_ec.c:33:
/home/jmayer/work/thinkpad/git/thinkpad_ec.c: In function ‘__check_force_io’:
/usr/src/linux-3.8.7-1/include/linux/moduleparam.h:338:45: warning: return from incompatible pointer type [enabled by default]
  static inline type *__check_##name(void) { return(p); }
                                             ^
/usr/src/linux-3.8.7-1/include/linux/moduleparam.h:384:35: note: in expansion of macro ‘__param_check’
 #define param_check_bool(name, p) __param_check(name, p, bool)
                                   ^
/usr/src/linux-3.8.7-1/include/linux/moduleparam.h:116:2: note: in expansion of macro ‘param_check_bool’
  param_check_##type(name, &(value));       \
  ^
/home/jmayer/work/thinkpad/git/thinkpad_ec.c:100:1: note: in expansion of macro ‘module_param_named’
 module_param_named(force_io, force_io, bool, 0600);
 ^

Signed-off-by: Joerg Mayer <jmayer@loplof.de>
---
:100644 100644 a1c94d9... ea8bcbf... M	thinkpad_ec.c
 thinkpad_ec.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/thinkpad_ec.c b/thinkpad_ec.c
index a1c94d9..ea8bcbf 100644
--- a/thinkpad_ec.c
+++ b/thinkpad_ec.c
@@ -97,7 +97,7 @@ static DEFINE_SEMAPHORE(thinkpad_ec_mutex);
 /* Kludge in case the ACPI DSDT reserves the ports we need. */
 static int force_io;    /* Willing to do IO to ports we couldn't reserve? */
 static int reserved_io; /* Successfully reserved the ports? */
-module_param_named(force_io, force_io, bool, 0600);
+module_param_named(force_io, force_io, int, 0600);
 MODULE_PARM_DESC(force_io, "Force IO even if region already reserved (0=off, 1=on)");
 
 /**
-- 
1.7.7