Received: by 2002:a05:6a10:6d25:0:0:0:0 with SMTP id gq37csp6184801pxb; Wed, 21 Jul 2021 13:50:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyPU1mHGmKduHRMrsZJn7Hm09hXhQ5su+rjXt6Pc5RpzwCUaE8uM5RLn4/TfP0T9TnTvujl X-Received: by 2002:aa7:db94:: with SMTP id u20mr50397961edt.381.1626900630289; Wed, 21 Jul 2021 13:50:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626900630; cv=none; d=google.com; s=arc-20160816; b=O/4+gIwSd8nnG/ZtVKwP1WPL8kll2o2wCx3F9LQdp9Hv28efeeBze1tyjvv/gbnJNA JNiQZl9V1RhegDYRAekwxl/n2awLo/3ww2IQe87KL/yQX2iMR0ktKYkCU/ZyzfCJu6yp rvSL4fhiWJQRN5+xyoVaRgo0m0HAjVnZXUx35vhkz3iIct7zVikcAOcBSDdMGUZwlxKm BW7OeZPYrUC/AjVhihObjyQPH3Gs+ayqAPEpJv7FVTryc1fbcxNM+USDiAptWjo+5LyM F79fpaapDyiX89Aqf1j6svMWmASNjbXTV0+Pgrl1mSrOhlfu1/m6f+hXNvxZbqa8G/ry paFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=0xyAElaQXY15MOE1lmmBtUKzTM5GXmV/ZWvrtwaH6iA=; b=W86FliS2sWeKxSm/ZuZhu55t9/yjRSzmRAFTF2FagZzsbvUFssXlw4KyfiT6U2P/FN BK+L1XTr2d+unwu0kkKb17Vg6DBzpmRad4VqIvMMTOtjtyoJDw8xN+kTwc0ulTO/Y+sD 3nrz3R85BNJQv+pDQVwOhOaL9RbZjUxyQTBBdy3/EhkhE4cwjYpfPYTbiTe8MaQ9GK0w DcQR9xL0rRJHfge0gQHVlqjJ8G00oCqAW66z9WTW/8nhwXNNCA5999TnJ7Y0mDHMhcqD J/PY3Pw8Rj7KmMdLypI6htACNvKYo43tv4srXx1wabddIwWJTcqVlAj+xPkeZUq21Jf3 Eqfg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=H164hPdm; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q5si31066151edh.490.2021.07.21.13.50.06; Wed, 21 Jul 2021 13:50:30 -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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=H164hPdm; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231702AbhGUTlL (ORCPT + 99 others); Wed, 21 Jul 2021 15:41:11 -0400 Received: from mail.kernel.org ([198.145.29.99]:50102 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237450AbhGUTkx (ORCPT ); Wed, 21 Jul 2021 15:40:53 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id AAF2E61358; Wed, 21 Jul 2021 20:21:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1626898889; bh=BKxY760Q0+rm4WqKjHEoXmDIxEOWQtXd1bpJVPxdpAY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=H164hPdmIF7rWaKoONLGVL2Rr9yWzrw62TBX/WET7LZ7lrjlfw8DmAkVlj3BbbdcU 2jhGSrdNI9wZ+TXNP5EkxFKeJ4nB8KfTK5DuUOz/QfaMVrSk0i/d/HzNH/HKbVqKbS B0pDLI2SEoKhS6+A+wIOcklX9lhS16JcmdcLlHL6+lHtChrczAhE4lvLlYykXVJs2F Y0sabhNsqZvRjRXuMbdO54Xo4l3PeAuEz7sxudDxCIdTvk8eqcuctZimAVy50PEm+v u6+wIJoT6s6Ha+aYkkqjF41IftFaKvET7WcwcepZgXnCvy9xRsFrGPl+/9cjFTwOa0 mmRIW6+2dn8zg== Received: by paulmck-ThinkPad-P17-Gen-1.home (Postfix, from userid 1000) id 434A35C0C70; Wed, 21 Jul 2021 13:21:29 -0700 (PDT) From: "Paul E. McKenney" To: rcu@vger.kernel.org Cc: linux-kernel@vger.kernel.org, kernel-team@fb.com, mingo@kernel.org, jiangshanlai@gmail.com, akpm@linux-foundation.org, mathieu.desnoyers@efficios.com, josh@joshtriplett.org, tglx@linutronix.de, peterz@infradead.org, rostedt@goodmis.org, dhowells@redhat.com, edumazet@google.com, fweisbec@gmail.com, oleg@redhat.com, joel@joelfernandes.org, Liu Song , "Paul E . McKenney" Subject: [PATCH rcu 15/18] rcu: Remove useless "ret" update in rcu_gp_fqs_loop() Date: Wed, 21 Jul 2021 13:21:23 -0700 Message-Id: <20210721202127.2129660-15-paulmck@kernel.org> X-Mailer: git-send-email 2.31.1.189.g2e36527f23 In-Reply-To: <20210721202042.GA1472052@paulmck-ThinkPad-P17-Gen-1> References: <20210721202042.GA1472052@paulmck-ThinkPad-P17-Gen-1> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Liu Song Within rcu_gp_fqs_loop(), the "ret" local variable is set to the return value from swait_event_idle_timeout_exclusive(), but "ret" is unconditionally overwritten later in the code. This commit therefore removes this useless assignment. Signed-off-by: Liu Song Signed-off-by: Paul E. McKenney --- kernel/rcu/tree.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c index 37bc3a702b6ea..7b65ac3f49e5a 100644 --- a/kernel/rcu/tree.c +++ b/kernel/rcu/tree.c @@ -1960,8 +1960,8 @@ static noinline_for_stack void rcu_gp_fqs_loop(void) trace_rcu_grace_period(rcu_state.name, rcu_state.gp_seq, TPS("fqswait")); WRITE_ONCE(rcu_state.gp_state, RCU_GP_WAIT_FQS); - ret = swait_event_idle_timeout_exclusive( - rcu_state.gp_wq, rcu_gp_fqs_check_wake(&gf), j); + (void)swait_event_idle_timeout_exclusive(rcu_state.gp_wq, + rcu_gp_fqs_check_wake(&gf), j); rcu_gp_torture_wait(); WRITE_ONCE(rcu_state.gp_state, RCU_GP_DOING_FQS); /* Locking provides needed memory barriers. */ -- 2.31.1.189.g2e36527f23