From patchwork Tue Jul 14 14:50:44 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 235536 Delivered-To: patch@linaro.org Received: by 2002:a54:2c11:0:0:0:0:0 with SMTP id g17csp201457ecp; Tue, 14 Jul 2020 07:51:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxeGp/qHSzjm8WKFMwCDD8pLuuyn0kqCPkM6E99ogBiJilI9PNBluca4qZ88VSRJ1o1Ygx+ X-Received: by 2002:a05:6402:1d35:: with SMTP id dh21mr5037686edb.186.1594738297709; Tue, 14 Jul 2020 07:51:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594738297; cv=none; d=google.com; s=arc-20160816; b=rCeFzLhkl/eu3YdKS1i/DW4lwH/bpOZkbYo0vFE8sV9rIZwQIdmwQm6ny8pcdBBtgh FJ6a0yGw/PvqJx+oBFLAhfx5wcZ3VpMj4gT6khxx8XrwzWXJr+Ir2XnAWby7gtRREMiC QCHA7ZyXy86o1/fpKmXbsBwzI2RJ11Gkj1d7HvZhAsnZf2PgUXdO+4WT8Hk6O36uE6rb wpYcJkWeYH8aI4hJn10DJQx4nh18x8cwoJKf84fwNjTADdCbOGUFhQFb3WzMXRR4ApBG u/hptOJwiToKGv4dh+FzxK9/i8xYDm8TxhwPWLdgZt6U2fg9y2VKPqKNXwZRbqjyfgb8 GqMQ== 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=oYBUe5BwYsr/R2phlHidQsm6+vzt4cxxnkc0JimKqEE=; b=xtmYDoIl7cZNL5A8cBuomCxtWhhT9F1VsXY/ZI50HaMrVhDO0Tyk5cavI6WXClb8S5 AFNUZ43gDAqnxXVJAMbg5zjPPOm4/iHTjoMdbcvSxAFFog7AvgiXzjHktjHuKMvRGX2H CDWwE2FwJBu/3JYFnVIDUyC9vaTXf4i28tIlMKHMFPAbpyRmf2Rc54wpZ1RAezqt33LN o8AvG+c9PWyNF7xVOyOrJW5Fo/wrgI2PG7olgS4dhAzjB0r7T0C1LH0DX4yYzWQpxKK1 AqVhYyVfuA2oxHVCaqYn/yK9QMQma2x1vCRm4xo3UE7U2Ys5Ovhdu7GqHm0nzjBH44w7 IYcQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kw0j6YyJ; 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 nk4si10884744ejb.593.2020.07.14.07.51.37; Tue, 14 Jul 2020 07:51:37 -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=kw0j6YyJ; 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 S1728940AbgGNOvZ (ORCPT + 10 others); Tue, 14 Jul 2020 10:51:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57334 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728742AbgGNOvC (ORCPT ); Tue, 14 Jul 2020 10:51:02 -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 716C0C061755 for ; Tue, 14 Jul 2020 07:51:02 -0700 (PDT) Received: by mail-wr1-x443.google.com with SMTP id r12so22118484wrj.13 for ; Tue, 14 Jul 2020 07:51:02 -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=oYBUe5BwYsr/R2phlHidQsm6+vzt4cxxnkc0JimKqEE=; b=kw0j6YyJsiIk2n3yX5+GkWGHEPOb5rpZONh1AHETutb3Im0RIS6q17btR7I5qt+Y3G Cr1hhv/Kwb4+WIS0DNHRjmc1aw52YDL0xbevlEKg7TJLPfD4wiKMTStgnlv9QSESRuy2 ud15ingoco58gPEiG8JkpQosiAAkovGqjbIlBoloUt9rOcx2anemoSqTP2ATqz6NrUQt tulqxTx3pqJ1mnmLEsWngWkqghXlkZjKVXZb6FZTVVe+ZC2J0MR1r2jQ+V86qR4QnhyQ LWrTAK+0ruiFBAkkrUIWJlkdAkSpEDrtau+/OBkjXFh5ifl7sURfmnAjGYLKjcVCRWk7 J80Q== 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=oYBUe5BwYsr/R2phlHidQsm6+vzt4cxxnkc0JimKqEE=; b=bW2eNspwr32wNn0CjRYysAzC4135Fymh8C9Um6/d2Is6uhM1igcHXbcNvMM+xijXnx zhAV2j9Ynd36WTi7CDvJGKoJ7A+FZeaG9YdWm/PwOWRRLg+vlgdHy5oJf2BMgWLkIKxq q0jZ4dFsQNlrA9JUAF9LoskLC97bHZONlBsxKNHZpHCU1tKps7cB42BHiE4rP7En0u0R WRjIUkry2UI3I/BhfCwL9issL5VyeisH2BLGxnx4+zYfeL5R/Yx3i1PpI6+cmuQy0B5b TaMjeqr+nrt8vHwFe0cQkoV+N4XHL2pyFCktc1geLdsaK7jq62PMj/Vt0XwJfwUdy2y2 7gjw== X-Gm-Message-State: AOAM5306j9yYvMN902aAkQeHXDmZV0eOVc6XfMbVm9/cgnXHG83D8xeE ufB6SxmqmcBLGaDzuE24gLqJYA== X-Received: by 2002:a5d:5151:: with SMTP id u17mr6280720wrt.154.1594738261236; Tue, 14 Jul 2020 07:51:01 -0700 (PDT) Received: from localhost.localdomain ([2.31.163.61]) by smtp.gmail.com with ESMTPSA id a84sm4653305wmh.47.2020.07.14.07.51.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Jul 2020 07:51:00 -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 , Andy Grover , Paul Diefenbaugh , Dominik Brodowski , Denis Sadykov Subject: [PATCH 08/13] cpufreq: acpi-cpufreq: Take 'dummy' principle one stage further Date: Tue, 14 Jul 2020 15:50:44 +0100 Message-Id: <20200714145049.2496163-9-lee.jones@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200714145049.2496163-1-lee.jones@linaro.org> References: <20200714145049.2496163-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' one, then the compiler complains that it is set but not used. We know this is fine, so we set it to its own value here. Fixes the following W=1 kernel build warning(s): drivers/cpufreq/acpi-cpufreq.c: In function ‘cpu_freq_read_intel’: drivers/cpufreq/acpi-cpufreq.c:247:11: warning: variable ‘dummy’ set but not used [-Wunused-but-set-variable] drivers/cpufreq/acpi-cpufreq.c: In function ‘cpu_freq_read_amd’: drivers/cpufreq/acpi-cpufreq.c:265:11: warning: variable ‘dummy’ set but not used [-Wunused-but-set-variable] Cc: Andy Grover Cc: Paul Diefenbaugh Cc: Dominik Brodowski Cc: Denis Sadykov Signed-off-by: Lee Jones --- drivers/cpufreq/acpi-cpufreq.c | 2 ++ 1 file changed, 2 insertions(+) -- 2.25.1 diff --git a/drivers/cpufreq/acpi-cpufreq.c b/drivers/cpufreq/acpi-cpufreq.c index 429e5a36c08a9..d38a693b48e03 100644 --- a/drivers/cpufreq/acpi-cpufreq.c +++ b/drivers/cpufreq/acpi-cpufreq.c @@ -247,6 +247,7 @@ static u32 cpu_freq_read_intel(struct acpi_pct_register *not_used) u32 val, dummy; rdmsr(MSR_IA32_PERF_CTL, val, dummy); + dummy &= dummy; /* Silence set but not used warning */ return val; } @@ -264,6 +265,7 @@ static u32 cpu_freq_read_amd(struct acpi_pct_register *not_used) u32 val, dummy; rdmsr(MSR_AMD_PERF_CTL, val, dummy); + dummy &= dummy; /* Silence set but not used warning */ return val; }