From patchwork Mon Jan 30 10:47:36 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Augusto Mecking Caringi X-Patchwork-Id: 9544773 X-Patchwork-Delegate: rui.zhang@intel.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id DEB36604A0 for ; Mon, 30 Jan 2017 10:48:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CCC3E26224 for ; Mon, 30 Jan 2017 10:48:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BFDB32837F; Mon, 30 Jan 2017 10:48:30 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 71BB226224 for ; Mon, 30 Jan 2017 10:48:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751670AbdA3Ks3 (ORCPT ); Mon, 30 Jan 2017 05:48:29 -0500 Received: from mail-wm0-f68.google.com ([74.125.82.68]:34287 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751141AbdA3Ks2 (ORCPT ); Mon, 30 Jan 2017 05:48:28 -0500 Received: by mail-wm0-f68.google.com with SMTP id c85so76416226wmi.1; Mon, 30 Jan 2017 02:48:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=IJCcT+jQHNivPngtVOb0oyRpMz6U0SbZMe/Qg3Mm3jY=; b=UPFD6YrlsyGJqCwGofakO7U3DHi9J95xz03F6LbPvPV3HeA2iNTC6Df1RGVBgZdM4+ jrELoD5Z6UXG8iQmO908mBrRY7gOIrS4tsfkZH1H8xqp6otwu7Egj+UEtvZJ+rN5GGJ3 LvaTWNoRY/DhSV6fPNrGeQ8U+lJjjI4SMfAtzglmyMJ6LUAIgIXFV3yFDpd91FiXkNnE k4YmAVSb4+9YU7sm7jOwSpu9rzj1/azfZOvRM5yLOqi8PWZ8XDMdqM8ZVxotj20ROb17 7BQ5b8nx5sy6X99JDo2EDoYge4kE6PkpBmQmwPNbiUUbffcPFusKHey2iGllxa9MNNCe pEuA== 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:mime-version :content-transfer-encoding; bh=IJCcT+jQHNivPngtVOb0oyRpMz6U0SbZMe/Qg3Mm3jY=; b=suZk6Dm2EoJB4M2Gep9HX8kxpPuo0/1KHjam1tCHoBosLuEPFbNWhB+lanCG7rZrRo w60nZoXuuCxbPf1WVqbbUtXHlLagJM/pwcmWFk9EEXTyHgvjDmno8QK35+Q31h3kh5xK yXSaPedR0wBcJJLg3tj/HXtvmnD9XAPmFrx+h6fDag09SqMxppT5A3odzouD2BfR8wYK c/WhWE5RBUoo8btnka2ms4DFWHiwA7Jl+/HLh9uQNNOhkx0j3+RXHIpBo4kdgLTYFkmw jumT23FUZ+zmbLAb23Ff4ouMfNbDX1KUF+yw8Vo1dsOMYyUILPndr40H1119r2yGgUq5 9YKQ== X-Gm-Message-State: AIkVDXJd+q8w122Etzqp8Br8mqDw5Ii4KOr+iKeq6Brz7fV2rtbbCQGkX/WAM/XB7U9/Jg== X-Received: by 10.28.97.2 with SMTP id v2mr14448064wmb.3.1485773306543; Mon, 30 Jan 2017 02:48:26 -0800 (PST) Received: from acaringi.internal.hq.grupopie.com (bl22-56-149.dsl.telepac.pt. [2.83.56.149]) by smtp.googlemail.com with ESMTPSA id w126sm22646440wmw.0.2017.01.30.02.48.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 30 Jan 2017 02:48:25 -0800 (PST) From: Augusto Mecking Caringi To: Zhang Rui Cc: Augusto Mecking Caringi , Eduardo Valentin , Jacob Pan , "Rafael J. Wysocki" , Petr Mladek , Sebastian Andrzej Siewior , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] thermal/intel_powerclamp: Remove set-but-not-used variables Date: Mon, 30 Jan 2017 10:47:36 +0000 Message-Id: <1485773289-19844-1-git-send-email-augustocaringi@gmail.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP In poll_pkg_cstate() function, the variables jiffies_last and jiffies_now are set but never used. This has been detected by building the driver with W=1: drivers/thermal/intel_powerclamp.c: In function ‘poll_pkg_cstate’: drivers/thermal/intel_powerclamp.c:464:23: warning: variable ‘jiffies_last’ set but not used [-Wunused-but-set-variable] static unsigned long jiffies_last; ^ Signed-off-by: Augusto Mecking Caringi Acked-by: Jacob Pan --- drivers/thermal/intel_powerclamp.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/thermal/intel_powerclamp.c b/drivers/thermal/intel_powerclamp.c index df64692..a47103a 100644 --- a/drivers/thermal/intel_powerclamp.c +++ b/drivers/thermal/intel_powerclamp.c @@ -461,16 +461,13 @@ static void poll_pkg_cstate(struct work_struct *dummy) { static u64 msr_last; static u64 tsc_last; - static unsigned long jiffies_last; u64 msr_now; - unsigned long jiffies_now; u64 tsc_now; u64 val64; msr_now = pkg_state_counter(); tsc_now = rdtsc(); - jiffies_now = jiffies; /* calculate pkg cstate vs tsc ratio */ if (!msr_last || !tsc_last) @@ -485,7 +482,6 @@ static void poll_pkg_cstate(struct work_struct *dummy) /* update record */ msr_last = msr_now; - jiffies_last = jiffies_now; tsc_last = tsc_now; if (true == clamping)