From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756325AbbAWSgV (ORCPT ); Fri, 23 Jan 2015 13:36:21 -0500 Received: from mga14.intel.com ([192.55.52.115]:14912 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751006AbbAWSgS (ORCPT ); Fri, 23 Jan 2015 13:36:18 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.09,455,1418112000"; d="scan'208";a="655612998" Date: Sat, 24 Jan 2015 02:35:55 +0800 From: kbuild test robot To: Nicholas Mc Guire Cc: kbuild-all@01.org, Peter Zijlstra , Ingo Molnar , linux-kernel@vger.kernel.org Subject: [PATCH] sched: completion: fix boolreturn.cocci warnings Message-ID: <20150123183555.GA15416@waimea> References: <201501240250.HuKROpUf%fengguang.wu@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201501240250.HuKROpUf%fengguang.wu@intel.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: fengguang.wu@intel.com X-SA-Exim-Scanned: No (on bee); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org kernel/sched/completion.c:278:9-10: WARNING: return of 0/1 in function 'try_wait_for_completion' with return type bool Return statements in functions returning bool should use true/false instead of 1/0. Generated by: scripts/coccinelle/misc/boolreturn.cocci CC: Nicholas Mc Guire Signed-off-by: Fengguang Wu --- completion.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/kernel/sched/completion.c +++ b/kernel/sched/completion.c @@ -275,7 +275,7 @@ bool try_wait_for_completion(struct comp * return early in the blocking case. */ if (!ACCESS_ONCE(x->done)) - return 0; + return false; spin_lock_irqsave(&x->wait.lock, flags); if (!x->done)