From: Gao Feng Date: Wed, 19 Apr 2017 01:47:22 +0000 (+0800) Subject: module: Unify the return value type of try_module_get X-Git-Tag: v4.14-rc1~1000^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8ba4fcdf0f4068407e98cd9cc0f230c2dd8d56de;p=platform%2Fkernel%2Flinux-rpi.git module: Unify the return value type of try_module_get The prototypes of try_module_get are different with different macro. When enable module and module unload, it returns bool, but others not. Make the return type for try_module_get consistent across all module config options. Signed-off-by: Gao Feng [jeyu: slightly amended changelog to make it clearer] Signed-off-by: Jessica Yu --- diff --git a/include/linux/module.h b/include/linux/module.h index 0297c5c..6b79eb7 100644 --- a/include/linux/module.h +++ b/include/linux/module.h @@ -582,7 +582,7 @@ extern bool try_module_get(struct module *module); extern void module_put(struct module *module); #else /*!CONFIG_MODULE_UNLOAD*/ -static inline int try_module_get(struct module *module) +static inline bool try_module_get(struct module *module) { return !module || module_is_live(module); } @@ -674,9 +674,9 @@ static inline void __module_get(struct module *module) { } -static inline int try_module_get(struct module *module) +static inline bool try_module_get(struct module *module) { - return 1; + return true; } static inline void module_put(struct module *module)