From nobody Sun Feb 8 18:08:42 2026 Received: from mail-pl1-f179.google.com (mail-pl1-f179.google.com [209.85.214.179]) (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 61337145B14 for ; Mon, 20 Jan 2025 04:50:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.179 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737348635; cv=none; b=qU/MUMyF1rZjSIi2HdqWDuNC5lWszyrgiWp2hQbMEufkoUjjqnrXd//6tnPLk65d7EwIZOcfavtKy8vusaY12TwcjOkDCszGC11+m7b56TmSw1TpIbYh1FbM2kHkqiHB18BIwpqIpoon5WsrIzHFTa5J2sNEU9FohWi7u9PQeb0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737348635; c=relaxed/simple; bh=e/iDzvTCC8bo1dFL2/v4kqgePEuwnjykIjQnI6TREos=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=IhoCT/En8oQe12NP0O7N5pDzAcyFcyFGuKZp37w9gRJ9C+Os+Ish+qOUbuBhG0BU2dO44dcIvzE4m6U6YsJfxX68O9a5/K+sFHe3m5Rw4EX4Zegb34mW/qmtPpvmnLkAJaEropreoNGwruDCal6s2RJ09GpWIZAax8B4pDtwEYY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=jbT5N4Ii; arc=none smtp.client-ip=209.85.214.179 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="jbT5N4Ii" Received: by mail-pl1-f179.google.com with SMTP id d9443c01a7336-21680814d42so66006195ad.2 for ; Sun, 19 Jan 2025 20:50:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737348633; x=1737953433; 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; bh=FW6GDAHddcOMPFKJEakNdIWoZuUyT1szsyK8VMgB8Uk=; b=jbT5N4IiRc67b3DRzhZw7kyJO8SML5ZJHdIv1I7VxTKrxYXxjswIhTLgaftIM9h+tJ +2vxh46mWo0kH5RJB9jzjdqJmC1DGmIJDy2EaR5XfKfYrjYiPa2C0d+MN4520u1fpTFy X2WyXM++aqGX/krCYfz71qMdA+c7+hqQSQoBID+73VgRtoQGM0fghbeNvCspdTAyn8ri z2ceVaDKRiuNtjnB7pUYCKHlKkoEuq20FihjzgsSOUHyO2b+N+umC0eFPLdsIc9hOlYp mtxODA+KGKQgvsPKv4B/DFxqylIOkBqhw2RNV/vJJ+blAgIrPRzkNC+JQLtAvlTD0sgt dvlA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737348633; x=1737953433; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=FW6GDAHddcOMPFKJEakNdIWoZuUyT1szsyK8VMgB8Uk=; b=eCNe94PNXDKR+DZVovnjM0h2JIsGbQO75Qo5QMf13YgibK3sWtWFdizjeVZb8gGXgc Qv+RbdXTy9nBq62+LTdTTsLhm32XxgqWCCbtXc9ayxaO+KldBBfDC9x6X0qM6nS9UffW jhFqTLuVKeV/je/djX3Xnh7D9Qo/ur8eQdntT572PMxuDouEum2D62g4LAIVHtOa2VWa 3ypvO3KnEnqvWdKvkP+9YGrOaR4F5go0WMMnE8oYGGU5vkmjicyeXeF6FkDo44w2Mx+x AqZDjEoHV4JlRvoZgtlzb0jf0R8eP6Ww60Y98HTwAP9bcv4NQkpVWtaX0BPOSJYVcqUI B8GA== X-Forwarded-Encrypted: i=1; AJvYcCVyMfTE8AZI8DXsV2Do+/4WoQfMwt2aGzn93Fr/qI7OfjM64EGKViL2AoO+iZ8aOlwddkdq4r4dEtMgOqM=@vger.kernel.org X-Gm-Message-State: AOJu0Yz0jYyuv36PzfBnwqPO4xQy6hDwE7EFq6Q+9dEK6M7InTzz5UD/ X2MFvz1qpQYRHHaJ73r8XxMKvVXXrc8x5rA3CA818TxgdNmJ3OO4OaLlzqEJYvM= X-Gm-Gg: ASbGncs+fjdU/XIJtslrU7Xo/I265RPa0gfoCJGo14bdXNbQvDCGMZ2qECaH4l3BJW3 JO93dMh3uIApeWL2dVU/7QBT9u7iAtUPLQNmRT85Z8zJAiwdk7Fcc8EjHp3k4fTrHbP5LwTBAMe jT7FWvl0y8cmtE4ZxCy6seE/ZXTM+8L3oYxb7/gZVXxYVkaiJ6cpX/wa+/2J+s5VQare9r5hOG0 TSFrzFnb7B5Uek1vfo6P4KzYk8DvbRmQChR5jVr4zwbHCGntgP7dW9WkyIx50CEDAdJWmCP X-Google-Smtp-Source: AGHT+IGFk0vEdymtZTj+lLuHlMGCHpVVSzOjAS6UfJXaYfWRkrCAng+HqZSDbAH8bdLeqj6n7JsTPA== X-Received: by 2002:a17:902:ce8a:b0:216:32c4:f7f5 with SMTP id d9443c01a7336-21c3540c7a1mr174490975ad.19.1737348632564; Sun, 19 Jan 2025 20:50:32 -0800 (PST) Received: from localhost ([122.172.84.139]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-21c2d3a91cesm52428625ad.133.2025.01.19.20.50.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 Jan 2025 20:50:32 -0800 (PST) From: Viresh Kumar To: "Rafael J. Wysocki" , Viresh Kumar , Krzysztof Kozlowski , Alim Akhtar Cc: linux-pm@vger.kernel.org, Vincent Guittot , kernel test robot , stable@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] cpufreq: s3c64xx: Fix compilation warning Date: Mon, 20 Jan 2025 10:20:25 +0530 Message-Id: <76b218721e5fd5ac2fc03e1340595c9a56c1613d.1737348588.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.31.1.272.g89b43f80a514 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The driver generates following warning when regulator support isn't enabled in the kernel. Fix it. drivers/cpufreq/s3c64xx-cpufreq.c: In function 's3c64xx_cpufreq_set_targ= et': >> drivers/cpufreq/s3c64xx-cpufreq.c:55:22: warning: variable 'old_freq' se= t but not used [-Wunused-but-set-variable] 55 | unsigned int old_freq, new_freq; | ^~~~~~~~ >> drivers/cpufreq/s3c64xx-cpufreq.c:54:30: warning: variable 'dvfs' set bu= t not used [-Wunused-but-set-variable] 54 | struct s3c64xx_dvfs *dvfs; | ^~~~ Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202501191803.CtfT7b2o-lkp@int= el.com/ Cc: # v5.4+ Signed-off-by: Viresh Kumar --- drivers/cpufreq/s3c64xx-cpufreq.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/cpufreq/s3c64xx-cpufreq.c b/drivers/cpufreq/s3c64xx-cp= ufreq.c index c6bdfc308e99..8fc43a74cefb 100644 --- a/drivers/cpufreq/s3c64xx-cpufreq.c +++ b/drivers/cpufreq/s3c64xx-cpufreq.c @@ -51,15 +51,16 @@ static struct cpufreq_frequency_table s3c64xx_freq_tabl= e[] =3D { static int s3c64xx_cpufreq_set_target(struct cpufreq_policy *policy, unsigned int index) { - struct s3c64xx_dvfs *dvfs; - unsigned int old_freq, new_freq; + unsigned int new_freq =3D s3c64xx_freq_table[index].frequency; int ret; =20 +#ifdef CONFIG_REGULATOR + struct s3c64xx_dvfs *dvfs; + unsigned int old_freq; + old_freq =3D clk_get_rate(policy->clk) / 1000; - new_freq =3D s3c64xx_freq_table[index].frequency; dvfs =3D &s3c64xx_dvfs_table[s3c64xx_freq_table[index].driver_data]; =20 -#ifdef CONFIG_REGULATOR if (vddarm && new_freq > old_freq) { ret =3D regulator_set_voltage(vddarm, dvfs->vddarm_min, --=20 2.31.1.272.g89b43f80a514