From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pz2-f1.google.com (mail-pz2-f1.google.com [74.125.228.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3F6D23A380A for ; Mon, 6 Jul 2026 14:39:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.228.1 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783348771; cv=none; b=HSjHsy0Dh39kU+xYcEGmv3e0aACxDKYnotbOowjRY5D/TjYJk2vIBXtIMad5+oHerFi/WtNH7dKKUI12UuOsyrA/wWiqnSv7SGhWp1EpNWR+O1EtHmXAnYIguqxGima6LeQiu6jT9jAIA/gClwRtaHdmRXqSGL+bUGFPSivnD1o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783348771; c=relaxed/simple; bh=x90aUn0J9cOzFK9OMOuB1T/9j8EV5QSJzT98AE3Ubb4=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=UjVx1T5uRsaP2Y4Ny+NBzrb3Ikzldl1fmDx3yGhCdG0Oh4Tu1XBRcN1ve/9L0lPaOSsCIBfpWDo0qf/Bxz1Y6jku9tlWMWgg4qiE0j+Ne1JXnt1TxSWAmG26KR2+Wn6EyyD+hyTlmAbYStLqY1tMbfXtvpKnY2C05tmVzlpjA4M= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=Q9krdShV; arc=none smtp.client-ip=74.125.228.1 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Q9krdShV" Received: by mail-pz2-f1.google.com with SMTP id 41be03b00d2f7-c888c2cff99so643112a12.1 for ; Mon, 06 Jul 2026 07:39:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1783348769; x=1783953569; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to:content-type; bh=FfyQp4sNmNhsL49jNoWYN8Wz/1RG0tztSjlIz4Q1N+g=; b=Q9krdShVbBLeGfakh7SnPqJwfUsVKx23I7oQuvp385w6eanlpdq2LWyOGKsfuerezQ TOGwf38LE57e9ZCyTqm4jrTI5QrADwjcmO42fFAwYnwm/ny4sKXt4hViEVgtVbC6ey3f m87NfW7RbSfKrKDRHDy49gpGdVt2FqbKduRkSHcWZj9J4PGEnadi07ftJt4OUKJSKASb TTxOLCxmwHFfMvXz/VoBAzGua3LJNYG2WOtOTMJ/alIwcO0liFfznfALOzGZL8RlSKCa 7IN0EfZsK8oNwV9X7oLLvrgEpwfmZ/OmCItet/OwIIduIdGx+glnQHErb0T/0F7/oGx9 VoIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783348769; x=1783953569; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=FfyQp4sNmNhsL49jNoWYN8Wz/1RG0tztSjlIz4Q1N+g=; b=finC2iJbbsgDys2pxukRU2fkPPEU3GrFwgdTJM+05xPl2rkU6cV2LiS7B32e3Nbb+u yRC52eRVt8b6oo7bJEYKga3BLolY+b1tvTJt369iAQpRuwLoKMifhgixp0TlF3onHj6U 0r8SE/ED9NityhSyoL1rkSH52mGv3EOCEnbtrCpCIyT2Ty3jU0uKPS0gyYWOZxxWwQnl F9klAaoXBzQ3jOQpJDFQoUqHnYY3WZvIAKBcMP/W44GXTdJOSeShJgoFtZvuSkyI02JM Xx7pExwfh1Ytx2x6kYtacF8vrE63Ym4D80v9yeI5b//aerqkuh4PV9RCRlVJ7JIp3Azj 35gQ== X-Forwarded-Encrypted: i=1; AHgh+Rq+0e8L6FU58lzcdYeS1anCoFm6anoNywwoiq8vYka9YMXtq69GOC5qVBcX6LbIHskfh78TmkQiXpap06Q=@vger.kernel.org X-Gm-Message-State: AOJu0Yym9P75yEiaFgl6/KY6ogij6boDXPw8Qu9gXMPNBvDeZlYmQx02 E0N4DEiV/fx7R+WapEimTorW8/DpF8bNtyYQy97y7Pwpf8vJvzbZqok= X-Gm-Gg: AfdE7ckgZ5CGD/7xdvfdw4lJitb8rfS0OeZSvqsfI7y1n+4E3d0SwHmiGsq4zHByKTE SjlUKUjlcIQDUpRAzeMW6Csx7ghiV62jKXbrdbix3Z5nBrdi/NT1/oKpBfZm4227X1g4VfCRT1l qTLr81L0LM59MoU87C74RZI6Rt+n1h6s4QkInooGf2sOtrNIsyIeA4sIO4lpC6KrHo4PEv7E7Aa 2a+VKKsyzI9Uhnu1i9wpkVpYOdriTkVI4Shgct73YPMJWPXlmFKALhpzryx7u/pWwU8v+qrlG/D GLVFQs3o9zk2LG3X7MfCFTsWvHOd9+ALuiyBt3Fz0i9j+V/Z+BNiamdVIZg+mrmILzppoiymz59 7TTawoM1duA7ntEOLqGeSEcNNHk2730IrGZ1TYmLH5IgpzMti5rkHjNeGi0m0+u2nW5UCCWUY4t A6J4gYF8L81zIwrC6ixr7Awzd55W2Mbinjh/yAiZivqAiK X-Received: by 2002:a05:6a00:2301:b0:845:c6c3:5e75 with SMTP id d2e1a72fcca58-84826e13ba3mr842845b3a.42.1783348768602; Mon, 06 Jul 2026 07:39:28 -0700 (PDT) Received: from localhost.localdomain ([211.196.223.197]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-847f6b609acsm3858991b3a.1.2026.07.06.07.39.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Jul 2026 07:39:27 -0700 (PDT) From: Jinseok Kim To: rafael@kernel.org, viresh.kumar@linaro.org, shuah@kernel.org Cc: linux-pm@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/2] selftests/cpufreq: Remove unused local variables from switch_show_governor() Date: Mon, 6 Jul 2026 23:38:53 +0900 Message-ID: <20260706143857.3306-1-always.starving0@gmail.com> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit switch_show_governor() assigns the current governor and frequency to local variables before switching governors. However, these variables are never referenced afterwards. The function does not restore the previous governor or use the saved frequency, as backup_governor() and restore_governor() already handle state preservation elsewhere. Signed-off-by: Jinseok Kim --- tools/testing/selftests/cpufreq/governor.sh | 5 ----- 1 file changed, 5 deletions(-) diff --git a/tools/testing/selftests/cpufreq/governor.sh b/tools/testing/selftests/cpufreq/governor.sh index fe37df79c087..212ef1cf43d5 100755 --- a/tools/testing/selftests/cpufreq/governor.sh +++ b/tools/testing/selftests/cpufreq/governor.sh @@ -100,11 +100,6 @@ switch_governor() # $1: policy, $2: governor switch_show_governor() { - cur_gov=find_current_governor - if [ $cur_gov == "userspace" ]; then - cur_freq=find_current_freq - fi - # switch governor __switch_governor $1 $2 -- 2.43.0