From patchwork Wed Jul 15 08:26:31 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 235563 Delivered-To: patch@linaro.org Received: by 2002:a92:d244:0:0:0:0:0 with SMTP id v4csp412506ilg; Wed, 15 Jul 2020 01:27:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyJ6t9pCAwIU2wcXQwLAxZoQ1pKeV8/qtvsVu+KQ2ttnkdrqqwr2NmAZ2N1bGp5G4B7dLjZ X-Received: by 2002:a17:907:2105:: with SMTP id qn5mr8111217ejb.308.1594801624451; Wed, 15 Jul 2020 01:27:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594801624; cv=none; d=google.com; s=arc-20160816; b=Y6YrI0fs6dRFmcQ1rKER+zghKrjsqUTrTequNrJpacQAoqF48TYZ065zmpQ5nYPWFU tKU54DeHoSzW2FAcPj15qcU8MGum2qRdHN9//wLQIURVUvhKWWoOi2jBlkOKfljxqLTV 8lasveKO1v4iqhXWgNLfO2oIPNpVl1+EMqi6VsDZvWaHeN6gauHWZixQFtjqsUU5OmRN r/DegSYiFEgtrl5iE6MmwZl22mcObqOhflT7m5mPk4jicM7rgVzZzdwmhQI+SWV+A3h9 7/Y9J+t5DGO6zU69U2GjTCtWqFdzlTClJiYwyc4BVt+wGN1flc8iJ9dV3T0MrIOk73Rs Mdgw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=yBqTF9msKxXESKXR6D7ZZTPRiLswk1Xy6QhvSew6gR0=; b=VsTJnOK1uDVGWJ1UoZZPBEN4GXejLTteYo4atey/VRy5dEV+gnhfILyrQgQV4IPOLr 09uZhnLjMvVIzJAV2rIG/Hcz8hwuA+FafEqLWTMLZwb/udJax9tWfwLO09oOiLYORmju P4VG7ZweN/Gn/qebNgppt5QLUblQwgyEwOxXleybrtReQQsdNKgXpxLi+FW5X0JJU3Ph zKY/IzqgthUmHUFGTGr287UPs4FjM/ixSzEqO1hhdhQjEtfMGTTAmB/nSo0EEUXyNV2t 6MCz7nrVcwEwSq4hut4xs6n3xMSidKrnrUDeE/jGA7df5Sh6jelQDTRjX0FW6/jtMLQQ HUIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=oRHNplZ7; spf=pass (google.com: domain of linux-pm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b10si818166ejv.385.2020.07.15.01.27.04; Wed, 15 Jul 2020 01:27:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-pm-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=@linaro.org header.s=google header.b=oRHNplZ7; spf=pass (google.com: domain of linux-pm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729925AbgGOI05 (ORCPT + 10 others); Wed, 15 Jul 2020 04:26:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51868 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729921AbgGOI0x (ORCPT ); Wed, 15 Jul 2020 04:26:53 -0400 Received: from mail-wr1-x443.google.com (mail-wr1-x443.google.com [IPv6:2a00:1450:4864:20::443]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F23C2C061755 for ; Wed, 15 Jul 2020 01:26:52 -0700 (PDT) Received: by mail-wr1-x443.google.com with SMTP id s10so1419489wrw.12 for ; Wed, 15 Jul 2020 01:26:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=yBqTF9msKxXESKXR6D7ZZTPRiLswk1Xy6QhvSew6gR0=; b=oRHNplZ7GSg6wW9XCQnXu7Ag3RRbpbsqZQOc7oxhhgEyiH+dzYvNYDSO1XjRvkWcJl 7uBZeyJQHXz5gFKwdA4IaSPpjV0DX6KUjXmZbpt8DBZ3nZ44yItO9dQ//zBdrT/9cvTm Z72l+F9wCR8PderUySuiWy3jJEaa+wHxOy/cCPEY1a5C1RNJjZLnes/9fkbm4M1QHuS+ PgfHkNEUwTaIxHSK6Iv6NBKuuHfF1GDdnFJjO0G83E91e34xz0i1ZA2+w8hIbKEF8GHy LlIZ+WuoYrKed+fVVbT2gpUEMdYo71pO5SW08hEGUWqSPfskXX6Mi9dOWpWUo89QJinQ FZZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=yBqTF9msKxXESKXR6D7ZZTPRiLswk1Xy6QhvSew6gR0=; b=j+tSGeAG+jpIjoW4WzIMpbo1qabNGo0sT36drz95IdsoKAwZygpGgb+kGZBsHPdZ// 1Xa7gKLYu8pH81jDtNs9Yli0OVOA+J57tDl6E3TFCzOmY+0IGX696LCJa6SzxhFUUSOH tM7cheUbnqbaGx+36M5FTurCWi42d+avhX0M4h7Tciktd62cob0DU4rbDuyQFPBoD9vm b/PiLtLOwpv1mFTefesoV3/UsYSnE2oXZr8ir8ElzHtN+MukKXTn4U0jf8gLZq49IKCt hSn8RNmSJBKePNQjUPkokTj47Kb4e1rRvi/gksBftLIKgA7mVTcCf7DhpF5rMRAdJyyv rgSw== X-Gm-Message-State: AOAM532xMcsfAQJNWdNHcbH5VYQATcynsu5ruBQUzhItGRsT36EHyPeB w/qp4/3PfPb67jUA98/ReWbevA== X-Received: by 2002:a5d:6ac1:: with SMTP id u1mr9898491wrw.123.1594801611303; Wed, 15 Jul 2020 01:26:51 -0700 (PDT) Received: from localhost.localdomain ([2.31.163.61]) by smtp.gmail.com with ESMTPSA id h13sm2400361wml.42.2020.07.15.01.26.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Jul 2020 01:26:50 -0700 (PDT) From: Lee Jones To: rjw@rjwysocki.net, viresh.kumar@linaro.org Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, Lee Jones , Andreas Herrmann , Dominik Brodowski , Pavel Machek , Paul Devriendt , Mark Langsdorf Subject: [PATCH v2 10/13] cpufreq: powernow-k8: Mark 'hi' and 'lo' dummy variables as __always_unused Date: Wed, 15 Jul 2020 09:26:31 +0100 Message-Id: <20200715082634.3024816-11-lee.jones@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200715082634.3024816-1-lee.jones@linaro.org> References: <20200715082634.3024816-1-lee.jones@linaro.org> MIME-Version: 1.0 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org if we fail to use a variable, even a dummy ones, then the compiler complains that it is set but not used. We know this is fine, so we set them as __always_unused here to let the compiler know. Fixes the following W=1 kernel build warning(s): drivers/cpufreq/powernow-k8.c: In function ‘pending_bit_stuck’: drivers/cpufreq/powernow-k8.c:89:10: warning: variable ‘hi’ set but not used [-Wunused-but-set-variable] 89 | u32 lo, hi; | ^~ drivers/cpufreq/powernow-k8.c: In function ‘core_voltage_pre_transition’: drivers/cpufreq/powernow-k8.c:285:14: warning: variable ‘lo’ set but not used [-Wunused-but-set-variable] 285 | u32 maxvid, lo, rvomult = 1; | ^~ Cc: Andreas Herrmann Cc: Dominik Brodowski Cc: Pavel Machek Cc: Paul Devriendt Cc: Mark Langsdorf Signed-off-by: Lee Jones --- drivers/cpufreq/powernow-k8.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.25.1 Acked-by: Pavel Machek diff --git a/drivers/cpufreq/powernow-k8.c b/drivers/cpufreq/powernow-k8.c index 3984959eed1d5..0acc9e241cd7d 100644 --- a/drivers/cpufreq/powernow-k8.c +++ b/drivers/cpufreq/powernow-k8.c @@ -86,7 +86,7 @@ static u32 convert_fid_to_vco_fid(u32 fid) */ static int pending_bit_stuck(void) { - u32 lo, hi; + u32 lo, hi __always_unused; rdmsr(MSR_FIDVID_STATUS, lo, hi); return lo & MSR_S_LO_CHANGE_PENDING ? 1 : 0; @@ -282,7 +282,7 @@ static int core_voltage_pre_transition(struct powernow_k8_data *data, { u32 rvosteps = data->rvo; u32 savefid = data->currfid; - u32 maxvid, lo, rvomult = 1; + u32 maxvid, lo __always_unused, rvomult = 1; pr_debug("ph1 (cpu%d): start, currfid 0x%x, currvid 0x%x, reqvid 0x%x, rvo 0x%x\n", smp_processor_id(),