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
..
2014-01-30 17:20:32 -08:00
2014-01-30 16:25:49 -08:00
2014-02-17 12:37:09 -08:00
2014-02-19 12:07:55 -07:00
2014-02-06 10:22:56 +01:00
2014-01-24 17:17:30 -08:00
2014-01-25 10:49:30 -08:00
2014-02-19 13:30:30 +00:00
2014-01-25 11:17:34 -08:00
2014-02-13 20:48:02 -08:00
2014-01-26 11:00:41 -08:00
2014-01-20 11:55:23 -08:00
2014-02-05 05:48:43 +00:00
2014-01-16 14:25:37 +01:00
2014-01-31 09:31:14 -08:00
2014-01-31 08:59:46 -08:00
2014-02-11 12:08:27 +00:00
2014-01-24 22:39:54 +01:00
2014-01-30 10:18:43 -08:00
2014-01-23 18:49:36 -08:00
2014-01-17 01:59:38 +01:00
2014-02-28 19:44:55 -08:00
2014-02-05 12:54:53 -08:00
2014-02-11 08:40:45 -07:00
2014-02-21 08:58:49 -08:00
2014-02-14 10:45:18 -08:00
2014-01-30 16:56:54 -08:00
2014-01-23 16:36:56 -08:00
2014-01-15 11:33:40 +08:00
2014-02-11 10:38:30 -05:00
2014-01-30 17:07:18 -08:00
2014-01-21 20:18:26 -08:00
2014-01-21 16:19:48 -08:00
2014-02-01 10:43:45 -08:00
2014-02-13 12:34:05 +01:00
2014-01-23 18:11:00 -08:00
2014-01-23 18:11:00 -08:00
2014-01-17 02:00:44 +01:00
2014-01-15 14:19:42 +07:00
2014-01-13 14:05:13 -08:00
2014-02-13 10:08:52 +05:30
2014-01-21 16:19:41 -08:00
2014-01-29 20:27:23 -08:00
2014-01-15 15:39:33 -08:00
2014-01-16 10:23:02 +10:30
2014-01-25 03:14:36 -05:00
2014-03-10 11:44:42 -04:00
2014-01-21 18:57:43 -08:00
2014-03-07 10:19:57 -05:00
2014-01-21 23:17:20 -08:00
2014-03-10 11:44:42 -04:00
2014-02-25 11:18:06 +01:00
2014-01-23 16:36:52 -08:00
2014-03-10 17:26:19 -07:00
2014-03-04 07:55:47 -08:00
2014-01-23 16:36:50 -08:00
2014-01-23 16:36:50 -08:00
2014-02-07 08:27:34 -08:00
2014-01-16 11:15:50 +01:00
2014-01-29 20:40:08 +01:00
2014-01-26 22:48:35 +01:00
2014-01-23 18:08:10 -08:00
2014-02-09 15:27:21 +01:00
2014-02-25 15:25:45 -08:00
2014-01-27 21:02:39 -08:00
2014-01-19 19:53:18 -08:00
2014-03-13 12:11:00 +10:30
2014-01-16 00:08:12 +01:00
2014-03-13 12:11:51 +10:30
2014-02-25 07:37:52 -08:00
2014-01-23 16:37:03 -08:00
2014-01-25 08:55:09 +01:00
2014-01-21 16:19:45 -08:00
2014-01-16 09:49:10 -05:00
2014-01-27 21:45:29 +01:00
2014-01-23 16:36:51 -08:00
2014-01-23 16:36:51 -08:00
2014-01-21 16:19:44 -08:00
2014-01-21 16:19:49 -08:00
2014-03-04 07:55:50 -08:00
2014-01-21 16:19:44 -08:00
2014-01-23 16:36:50 -08:00
2014-03-10 17:26:19 -07:00
2014-03-13 12:11:00 +10:30
2014-03-17 14:54:50 +10:30
2014-01-27 21:02:39 -08:00
2014-01-14 15:15:25 -08:00
2014-02-17 00:36:34 -05:00
2014-01-31 15:39:07 -08:00
2014-03-01 13:51:53 -06:00
2014-01-25 03:14:05 -05:00
2014-01-27 19:27:53 -05:00
2014-02-05 10:04:37 -06:00
2014-01-13 14:29:49 -08:00
2014-02-05 09:51:54 -06:00
2014-02-06 13:48:51 -08:00
2014-01-23 16:36:50 -08:00
2014-01-23 16:36:55 -08:00
2014-02-13 10:48:02 -07:00
2014-01-23 20:17:18 +00:00
2014-01-23 16:36:50 -08:00
2014-01-13 14:29:49 -08:00
2014-01-22 19:36:57 +01:00
2014-01-25 23:58:17 -05:00
2014-01-28 08:38:04 -08:00
2014-01-23 14:48:35 +01:00
2014-01-25 11:17:34 -08:00
2014-01-23 16:36:58 -08:00
2014-01-21 23:17:20 -08:00
2014-01-28 08:38:04 -08:00
2014-01-21 23:17:20 -08:00
2014-01-16 12:00:56 -08:00
2014-01-21 16:19:45 -08:00
2014-01-28 13:20:09 -08:00
2014-02-05 12:54:53 -08:00
2014-01-19 19:55:50 -08:00
2014-01-23 13:02:36 +01:00
2014-01-27 21:02:39 -08:00
2014-02-19 13:12:53 -05:00
2014-01-25 11:17:34 -08:00
2014-03-10 17:26:19 -07:00
2014-02-10 16:01:42 -08:00
2014-01-22 21:57:05 -08:00
2014-01-27 21:02:40 -08:00
2014-01-21 08:28:07 +00:00
2014-01-21 17:05:27 -08:00
2014-02-21 21:27:10 +01:00
2014-01-13 14:05:13 -08:00
2014-01-14 08:01:10 -08:00
2014-01-15 23:05:31 +01:00
2014-03-03 21:11:05 -05:00
2014-01-20 16:13:02 -08:00
2014-02-07 14:30:03 -08:00
2014-01-25 09:10:41 +01:00
2014-02-07 11:27:30 -08:00
2014-01-23 16:37:04 -08:00
2014-01-22 10:25:39 +01:00
2014-02-14 09:05:39 -05:00
2014-02-22 02:02:28 +01:00
2014-01-30 16:56:55 -08:00