From patchwork Wed Jul 15 08:26:29 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 11664453 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 70E82913 for ; Wed, 15 Jul 2020 08:46:09 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4AB7120657 for ; Wed, 15 Jul 2020 08:46:09 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="M9T3uvJ2"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="h/tM5Sid" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4AB7120657 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=4sk5E91kXxy5uZxqq7ci4i4VvZ2iUq6VtBIa7PScwig=; b=M9T3uvJ2/rhXaKsQO4KOFEj03 UmYeV5XCshiBLrwYV8YjVgNUVbEEUqI9m8yPue4EcF7qNXjB3rS7wW5Yl8ufx4TtQQinRhS0q22js nrIOPND6G58X65Tg2shAGYurL69qFZfW+oP0xm1+z7mvM3FNnWRrcvRLUuet4O8arRFlf00Lk+e3t u9xnFmqEoCT7+hkwASSdiabqLUk4aQVsTgGW/Q026O+RXUz763lGt/pd4OOS7f6xwr/X1RxDg0AjM +fzqgCsrCJVRgUpPTEcCrd+BY0UZxPeDDvtsaTXZaFaW1tRcv2qbjf1fz5AhquK1NxpGZBJVCTevy k2rskOIWA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jvclw-0003xJ-U7; Wed, 15 Jul 2020 08:28:13 +0000 Received: from mail-wr1-x443.google.com ([2a00:1450:4864:20::443]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jvckb-0003Lb-HE for linux-arm-kernel@lists.infradead.org; Wed, 15 Jul 2020 08:26:53 +0000 Received: by mail-wr1-x443.google.com with SMTP id s10so1419324wrw.12 for ; Wed, 15 Jul 2020 01:26:49 -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=WdiKEUGtJNb3K8rH57Xa0bqqHuMKs85IufCe6WoIQH0=; b=h/tM5SidCdeT9YEPZb0RPN7LNM4OQEfUG0Gla4WTqsbW13CThG9SPV0We8E9oe7eKW y2PuLeXzK9008gi1pAyFmaKBkBvo+0EWGPrnbrzZAy1uJxsvdLwLtevQ30Cwl7ocp8t9 x8sysDZkNQexAapYEh0MZvEOg0v2i0PIGOBb9hBxkdWOboI8mKwgyM8vTXy4oFwM0/Xp F+/uIo/HSfVGWcSiN6+Eg2osFMI5gKrKcnHvDvcmzpYy6any0IIvQHjqhi/efTC0CJ5D 5O3Hc4EOm63rxsyL662vBvMpg3462huBOxdVH3By5OtQKJU4yzWjm2MOQfBtv1HMPH5y bXgQ== 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=WdiKEUGtJNb3K8rH57Xa0bqqHuMKs85IufCe6WoIQH0=; b=SemHACWtolKNVDdpwV3iNSYCyJCy/N/ve4EuGpmNGdfq/FaLuybmwV0/7HcAA1Qe4y MavNhKF830MkTjPo+8X4yPtNOGd3bkhqlxiz+IoC2aTVCPxcq0YO6xMwQjhihhP9coiI WMHB0RnO1p3sDHKkCKwQMspc8wAcwCWIvKizTezH4OCHxMSNTDdYt6WbIdWcvKRXCQwV YaSrke4C02dK03jwFqDPM/uYxVT2qjztfH9WeIA21JC/54hP7sY5gFStGrisEDPq9hJt +oe9X1AfhjaV1tQ/efRshbbW3BWIzQLPbIGTVZW8cx/eUxV4UlmZodp8Y6ic+6dTG2GY T9/w== X-Gm-Message-State: AOAM532LsuvSjx+RifpV6w4SJXD7J9hBzDqa0D1LYV8wTo+JSzdQcYSr cccrKJ/nv5TLTTe0plggSKdndg== X-Google-Smtp-Source: ABdhPJxh4iIC96B7vP7yT2NRdJCiN3e86bbKXTI7FBlC/f5JJATdbpmIk6pi0D1BpMCqtslGlYLI6A== X-Received: by 2002:a5d:540d:: with SMTP id g13mr9474170wrv.380.1594801608318; Wed, 15 Jul 2020 01:26:48 -0700 (PDT) Received: from localhost.localdomain ([2.31.163.61]) by smtp.gmail.com with ESMTPSA id h13sm2400361wml.42.2020.07.15.01.26.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Jul 2020 01:26:47 -0700 (PDT) From: Lee Jones To: rjw@rjwysocki.net, viresh.kumar@linaro.org Subject: [PATCH v2 08/13] cpufreq: acpi-cpufreq: Mark 'dummy' variable as __always_unused Date: Wed, 15 Jul 2020 09:26:29 +0100 Message-Id: <20200715082634.3024816-9-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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200715_042649_708578_3306664E X-CRM114-Status: GOOD ( 14.08 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:443 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Denis Sadykov , Andy Grover , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Paul Diefenbaugh , Lee Jones , linux-arm-kernel@lists.infradead.org, Dominik Brodowski Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.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 as __always_unused to let the compiler know. 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 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/cpufreq/acpi-cpufreq.c b/drivers/cpufreq/acpi-cpufreq.c index 429e5a36c08a9..6b3d8355c8dea 100644 --- a/drivers/cpufreq/acpi-cpufreq.c +++ b/drivers/cpufreq/acpi-cpufreq.c @@ -244,7 +244,7 @@ static unsigned extract_freq(struct cpufreq_policy *policy, u32 val) static u32 cpu_freq_read_intel(struct acpi_pct_register *not_used) { - u32 val, dummy; + u32 val, dummy __always_unused; rdmsr(MSR_IA32_PERF_CTL, val, dummy); return val; @@ -261,7 +261,7 @@ static void cpu_freq_write_intel(struct acpi_pct_register *not_used, u32 val) static u32 cpu_freq_read_amd(struct acpi_pct_register *not_used) { - u32 val, dummy; + u32 val, dummy __always_unused; rdmsr(MSR_AMD_PERF_CTL, val, dummy); return val;