Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1045875AbdDXEpD (ORCPT ); Mon, 24 Apr 2017 00:45:03 -0400 Received: from mx1.redhat.com ([209.132.183.28]:37412 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933039AbdDXEo6 (ORCPT ); Mon, 24 Apr 2017 00:44:58 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 7235F80F93 Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=jeyu@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 7235F80F93 Date: Sun, 23 Apr 2017 21:44:55 -0700 From: Jessica Yu To: gfree.wind@foxmail.com Cc: rusty@rustcorp.com.au, linux-kernel@vger.kernel.org, Gao Feng Subject: Re: [PATCH] module: Unify the return value type of try_module_get Message-ID: <20170424044454.2o5eaw3whjv7rjtf@jeyu> References: <1492566442-12608-1-git-send-email-gfree.wind@foxmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <1492566442-12608-1-git-send-email-gfree.wind@foxmail.com> X-OS: Linux jeyu 4.11.0-rc2+ x86_64 User-Agent: NeoMutt/20161126 (1.7.1) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Mon, 24 Apr 2017 04:44:57 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1267 Lines: 48 +++ gfree.wind@foxmail.com [19/04/17 09:47 +0800]: >From: Gao Feng > >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 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 > > > >