From patchwork Wed Apr 19 17:52:43 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 752402 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from mail-wr0-x239.google.com (mail-wr0-x239.google.com [IPv6:2a00:1450:400c:c0c::239]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3w7V415qnYz9rxw for ; Thu, 20 Apr 2017 03:53:53 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=googlegroups.com header.i=@googlegroups.com header.b="jNlkX61r"; dkim-atps=neutral Received: by mail-wr0-x239.google.com with SMTP id l28sf2046586wre.1 for ; Wed, 19 Apr 2017 10:53:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:mime-version:from:to:cc:subject:date:message-id :x-original-sender:x-original-authentication-results:reply-to :precedence:mailing-list:list-id:x-spam-checked-in-group:list-post :list-help:list-archive:list-subscribe:list-unsubscribe; bh=zmroSdl2S5q9sQCVWEl2kPpZJMCfciBhphjUeHERQgU=; b=jNlkX61rkBaBege0zARhZPnxJaD7wLyEqGeb6K1LmdN2c2LBysQYfXYOlGzWdjg0Oz 30PTZdBqREXv2IdGCkypyMQV5bsrU1bsbU90GTRBOh062k2rAkhzaWNsN2JdCHXM/kv2 dKKRk87GGaPH6hG7llpiRlJ+09UYuYuO4yrTO0QFQRd53y2KJE/NhqK6iMW79C5IWrZW Sg3ypHdW4443AEL8/d/DrFHSQ2iDDV/GkixgFuQgwvZDMH6i2ZP9mwd0i2erTTZZGn5j IsJgsw3nEjA0TRma1J2rXrXzBSvpilyPfHwvDl9aaAnXjf83UT1V5DwENsYsa0//Z5jC ERSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:mime-version:from:to:cc:subject:date :message-id:x-original-sender:x-original-authentication-results :reply-to:precedence:mailing-list:list-id:x-spam-checked-in-group :list-post:list-help:list-archive:list-subscribe:list-unsubscribe; bh=zmroSdl2S5q9sQCVWEl2kPpZJMCfciBhphjUeHERQgU=; b=VUHFOR/D5cBTrI+Vfv1cZIhvkeeNh+k4658+P10xJZ2Di7usPuHyYMiaRpwVdc+uXR VrnVSN8syCg2U3VtdrRzXRqHf6LtMau9D0+bNV7mL/1IyGWu0hEUPA2IcB+WkhHeUhUt kvuBp4Ew49A54cSlsm8i3RsspHqiuN4LX8RiYqtbY6yguAbJHfHnKixrlfAc4hSrTtm8 p+sa6QESLhogNCtZcIhyjSsdnNRUSnvNTl/EsFqYmrM7PAQgJUy9HwtA7kjLQXqdN7zF ivCCwv2prQJTdWmC/oGvG9JHb6heDw1Qwr506fBmvsWaR+yMj21w1K9K+RtHZl9XhGeG K0hw== Sender: rtc-linux@googlegroups.com X-Gm-Message-State: AN3rC/5DjCFbvzNnM5rzzRrkfEvZaq0IjQErFo2XTJ9dHnoDuJrt0muv vYhdkrTe7U758A== X-Received: by 10.25.26.139 with SMTP id a133mr12117lfa.14.1492624430485; Wed, 19 Apr 2017 10:53:50 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: rtc-linux@googlegroups.com Received: by 10.25.215.218 with SMTP id q87ls320705lfi.16.gmail; Wed, 19 Apr 2017 10:53:49 -0700 (PDT) X-Received: by 10.25.195.76 with SMTP id t73mr517928lff.8.1492624429712; Wed, 19 Apr 2017 10:53:49 -0700 (PDT) Received: from mout.kundenserver.de (mout.kundenserver.de. [212.227.126.131]) by gmr-mx.google.com with ESMTPS id b84si364887wmh.2.2017.04.19.10.53.49 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 19 Apr 2017 10:53:49 -0700 (PDT) Received-SPF: neutral (google.com: 212.227.126.131 is neither permitted nor denied by best guess record for domain of arnd@arndb.de) client-ip=212.227.126.131; Received: from wuerfel.lan ([78.42.17.5]) by mrelayeu.kundenserver.de (mreue004 [212.227.15.129]) with ESMTPA (Nemesis) id 0MEJKO-1cptIn2IfI-00FU3w; Wed, 19 Apr 2017 19:53:45 +0200 From: Arnd Bergmann To: Alessandro Zummo , Alexandre Belloni Cc: Arnd Bergmann , =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , Geert Uytterhoeven , Chris Brandt , rtc-linux@googlegroups.com, linux-kernel@vger.kernel.org Subject: [rtc-linux] [PATCH] rtc: sh: mark PM functions as unused Date: Wed, 19 Apr 2017 19:52:43 +0200 Message-Id: <20170419175346.37122-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:KmVBKQDaWdeZxevIKehD8BsFwUumFutTFL0xrMX78ClxqNrFZxf +q4j7Jd4v1lnVlUUXpUgixF3qw7eR+atMJkA9w0RkvMB8JjMjcg49sTc9R8VX01rDQcrVbi GLBYNub9JFwbC7omaYjSOqpOZysvc2wnOMB9l7R+pyxSlxEY/ZygnIX6GouptpZTO7IG+hw vFHM99T2+hNs6vPLl2diw== X-UI-Out-Filterresults: notjunk:1; V01:K0:vMw2SlBZVKg=:Q4+eNOmpIkgu743eNLMwhq lFtKsJQzmARFo5auIqf3eWd13At+X/TgmdXdsYZ2lO/TWXPMavhFi1Le6Fu2c/TolQwmwp7dw LuwvLBdBspqBdW938BqihlcNoVqDapRcYyVLMyVe/e6H/oUVzIytE8w8UXVZPJk/F/ygSqJAI 1xq7ZjmRzdgtmkn3fNebC30xRbcTckxcWOz1In8H3q2xEJqy5Z7DvGDXbMMpgtQc8rtU3RYIg Hm+tSQ6Ws/Rh86qrUq9ZIPGvo8FmsvBi74dPs82dWicAjbEcKFwrfs4QwMMA9T2CbUuDemmxC ObyE0HF7xO3i0BSXMigYDof9d7dCm6QjgMKm9e47nUkmKU7848zoxbxpklZxdEp2Rx7IhcJPb /vSJuQsvccRuywxi2dpuiYg7XqFXGcTTSw7uJl4Vuj9e49b3vpqX1ec2cTwtGRdf37VeZXdvi 3NWwSQd9yTpFCA7NgKVIy+KyUCTnxTBUKYdJaUoUVFkZG6V9PJedA8PS4jWwzhkPehMzrLpIT i0tNn3mILW8gKDB3hCxCqveXu2SVehrJIqdIi1c9VmsAmEeJtUvxvUwjhjPlkc9e1w4Xj/5iH 6pOESLpdnNKpH87ibx74msKyd31lLhX4zZLaKl8HsL7bDMqM5K3Wy6QxosMSXb5aw9fkEnA10 JsyG/CFbojnF+l0j6NUk9DGSjYN0VVbjKOOxN0CVzFm50H7oAmzRo2b/YpNIOz0bLX9E= X-Original-Sender: arnd@arndb.de X-Original-Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 212.227.126.131 is neither permitted nor denied by best guess record for domain of arnd@arndb.de) smtp.mailfrom=arnd@arndb.de Reply-To: rtc-linux@googlegroups.com Precedence: list Mailing-list: list rtc-linux@googlegroups.com; contact rtc-linux+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: rtc-linux@googlegroups.com X-Google-Group-Id: 712029733259 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , The sh_rtc_set_irq_wake() function is only called from the suspend/resume handlers that may be hidden, causing a harmless warning: drivers/rtc/rtc-sh.c:724:13: error: 'sh_rtc_set_irq_wake' defined but not used [-Werror=unused-function] static void sh_rtc_set_irq_wake(struct device *dev, int enabled) The most reliable way to avoid the warning is to remove the existing #ifdef and mark the two functions as __maybe_unused so the compiler can silently drop all three when there is no reference. Fixes: dab5aec64bf5 ("rtc: sh: add support for rza series") Signed-off-by: Arnd Bergmann --- drivers/rtc/rtc-sh.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/rtc/rtc-sh.c b/drivers/rtc/rtc-sh.c index 00b396e96cbe..6c2d3989f967 100644 --- a/drivers/rtc/rtc-sh.c +++ b/drivers/rtc/rtc-sh.c @@ -734,8 +734,7 @@ static void sh_rtc_set_irq_wake(struct device *dev, int enabled) } } -#ifdef CONFIG_PM_SLEEP -static int sh_rtc_suspend(struct device *dev) +static int __maybe_unused sh_rtc_suspend(struct device *dev) { if (device_may_wakeup(dev)) sh_rtc_set_irq_wake(dev, 1); @@ -743,14 +742,13 @@ static int sh_rtc_suspend(struct device *dev) return 0; } -static int sh_rtc_resume(struct device *dev) +static int __maybe_unused sh_rtc_resume(struct device *dev) { if (device_may_wakeup(dev)) sh_rtc_set_irq_wake(dev, 0); return 0; } -#endif static SIMPLE_DEV_PM_OPS(sh_rtc_pm_ops, sh_rtc_suspend, sh_rtc_resume);