Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp635479ybj; Thu, 7 May 2020 04:11:40 -0700 (PDT) X-Google-Smtp-Source: APiQypKd0FpodhBVBlwwC365li+dzqHeZ174RfF5PGCunxqdbOIh/9cD6Eod7/cDsdo8+06qENMM X-Received: by 2002:a17:906:c44b:: with SMTP id ck11mr11755594ejb.110.1588849900176; Thu, 07 May 2020 04:11:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588849900; cv=none; d=google.com; s=arc-20160816; b=y5O5OVpBaq1bTiP0DNm737Fg6soikL787guXsaVt6Y0COtnxdc/wd/GIw4Q+AYsqet u5UivuHyqvrsBIjrqIeNZbAgWHIFfNZGU+6PEAzRVVP0unmXNlyO8kgIRLpkvUZg37av YubGr+biMc845mpkHXbbSjNHUMC7ZlfcRlg67PUWL9iO58amLAjlVsIl3a3QJDQHn40B D8NM7sJz1NEQY1RfzCDc3GGUozbFHq48Ng8TVkeFZWqkgbI939nqP1Ao0ow5lXG5ZYWQ hCDvIgIjvhpOIe1u5df/DxzdG8FSHv9dpFcDhm+QSWYV237rkjhQiOK/Nc9t2+iXq6fw uiHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=LQOsBUGEeNtJBNMmaM3EprpHOLNmDgMnejeh7lS20co=; b=Zd06heOX0GauRaRGCiVZKRBRnyIldbCl9q5zjyWcwxEhOReUFdu1sK47Y/1Gea2eOK xscagLqYkjS3LZwZeiYb7ky64u7t6HHLgtDCoH4Vq/NHwBfJP7xGVhQyRPkqbjXQt6df GM8qVwfYA3CL0wBj4FkFSLR11K75VNsWG5Ix+H3pbBTzZ8XZWgUSWB/durwrFnHqZuWZ wp+yEPbmeeZAPa8nSb5PpHysTS4lnZuxTXmKH/nu3hzLCaGqCNDC1KBU2grEDZ8xaFAA dn3QAqbcVbwSknN34n5tIiDm10K+746rjiJbUkOLJJl1i0EQtNtfKG9qcZH5sTc9RSEM 5K5Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v26si2777214eje.322.2020.05.07.04.11.14; Thu, 07 May 2020 04:11:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726565AbgEGLHO (ORCPT + 99 others); Thu, 7 May 2020 07:07:14 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:3887 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726069AbgEGLHN (ORCPT ); Thu, 7 May 2020 07:07:13 -0400 Received: from DGGEMS405-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 4E1542626C23AAB9DE86; Thu, 7 May 2020 19:07:11 +0800 (CST) Received: from huawei.com (10.175.124.28) by DGGEMS405-HUB.china.huawei.com (10.3.19.205) with Microsoft SMTP Server id 14.3.487.0; Thu, 7 May 2020 19:07:03 +0800 From: Jason Yan To: , , , , , , , , CC: Jason Yan Subject: [PATCH] sched/fair: Return true,false in voluntary_active_balance() Date: Thu, 7 May 2020 19:06:25 +0800 Message-ID: <20200507110625.37254-1-yanaijie@huawei.com> X-Mailer: git-send-email 2.21.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.124.28] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fix the following coccicheck warning: kernel/sched/fair.c:9375:9-10: WARNING: return of 0/1 in function 'voluntary_active_balance' with return type bool Signed-off-by: Jason Yan --- kernel/sched/fair.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index b3bb4d6e49c3..e8390106ada4 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -9373,7 +9373,7 @@ voluntary_active_balance(struct lb_env *env) struct sched_domain *sd = env->sd; if (asym_active_balance(env)) - return 1; + return true; /* * The dst_cpu is idle and the src_cpu CPU has only 1 CFS task. @@ -9385,13 +9385,13 @@ voluntary_active_balance(struct lb_env *env) (env->src_rq->cfs.h_nr_running == 1)) { if ((check_cpu_capacity(env->src_rq, sd)) && (capacity_of(env->src_cpu)*sd->imbalance_pct < capacity_of(env->dst_cpu)*100)) - return 1; + return true; } if (env->migration_type == migrate_misfit) - return 1; + return true; - return 0; + return false; } static int need_active_balance(struct lb_env *env) -- 2.21.1