Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp6675578imu; Mon, 3 Dec 2018 00:35:35 -0800 (PST) X-Google-Smtp-Source: AFSGD/XQwCMaz2MJeikmm6myC5TZGKPQlAkAcRePT+PA9+6C7sWN0zOH1srDZT48J3FW/ndW8rOW X-Received: by 2002:a62:1709:: with SMTP id 9mr14813773pfx.249.1543826135675; Mon, 03 Dec 2018 00:35:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543826135; cv=none; d=google.com; s=arc-20160816; b=dZUX45DG8K3qgj5BSdZL3E2JbVRXdUssjo2rOfU2ld1MZJ/7qSfLqBOIApQsc1KKqn aMjpvjH+w3/MeV920afi2sOdn2bEE48Qw47JktOD0Ervdl/hBDycb1fUh/jVQ85crXtj 5AGgBfWvXlgHEKqtQ7h1GFKrzGrlYIJqPVIqH9HemBqzybij02yviAgRxfZOB7N2+fJN IOX00sYHjy/xPT5PkHEic/Nu8UDZgRWWKUrenYU8r14o3qdzbdFjI1McpZRif176CciI jfVEef/GujH3rb/CTegzoHh0ngUdKTuoTbQjNA3icDAaoWvj8z5W5fVb9H3A+zTV+1S7 AiCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=crPLSNVBh/sifKfRyiGoMjYX2/4swqYqdTP0F28SKKQ=; b=fzcVziRjjDGWNKm9sQ2zuwnD+XBwDg1QzYnbSZ3u/YllK3pd0dkX9gUBuuxTU1Ot4/ MaMITAz0w/QbVaS83zE8+FPzEG70WpyLR0SHCci08QpzcHHYlu2aZpHLemfs10HSh97P SmoKbYkq/dl8T/TBvGn6e0raZ4LEtbAaC+7/JfzciYvvC2GGaGuCTlBVNjdwt8FuMA+g rLpzYlvsVee6np9KQHC4mPXSZMrcUa2hXkogy32kE4U2514V/g2sR5eE2K/gVGBz6TFn RgBBBRaiCfhGBvXhm/+XWHeTo5MXRi2zWAV60NV7s0enNRIkdf1CLaNcIahxxMDQKbAd XTqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=of2S7LwI; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q73si13810406pfi.205.2018.12.03.00.35.21; Mon, 03 Dec 2018 00:35:35 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=of2S7LwI; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725903AbeLCIdl (ORCPT + 99 others); Mon, 3 Dec 2018 03:33:41 -0500 Received: from merlin.infradead.org ([205.233.59.134]:59436 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725830AbeLCIdk (ORCPT ); Mon, 3 Dec 2018 03:33:40 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=crPLSNVBh/sifKfRyiGoMjYX2/4swqYqdTP0F28SKKQ=; b=of2S7LwI8IJNAJLyIcHsvtqzB Xf/+ke+sqpuobeMpl4n4GXhoe/txj+LwCeouh/DzvCuFCv/GURH0CHZ4dSNfEax6mxA3/b1RHXCn0 3KluPSNXPinehrzwE/jO6P/ALjWWBrHhWEuLbJPJS7Wuv2d7QyWODlUyTQfLybXlyCyNHUqQEBzjh T8b/exPVCCoUNPIJVmTJhLIjPlvr5yglLNxnqC3z56y+Lk+rGJdI8k7+x9tLbzh0w9TmyPE4/FXRl i6rvHeS9TFfuuBgUDlwFU5XxCkiEMeqc9mvNtV2E9Sldizjt3SAfBNOFAxHOZEgKDngg7vW6fT/kk FK2FSjj0g==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1gTjfZ-0005nn-AL; Mon, 03 Dec 2018 08:33:33 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id CECD12029F873; Mon, 3 Dec 2018 09:33:29 +0100 (CET) Date: Mon, 3 Dec 2018 09:33:29 +0100 From: Peter Zijlstra To: Wen Yang Cc: Ingo Molnar , linux-kernel@vger.kernel.org, zhong.weidong@zte.com.cn Subject: Re: [PATCH] sched/fair: Fix assignment of boolean variables Message-ID: <20181203083329.GG11614@hirez.programming.kicks-ass.net> References: <20181201090936.10175-1-wen.yang99@zte.com.cn> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181201090936.10175-1-wen.yang99@zte.com.cn> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Dec 01, 2018 at 05:09:36PM +0800, Wen Yang wrote: > Fix the following warnings reported by coccinelle: > kernel//sched/fair.c:7958:3-12: WARNING: Assignment of bool to 0/1 > > This also makes the code more readable. I disagree; anybody that has trouble with 0/1 vs false/true needs to stay away from C. > Signed-off-by: Wen Yang > CC: Ingo Molnar > CC: Peter Zijlstra > CC: linux-kernel@vger.kernel.org > --- > kernel/sched/fair.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c > index a2e8160968cb..f19aa66f9b15 100644 > --- a/kernel/sched/fair.c > +++ b/kernel/sched/fair.c > @@ -7955,7 +7955,7 @@ static inline void update_sg_lb_stats(struct lb_env *env, > if (env->sd->flags & SD_ASYM_CPUCAPACITY && > sgs->group_misfit_task_load < rq->misfit_task_load) { > sgs->group_misfit_task_load = rq->misfit_task_load; > - *overload = 1; > + *overload = true; > } > } > Anyway, this code is going away anyway: https://lkml.kernel.org/r/20181119141857.8625-12-quentin.perret@arm.com