From patchwork Wed Dec 6 21:02:37 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 120906 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp7544148qgn; Wed, 6 Dec 2017 13:03:42 -0800 (PST) X-Google-Smtp-Source: AGs4zMaTP7XvLkjwqeRGN9WRGuvdYHFZ4lDsLUVj++3NAZG4h1M5bPeiA8zAY63yCAkLl/BhiTfm X-Received: by 10.99.96.71 with SMTP id u68mr21868380pgb.389.1512594222245; Wed, 06 Dec 2017 13:03:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1512594222; cv=none; d=google.com; s=arc-20160816; b=mHp36O3tavPRcaPZE3zk356/mzF/xvm2IYE92CA+87jY6qpms06evw+sd/lpCY9W+H G3ATPQ8QE9PzPGsnLo7a+bFbICu8aXaAt61Fc3PQ1vHcdjKjfExBzVaTBlhQzIqO5ihM ONBla2cLJoM9PwD+Ou3/PUhjYwJX4VRLi6vcK+looPpNEJcpr3tBk5eSKpZuCsiVcuFe 5QtPW105nba8/tRRxljAPp0U1RM6mkN9meEhopmi17uhXupGZl52tk2nwPNLEGd3kx3y M170eciIseKntC+6d4Fbzb3QFBVQtNXriB8ytgw2tJuphfiK5RLSB9cVRKsDIGuX/LSo LGUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=akAQE05XQiSpFjak9c4CmYOQ6VMNC38aWYCFQFaA6BI=; b=uNMBl62BtLBqaHuVFffpdJ6nhPzo7/WW3Q4nx+ApROJW00SSBVRKrkzOUXo5zOt+Eq 4MUpkSdJxpL4HaKDVL9eUsOdFGOrrxz66VU7bwWDXivCVNgojSaM5hjuy+2PozwFdREz OxR0ZwZQ5ztFGYdghZpDMUMLyiP4kXPkhfq/QwU/B+1n5pqeiy5UNIO7GbnMhpFkwqhI jtHBNINycHVYM4qAOFXlVCupYuleqEZnZj6UqPbj6zkcRqSJi2fFtf4hBF974hbnx8/a WcUuLuGYCeVDtXkN6CuhxMxd7kKv43MbWbCT6uXE0OvZIQQtHS6sI+xMcd1jxhyImn6I PyMw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-watchdog-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-watchdog-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q3si2506246pgp.97.2017.12.06.13.03.41 for ; Wed, 06 Dec 2017 13:03:42 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-watchdog-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-watchdog-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-watchdog-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752119AbdLFVDl (ORCPT ); Wed, 6 Dec 2017 16:03:41 -0500 Received: from mout.kundenserver.de ([212.227.126.133]:63234 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751748AbdLFVDk (ORCPT ); Wed, 6 Dec 2017 16:03:40 -0500 Received: from wuerfel.lan ([149.172.96.106]) by mrelayeu.kundenserver.de (mreue004 [212.227.15.129]) with ESMTPA (Nemesis) id 0M1kaM-1fBtTz1rfG-00to0i; Wed, 06 Dec 2017 22:02:53 +0100 From: Arnd Bergmann To: Jimmy Vance , Wim Van Sebroeck Cc: Arnd Bergmann , Guenter Roeck , Jerry Hoemann , linux-watchdog@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] watchdog: hpwdt: fix unused variable warning Date: Wed, 6 Dec 2017 22:02:37 +0100 Message-Id: <20171206210250.1222757-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RG6MYS7eVQ8wnEGTgLT+e3hlg== Sender: linux-watchdog-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-watchdog@vger.kernel.org The new hpwdt_my_nmi() function is used conditionally, which produces a harmless warning in some configurations: drivers/watchdog/hpwdt.c:478:12: error: 'hpwdt_my_nmi' defined but not used [-Werror=unused-function] This moves it inside of the #ifdef that protects its caller, to silence the warning. Fixes: 621174a92851 ("watchdog: hpwdt: Check source of NMI") Signed-off-by: Arnd Bergmann --- drivers/watchdog/hpwdt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.9.0 -- To unsubscribe from this list: send the line "unsubscribe linux-watchdog" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Reviewed-by: Jerry Hoemann Reviewed-by: Guenter Roeck diff --git a/drivers/watchdog/hpwdt.c b/drivers/watchdog/hpwdt.c index e61658310381..f1f00dfc0e68 100644 --- a/drivers/watchdog/hpwdt.c +++ b/drivers/watchdog/hpwdt.c @@ -475,12 +475,12 @@ static int hpwdt_time_left(void) return TICKS_TO_SECS(ioread16(hpwdt_timer_reg)); } +#ifdef CONFIG_HPWDT_NMI_DECODING static int hpwdt_my_nmi(void) { return ioread8(hpwdt_nmistat) & 0x6; } -#ifdef CONFIG_HPWDT_NMI_DECODING /* * NMI Handler */