From: Jessica Yu <jeyu@redhat.com>
To: gfree.wind@foxmail.com
Cc: rusty@rustcorp.com.au, linux-kernel@vger.kernel.org,
Gao Feng <fgao@48lvckh6395k16k5.yundunddos.com>
Subject: Re: [PATCH] module: Unify the return value type of try_module_get
Date: Sun, 23 Apr 2017 21:44:55 -0700 [thread overview]
Message-ID: <20170424044454.2o5eaw3whjv7rjtf@jeyu> (raw)
In-Reply-To: <1492566442-12608-1-git-send-email-gfree.wind@foxmail.com>
+++ gfree.wind@foxmail.com [19/04/17 09:47 +0800]:
>From: Gao Feng <fgao@ikuai8.com>
>
>The prototypes of try_module_get are different with different macro.
>When enable module and module unload, it returns bool, but others not.
>Now unify their return value type as bool.
>
>Signed-off-by: Gao Feng <fgao@ikuai8.com>
Applied, thanks for the clean-up!
Jessica
>---
> include/linux/module.h | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
>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 void __noreturn __module_put_and_exit(struct module *mod,
> 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)
>--
>1.9.1
>
>
>
>
prev parent reply other threads:[~2017-04-24 4:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-19 1:47 gfree.wind
2017-04-24 4:44 ` Jessica Yu [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170424044454.2o5eaw3whjv7rjtf@jeyu \
--to=jeyu@redhat.com \
--cc=fgao@48lvckh6395k16k5.yundunddos.com \
--cc=gfree.wind@foxmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rusty@rustcorp.com.au \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®