From patchwork Wed Jan 10 14:13:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lizhe X-Patchwork-Id: 186916 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:2411:b0:101:2151:f287 with SMTP id m17csp825483dyi; Wed, 10 Jan 2024 06:26:19 -0800 (PST) X-Google-Smtp-Source: AGHT+IE5YQZY8Tz7nPBklSqvCI3TMVeNwvw/e625u6U69JVKtjtE3WLh66zyseJKVriV5K5MoBPi X-Received: by 2002:a05:6512:33d5:b0:50e:9356:da5e with SMTP id d21-20020a05651233d500b0050e9356da5emr384836lfg.122.1704896779322; Wed, 10 Jan 2024 06:26:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704896779; cv=none; d=google.com; s=arc-20160816; b=KKU9FgO4IRp4BIp8cg+I48c8LjlNMV8IRm6KnoFtw60OOMAPRqSNg+UUOvyc8tqpjL apVcQYYgKkOxkTpH3r8sCIT9uHECcinu9n78kAchvr0vxvjb2rfydTH6Nz+mMRpTIkzo pBGyFQRHm8c1zFVVk/WrPQzZeQaDZKbRUnDTt/PN0ofpluyrH/sdI49XlajsUtAl4LZx KAczK3OFXEhWkxl0CNjePFKGFxW47i9QO+YDsXw5TIwkzexQv/+iLwXtMeo4q474AxcU 4V+ue0KsrbNb1rAX7barMmd4M5wOu32lH0YMMb7zm7kPFRBpAzbdaiCQT6MXPs03V5Lr 0rxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=EFA5OSg/9wM/36Kx2+oDQpahutVpueF/4LM7t5Wshbw=; fh=p8bG+QaV+h3sDvX7RecmsrmAqWXIyn8G5RxUvu6rMO8=; b=SFsi8Bbs1ZiYHD6QWW8XlPUZP9ILplBjajGySKZ5x2zQRSQrpdA9cYu8AY+cTfiiI1 +/z41T0VadnzHKcRxdVEqN/obRgnjHy7m5IrEDpWM5azyeUOnsrPdEgRfR7vh8Lwl9T2 GKbxwkDHUa+rsmDdKDLoWE2DfD2TMuilBv3TH51DDV7yjwpp4Gi4ETV9ukg/34OjIk4q pSeeSdDiPdLkN2cy92yXBlFRaaf5caYtcW2OnebvrReQ0/wLvj3tmsA4eNPaQb7XunK5 HJszZu2RSAaVZ1AQgeotH1Cr+3jhruLi3/Un999iQgemGrmLzc6tYg9oS9rk2f45YaR+ xY/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@163.com header.s=s110527 header.b=JWIGZWuj; spf=pass (google.com: domain of linux-kernel+bounces-22340-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-22340-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=163.com Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id z8-20020a05640240c800b00554c82eabe5si1773930edb.481.2024.01.10.06.26.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jan 2024 06:26:19 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-22340-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@163.com header.s=s110527 header.b=JWIGZWuj; spf=pass (google.com: domain of linux-kernel+bounces-22340-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-22340-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=163.com 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 am.mirrors.kernel.org (Postfix) with ESMTPS id B42891F28E45 for ; Wed, 10 Jan 2024 14:18:47 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 92DED4E1CA; Wed, 10 Jan 2024 14:15:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=163.com header.i=@163.com header.b="JWIGZWuj" Received: from m15.mail.163.com (m15.mail.163.com [45.254.50.219]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EABE54D5A9 for ; Wed, 10 Jan 2024 14:15:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=163.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=163.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-Id:MIME-Version; bh=EFA5O Sg/9wM/36Kx2+oDQpahutVpueF/4LM7t5Wshbw=; b=JWIGZWujmLzprQB0qN3hl rupIBYxB9vKVBXXqNY0E9UxcWvMlxCaJa1YjLGHZn/3FpnSfXdMMgpVvoNaayjCB j7tnHafuTBL0K25YDYmEaXrWrRBiOBBZXMGrstIw7DXfA10mPx5hNfKWT/7ph8iP xh52wVmZaHMASfeszpARMs= Received: from localhost.localdomain (unknown [114.105.142.232]) by zwqz-smtp-mta-g2-4 (Coremail) with SMTP id _____wDnlzkfpp5l01UpAw--.31262S4; Wed, 10 Jan 2024 22:14:31 +0800 (CST) From: Lizhe To: tglx@linutronix.de, ilpo.jarvinen@linux.intel.com Cc: linux-kernel@vger.kernel.org, Lizhe Subject: [PATCH] hrtimer.c : Remove redundant thread state settings Date: Wed, 10 Jan 2024 06:13:49 -0800 Message-Id: <20240110141349.52718-1-sensor1010@163.com> X-Mailer: git-send-email 2.25.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-CM-TRANSID: _____wDnlzkfpp5l01UpAw--.31262S4 X-Coremail-Antispam: 1Uf129KBjvdXoWrWrWUuryDKrW3Ww13WF45ZFb_yoWxArc_uw sFgFy8Jr15JFnFkrs5Cw43Zry8KFW5JFWkZa9FgrZrJa1vyrWj9rn5AFZxCF98ZF9rGF1D AFZ8GrykK3y5JjkaLaAFLSUrUUUUjb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7sR_Yii3UUUUU== X-CM-SenderInfo: 5vhq20jurqiii6rwjhhfrp/1tbiWAthq2VOA70nUwAAs4 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1787713845286516974 X-GMAIL-MSGID: 1787713845286516974 After a thread is awakened, its state is already task_running Signed-off-by: Lizhe --- kernel/time/hrtimer.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c index 760793998cdd..b123e9f4401a 100644 --- a/kernel/time/hrtimer.c +++ b/kernel/time/hrtimer.c @@ -2310,8 +2310,6 @@ schedule_hrtimeout_range_clock(ktime_t *expires, u64 delta, hrtimer_cancel(&t.timer); destroy_hrtimer_on_stack(&t.timer); - __set_current_state(TASK_RUNNING); - return !t.task ? 0 : -EINTR; } EXPORT_SYMBOL_GPL(schedule_hrtimeout_range_clock);