]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - include/linux/moduleparam.h
Merge branch 'drm-next-3.15-wip' of git://people.freedesktop.org/~deathsimple/linux...
[karo-tx-linux.git] / include / linux / moduleparam.h
index c3eb102a9cc81d8ed97f11deb9584aa71830b1c5..204a677438049b13570e779f36078e0450298614 100644 (file)
@@ -186,14 +186,12 @@ struct kparam_array
    parameters. */
 #define __module_param_call(prefix, name, ops, arg, perm, level)       \
        /* Default value instead of permissions? */                     \
-       static int __param_perm_check_##name __attribute__((unused)) =  \
-       BUILD_BUG_ON_ZERO((perm) < 0 || (perm) > 0777 || ((perm) & 2))  \
-       + BUILD_BUG_ON_ZERO(sizeof(""prefix) > MAX_PARAM_PREFIX_LEN);   \
-       static const char __param_str_##name[] = prefix #name;          \
+       static const char __param_str_##name[] = prefix #name; \
        static struct kernel_param __moduleparam_const __param_##name   \
        __used                                                          \
     __attribute__ ((unused,__section__ ("__param"),aligned(sizeof(void *)))) \
-       = { __param_str_##name, ops, perm, level, { arg } }
+       = { __param_str_##name, ops, VERIFY_OCTAL_PERMISSIONS(perm),    \
+           level, { arg } }
 
 /* Obsolete - use module_param_cb() */
 #define module_param_call(name, set, get, arg, perm)                   \
@@ -346,7 +344,7 @@ static inline void destroy_params(const struct kernel_param *params,
 /* The macros to do compile-time type checking stolen from Jakub
    Jelinek, who IIRC came up with this idea for the 2.4 module init code. */
 #define __param_check(name, p, type) \
-       static inline type *__check_##name(void) { return(p); }
+       static inline type __always_unused *__check_##name(void) { return(p); }
 
 extern struct kernel_param_ops param_ops_byte;
 extern int param_set_byte(const char *val, const struct kernel_param *kp);