Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754796AbbEKP2i (ORCPT ); Mon, 11 May 2015 11:28:38 -0400 Received: from smtprelay0075.hostedemail.com ([216.40.44.75]:58128 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751469AbbEKP2e (ORCPT ); Mon, 11 May 2015 11:28:34 -0400 X-Session-Marker: 726F737465647440676F6F646D69732E6F7267 X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,rostedt@goodmis.org,:::::::::::,RULES_HIT:41:355:379:541:599:800:960:973:979:982:988:989:1260:1277:1311:1313:1314:1345:1359:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:1801:2393:2553:2559:2562:3138:3139:3140:3141:3142:3353:3622:3865:3866:3867:3868:3870:3871:3872:3874:4321:4383:4605:5007:6261:7875:7903:8660:10004:10400:10848:10967:11026:11232:11473:11658:11914:12438:12517:12519:12555:12740:13069:13095:13148:13230:13311:13357:14096:14097:21080,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:none,Custom_rules:0:0:0 X-HE-Tag: bat08_105db50a1e11f X-Filterd-Recvd-Size: 2884 Date: Mon, 11 May 2015 11:28:30 -0400 From: Steven Rostedt To: Nicholas Mc Guire Cc: "Paul E. McKenney" , Josh Triplett , Mathieu Desnoyers , Lai Jiangshan , linux-kernel@vger.kernel.org Subject: Re: [PATCH V2] rcu: change function declaration to bool Message-ID: <20150511112830.275b2c02@gandalf.local.home> In-Reply-To: <1431357059-29795-1-git-send-email-hofrat@osadl.org> References: <1431357059-29795-1-git-send-email-hofrat@osadl.org> X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.25; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2092 Lines: 56 On Mon, 11 May 2015 17:10:59 +0200 Nicholas Mc Guire wrote: > rcu_cpu_has_callbacks() is declared int but is actually returning bool and > and as the function description states " * Return true if the specified > CPU has any callback....", this probably should be a bool. All (3) > call-sites currently treat it as bool so the declaration. > > > Signed-off-by: Nicholas Mc Guire > --- > > V2: fixed up commit message and tool infos as requested by > Josh Triplett > > Type-checking coccinelle spatches are being used to locate type > mismatches between function signatures and return values. > ./kernel/rcu/tree.c:3538 WARNING: return of wrong type > int != bool, > > Patch was compile tested with x86_64_defconfig (implies CONFIG_TREE_RCU=y) > > Patch is against 4.1-rc3 (localversion-next is -next-20150511) I think what Josh was saying is that all the above except for the "V2" should be above the signature. Everything between the "---" and the patch gets tossed out when committed into git. Giving credit to coccinelle and even what branch and config was used for testing is something we want in the git change log history. -- Steve > > kernel/rcu/tree.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c > index bcc5943..599550c 100644 > --- a/kernel/rcu/tree.c > +++ b/kernel/rcu/tree.c > @@ -3516,7 +3516,7 @@ static int rcu_pending(void) > * non-NULL, store an indication of whether all callbacks are lazy. > * (If there are no callbacks, all of them are deemed to be lazy.) > */ > -static int __maybe_unused rcu_cpu_has_callbacks(bool *all_lazy) > +static bool __maybe_unused rcu_cpu_has_callbacks(bool *all_lazy) > { > bool al = true; > bool hc = false; -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/