From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B385E39B48E for ; Mon, 8 Jun 2026 08:09:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=90.155.92.199 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780906176; cv=none; b=p6wppclIzM/piodCfHbq8IdSadxqN2qJjT6a/gVdsKWpuOlVtSBTS+YbW7xw1UPppLBsgY/zb+13s3zPo8nDEUxXSItVrRhGoiKMj4bRzR2frC/yabSiX3gsjPM7XlVu5AtxCQyQB9wxIcLZV9/xT06UuBYZzRKPVPrlB956vx0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780906176; c=relaxed/simple; bh=y9M8YnN5AE62wUItRhI92Hg1iuXvglPdlKV463j7y6Y=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=umbOk/IGBxKdVYrlYr+fmGEP4EQeBoG41hO+kY+F+kQg9LS/UtYsmHvyTMUj+oSFRGhu9w2LTSll2H14ffflssSXEsJTBKsRKUs6gDHU+n1OrxTxtDv0XYMmoWsJcEzGZA1BwOeoRaDImKaK/6S1n2z3gcPgyH3tbunDFFoewcU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=infradead.org; spf=pass smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=fMSCNs4W; arc=none smtp.client-ip=90.155.92.199 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=infradead.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="fMSCNs4W" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; 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; bh=SltkoKiBQmmo9EGfurWJL3fpa99AewnaB0Ky9pX9UHM=; b=fMSCNs4WwkeIli9ZNxUA2Bumm5 WPyTTRy8+ShUKR+i2xdBiL4LSGEv3W/bPtOu8OdpaDxLTt7ovXTLOSIVi/8ptO2OJ94B7wxT/wSrZ q+/S0Dn1z02fYJqHYRefN0MeBXrdgxef/xdP21QotjbNz8ejtdU6BrkeA+3Dys2YNpnpFSy1M4yxR 8oaIsCni6gCwLoCHedGWsbcSSnJ1tsapZpJ0e5/DGRcOx7NChv3LFGy5iYTC0K+BxKwfUn4xD4NPS JoF6UciH7blDVF4NR61Ft6ZIM2rsBVXybMq6XteWz4/La72GGngR+UG6+gWPTQM347MNg9+aqfGlg bUC8c3qA==; Received: from 77-249-17-252.cable.dynamic.v4.ziggo.nl ([77.249.17.252] helo=noisy.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.99.2 #2 (Red Hat Linux)) id 1wWV2r-00000000h1Y-2A1Z; Mon, 08 Jun 2026 08:09:23 +0000 Received: by noisy.programming.kicks-ass.net (Postfix, from userid 1000) id 7828B30044E; Mon, 08 Jun 2026 10:08:46 +0200 (CEST) Date: Mon, 8 Jun 2026 10:08:46 +0200 From: Peter Zijlstra To: luoliang@kylinos.cn Cc: Ingo Molnar , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Valentin Schneider , K Prateek Nayak , linux-kernel@vger.kernel.org Subject: Re: [PATCH] sched/core: Combine separate 'else' and 'if' statements Message-ID: <20260608080846.GB3102624@noisy.programming.kicks-ass.net> References: <20260608071842.325159-1-luoliang@kylinos.cn> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260608071842.325159-1-luoliang@kylinos.cn> On Mon, Jun 08, 2026 at 03:18:42PM +0800, luoliang@kylinos.cn wrote: > From: Liang Luo > > The kernel coding style recommends using 'else if' instead of > placing 'if' on a separate line after 'else'. This change makes > the code consistent with the rest of the kernel codebase. Right, this is because the things used to be inside #ifdef CONFIG_SMP. I did notice it a few times, but I generally don't bother with trivialities like this until the code needs touching for other reasons. But I suppose since you took the effort, I might as well apply this. But please don't go whitespace fixing the scheduler code. > Signed-off-by: Liang Luo > --- > kernel/sched/core.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/kernel/sched/core.c b/kernel/sched/core.c > index da20fb6ea25a..c2bf0fc6ac97 100644 > --- a/kernel/sched/core.c > +++ b/kernel/sched/core.c > @@ -3716,8 +3716,7 @@ ttwu_do_activate(struct rq *rq, struct task_struct *p, int wake_flags, > en_flags |= ENQUEUE_RQ_SELECTED; > if (wake_flags & WF_MIGRATED) > en_flags |= ENQUEUE_MIGRATED; > - else > - if (p->in_iowait) { > + else if (p->in_iowait) { > delayacct_blkio_end(p); > atomic_dec(&task_rq(p)->nr_iowait); > } > -- > 2.45.0