From patchwork Tue Dec 19 06:45:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wang Jinchao X-Patchwork-Id: 180783 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:24d3:b0:fb:cd0c:d3e with SMTP id r19csp1753153dyi; Mon, 18 Dec 2023 22:46:05 -0800 (PST) X-Google-Smtp-Source: AGHT+IFMmzL2BU2xLWLjTNm7PTYHGgyGzX2to+W3wpHxcmtnk+0qwX6/F+MZRfKVbMDteQRqpqgD X-Received: by 2002:a17:903:1ca:b0:1d3:9299:4b6b with SMTP id e10-20020a17090301ca00b001d392994b6bmr1037539plh.38.1702968365586; Mon, 18 Dec 2023 22:46:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702968365; cv=none; d=google.com; s=arc-20160816; b=uTsZ1RXoTaAmSPrp2Gs3AjpiQ6VgEaC4ezB1IssF0bacOk8DqlRGe+OGd3/sr4wO4+ 9ilq+Rku3UaYopQ6M9Uk2/EabW4Q9176RMLEyVd9XE0kALbcpie5ZTi8x/LtXFig/WG6 9dKQi8ggsgWgJ9UlM1jYNCcZzb08rTQncPma+Gu6cW2nqctD86pau+9GBiY8ufKk//xX mVTm7hPoVk6GTdbtO1nIadaQ7myc1XT1bsbWxzdGRtzhMhRDEHNalmO+eZnR0dUKU15b E21iKFTm050s+o0Gbq/iR8jDpsgNgEQgXLtRhSccUyMdsIi/ug9li4ARVclskIU21muJ D3RA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-disposition:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:message-id:subject:cc:to:from:date; bh=2g65qbAMsG56O+LTdYtlsmCLxmY39WsKzaF5SmOzNBY=; fh=f40UFx4PIoN5VHjot5Te0Vsnl2epc2I3Vpkjl2f6MCo=; b=T/I69/3pJVW46nF613QpDt/KfvcYI5xFD3b/kcUOzIqL4uegK5TGldntmOjDu36hmh 1Bn+SfMYD7pmQj70BoYTFJ9oRIANY0z2hG5o+DVtNrtBJMSdqW8Osd+TTRqM5U9ze1U+ dgcIHovoAaqSho22yxp9yE+agIs6kPwMdeUu0c7tN9iw1zCDjvSWKMNM36bI7ruTpjbj rHdV5me02DALirrY1x+eSCGBVYPWv72WBBDoKDpLJbT3PI6bWnxDZ9BxaTVoT0lQKfvC FlqfQJ5GCHR+sF7df8wRDl05LEiu8y5/whBUXr1uU+bf98rx7/qQZ1IJMaqXXJAViV0N /cdw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-4760-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-4760-ouuuleilei=gmail.com@vger.kernel.org" Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id n67-20020a632746000000b005cd79ebed84si5673650pgn.341.2023.12.18.22.46.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Dec 2023 22:46:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-4760-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-4760-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-4760-ouuuleilei=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 6257328623A for ; Tue, 19 Dec 2023 06:46:05 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DB83113ADB; Tue, 19 Dec 2023 06:45:52 +0000 (UTC) X-Original-To: linux-kernel@vger.kernel.org Received: from wxsgout04.xfusion.com (wxsgout04.xfusion.com [36.139.87.180]) (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 A2F9D134A5 for ; Tue, 19 Dec 2023 06:45:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=xfusion.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=xfusion.com Received: from wuxshcsitd00600.xfusion.com (unknown [10.32.133.213]) by wxsgout04.xfusion.com (SkyGuard) with ESMTPS id 4SvRv61Sw7zB1Cdv; Tue, 19 Dec 2023 14:42:10 +0800 (CST) Received: from localhost (10.82.147.3) by wuxshcsitd00600.xfusion.com (10.32.133.213) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Tue, 19 Dec 2023 14:45:44 +0800 Date: Tue, 19 Dec 2023 14:45:43 +0800 From: Wang Jinchao To: Ingo Molnar , Peter Zijlstra , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Daniel Bristot de Oliveira , Valentin Schneider , CC: , Subject: [PATCH] sched/core: Consolidate switch_count assignment Message-ID: <202312191445+0800-wangjinchao@xfusion.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Disposition: inline X-ClientProxiedBy: wuxshcsitd00600.xfusion.com (10.32.133.213) To wuxshcsitd00600.xfusion.com (10.32.133.213) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785691756924859607 X-GMAIL-MSGID: 1785691756924859607 Eliminate redundancy by consolidating the switch_count assignment, removing the duplicate operation. Signed-off-by: Wang Jinchao --- kernel/sched/core.c | 1 - 1 file changed, 1 deletion(-) diff --git a/kernel/sched/core.c b/kernel/sched/core.c index a708d225c28e..ecac59aa211d 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -6646,7 +6646,6 @@ static void __sched notrace __schedule(unsigned int sched_mode) delayacct_blkio_start(); } } - switch_count = &prev->nvcsw; } next = pick_next_task(rq, prev, &rf);