Files
android_kernel_xiaomi_sm8450/include/linux
Mark Charlebois 0283f9a529 module: LLVMLinux: Remove unused function warning from __param_check macro
This code makes a compile time type check that is optimized away. Clang
complains that it generates an unused function:

linux/kernel/panic.c:471:1: warning: unused function '__check_panic'
      [-Wunused-function]
core_param(panic, panic_timeout, int, 0644);
^
linux/moduleparam.h:283:2: note: expanded from macro
      'core_param'
        param_check_##type(name, &(var));                               \
        ^
<scratch space>:87:1: note: expanded from here
param_check_int
^
linux/moduleparam.h:369:34: note: expanded from macro
      'param_check_int'
#define param_check_int(name, p) __param_check(name, p, int)
                                 ^
linux/moduleparam.h:349:22: note: expanded from macro
      '__param_check'
        static inline type *__check_##name(void) { return(p); }
                            ^
<scratch space>:88:1: note: expanded from here
__check_panic

GCC won't complain for a static inline function but would if it was just
a static function.

Adding the unused attribute to the function declaration removes the warning.
Per request from Rusty Russell it is marked as __always_unused as the code
is meant to be optimized away.

This code works for both GCC and clang.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
Signed-off-by: Behan Webster <behanw@converseincode.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2014-03-17 14:54:50 +10:30
..
2013-08-14 13:55:15 +05:30
2014-01-20 11:55:23 -08:00
2013-12-23 18:34:58 -08:00
2014-01-24 22:39:54 +01:00
2014-01-17 01:59:38 +01:00
2013-11-08 08:59:44 -07:00
2013-11-23 22:33:56 -08:00
2013-12-22 23:14:27 -08:00
2013-11-15 09:32:21 +09:00
2013-11-09 00:16:29 -05:00
2014-02-13 10:08:52 +05:30
2014-01-16 10:23:02 +10:30
2014-03-10 11:44:42 -04:00
2013-08-22 22:13:54 -07:00
2014-03-10 11:44:42 -04:00
2014-03-10 17:26:19 -07:00
2014-03-04 07:55:47 -08:00
2014-01-16 11:15:50 +01:00
2014-01-26 22:48:35 +01:00
2013-12-29 16:34:25 -05:00
2013-12-10 22:58:13 -08:00
2013-09-13 15:09:52 +02:00
2014-03-13 12:11:00 +10:30
2013-08-09 10:49:00 +02:00
2014-02-25 07:37:52 -08:00
2013-11-15 09:32:23 +09:00
2014-01-25 08:55:09 +01:00
2013-08-28 21:35:14 -07:00
2014-01-08 19:03:00 -02:00
2013-12-11 15:52:34 +01:00
2013-12-26 13:29:35 -05:00
2013-12-19 10:17:11 -07:00
2014-03-13 12:11:00 +10:30
2013-11-09 00:16:19 -05:00
2014-01-27 21:02:39 -08:00
2013-11-09 00:16:19 -05:00
2013-10-14 17:15:48 +02:00
2014-01-25 03:14:05 -05:00
2014-01-27 19:27:53 -05:00
2014-01-13 14:29:49 -08:00
2014-01-03 11:22:21 -08:00
2014-01-22 19:36:57 +01:00
2013-10-17 00:36:06 +02:00
2013-12-18 19:04:50 -08:00
2014-01-28 13:20:09 -08:00
2013-12-19 19:09:38 -05:00
2014-01-27 21:02:39 -08:00
2013-09-10 18:56:32 -04:00
2013-09-12 15:38:02 -07:00
2013-12-08 16:56:05 -08:00
2013-08-05 10:52:36 -06:00
2013-10-17 15:53:09 -04:00
2014-01-30 16:56:55 -08:00