Re: [PATCH] module: LLVMLinux: Remove unused function warning from __param_check macro

2014-03-11 Thread Behan Webster
On 03/10/14 23:11, Rusty Russell wrote: beh...@converseincode.com writes: From: Mark Charlebois This code makes a compile time type check that is optimized away. Clang complains that it generates an unused function. I believe GCC won't complain for a static inline fuction but would if it was

Re: [PATCH] module: LLVMLinux: Remove unused function warning from __param_check macro

2014-03-11 Thread Rusty Russell
beh...@converseincode.com writes: > From: Mark Charlebois > > This code makes a compile time type check that is optimized away. Clang > complains that it generates an unused function. > > I believe GCC won't complain for a static inline fuction but would if it > was just a static function. > >

Re: [PATCH] module: LLVMLinux: Remove unused function warning from __param_check macro

2014-03-11 Thread Rusty Russell
beh...@converseincode.com writes: From: Mark Charlebois charl...@gmail.com This code makes a compile time type check that is optimized away. Clang complains that it generates an unused function. I believe GCC won't complain for a static inline fuction but would if it was just a static

Re: [PATCH] module: LLVMLinux: Remove unused function warning from __param_check macro

2014-03-11 Thread Behan Webster
On 03/10/14 23:11, Rusty Russell wrote: beh...@converseincode.com writes: From: Mark Charlebois charl...@gmail.com This code makes a compile time type check that is optimized away. Clang complains that it generates an unused function. I believe GCC won't complain for a static inline fuction

Re: [PATCH] module: LLVMLinux: Remove unused function warning from __param_check macro

2014-03-07 Thread Stephen Boyd
On 03/07/14 17:25, PaX Team wrote: > On 7 Mar 2014 at 16:52, Behan Webster wrote: > >> On 03/07/14 14:56, PaX Team wrote: >>> why can't you have the attr on the definition itself: >>> >>> static inline __unused type *__check_##name(void) { return(p); } >>> >>> >>> >> "__unused" isn't defined

Re: [PATCH] module: LLVMLinux: Remove unused function warning from __param_check macro

2014-03-07 Thread PaX Team
On 7 Mar 2014 at 16:52, Behan Webster wrote: > On 03/07/14 14:56, PaX Team wrote: > > why can't you have the attr on the definition itself: > > > > static inline __unused type *__check_##name(void) { return(p); } > > > > > > > "__unused" isn't defined anywhere I can find, except in: > >

Re: [PATCH] module: LLVMLinux: Remove unused function warning from __param_check macro

2014-03-07 Thread Behan Webster
On 03/07/14 14:56, PaX Team wrote: On 7 Mar 2014 at 11:08, beh...@converseincode.com wrote: diff --git a/include/linux/moduleparam.h b/include/linux/moduleparam.h index c3eb102..5ce1f67 100644 --- a/include/linux/moduleparam.h +++ b/include/linux/moduleparam.h @@ -346,6 +346,7 @@ static inline

Re: [PATCH] module: LLVMLinux: Remove unused function warning from __param_check macro

2014-03-07 Thread PaX Team
On 7 Mar 2014 at 11:08, beh...@converseincode.com wrote: > diff --git a/include/linux/moduleparam.h b/include/linux/moduleparam.h > index c3eb102..5ce1f67 100644 > --- a/include/linux/moduleparam.h > +++ b/include/linux/moduleparam.h > @@ -346,6 +346,7 @@ static inline void destroy_params(const

[PATCH] module: LLVMLinux: Remove unused function warning from __param_check macro

2014-03-07 Thread behanw
From: Mark Charlebois This code makes a compile time type check that is optimized away. Clang complains that it generates an unused function. I believe GCC won't complain for a static inline fuction but would if it was just a static function. Adding the unused attribute to the function

[PATCH] module: LLVMLinux: Remove unused function warning from __param_check macro

2014-03-07 Thread behanw
From: Mark Charlebois charl...@gmail.com This code makes a compile time type check that is optimized away. Clang complains that it generates an unused function. I believe GCC won't complain for a static inline fuction but would if it was just a static function. Adding the unused attribute to

Re: [PATCH] module: LLVMLinux: Remove unused function warning from __param_check macro

2014-03-07 Thread PaX Team
On 7 Mar 2014 at 11:08, beh...@converseincode.com wrote: diff --git a/include/linux/moduleparam.h b/include/linux/moduleparam.h index c3eb102..5ce1f67 100644 --- a/include/linux/moduleparam.h +++ b/include/linux/moduleparam.h @@ -346,6 +346,7 @@ static inline void destroy_params(const struct

Re: [PATCH] module: LLVMLinux: Remove unused function warning from __param_check macro

2014-03-07 Thread Behan Webster
On 03/07/14 14:56, PaX Team wrote: On 7 Mar 2014 at 11:08, beh...@converseincode.com wrote: diff --git a/include/linux/moduleparam.h b/include/linux/moduleparam.h index c3eb102..5ce1f67 100644 --- a/include/linux/moduleparam.h +++ b/include/linux/moduleparam.h @@ -346,6 +346,7 @@ static inline

Re: [PATCH] module: LLVMLinux: Remove unused function warning from __param_check macro

2014-03-07 Thread PaX Team
On 7 Mar 2014 at 16:52, Behan Webster wrote: On 03/07/14 14:56, PaX Team wrote: why can't you have the attr on the definition itself: static inline __unused type *__check_##name(void) { return(p); } __unused isn't defined anywhere I can find, except in:

Re: [PATCH] module: LLVMLinux: Remove unused function warning from __param_check macro

2014-03-07 Thread Stephen Boyd
On 03/07/14 17:25, PaX Team wrote: On 7 Mar 2014 at 16:52, Behan Webster wrote: On 03/07/14 14:56, PaX Team wrote: why can't you have the attr on the definition itself: static inline __unused type *__check_##name(void) { return(p); } __unused isn't defined anywhere I can find, except in: