From patchwork Mon Feb 29 09:19:07 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 8450621 Return-Path: X-Original-To: patchwork-linux-mediatek@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 009AD9FC55 for ; Mon, 29 Feb 2016 09:20:28 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 015F6202A1 for ; Mon, 29 Feb 2016 09:20:27 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1C32920260 for ; Mon, 29 Feb 2016 09:20:26 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1aaK09-0005rj-G4; Mon, 29 Feb 2016 09:20:25 +0000 Received: from mout.kundenserver.de ([217.72.192.73]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1aaJzx-0004Zw-Km; Mon, 29 Feb 2016 09:20:15 +0000 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue104) with ESMTPA (Nemesis) id 0MPXo9-1aWDFN3IrB-004gMV; Mon, 29 Feb 2016 10:19:24 +0100 From: Arnd Bergmann To: Joerg Roedel , Joerg Roedel Subject: [PATCH 2/2] iommu/mediatek: mark PM functions as __maybe_unused Date: Mon, 29 Feb 2016 10:19:07 +0100 Message-Id: <1456737553-496245-2-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1456737553-496245-1-git-send-email-arnd@arndb.de> References: <1456737553-496245-1-git-send-email-arnd@arndb.de> X-Provags-ID: V03:K0:KxJr9Xqej3/krgk894TxnBWETg3PG6lTPFXu314Hkx0AmEw021+ hyGP8Dw+yjHyCS1LnII7j4BeatA9HdxvPEttdB0aRj5ZffksVppEFAWS37GDvRSgXhuVyJ9 b0UKop+mf4CRKFeu4prCw8FrUjJ2nXpH/it3LPsQ2rCQ83igWzvujhmBb6YvfZLSsx9H1Wi xBfI2l79eeFOL8TXVMDFA== X-UI-Out-Filterresults: notjunk:1; V01:K0:6N7GjljZe08=:JaqGQ2ZKQXHjIRBYVyLxt4 nhirHEZ4JTOjSRUCtm57yqZXoSZQdRi9hxhhbkFlTVJf3FcHNHwAvf3LNhYvGR30Y22Y289mX iSvb2tWIFBhBHwt12Lnk3p53XuiK/4N31atYA9YvAw13Ty8sFLgqw/iHJ5EmeBxG8irsVCpsF YRy2g0WtJYIMljV4eOhW2UWOppVL1Ba1ThMwL24yt4JfEC/tSA7wUa7bImLTpx1p6igj/i2GY Er7aOE5HwZITZZ/p8vCq8X1w+b+te6qkOcwu1uah/QT60U6zTtGgsG81MhVqAfEr5mxstCEor WUlCPb12b/hKBKS0Nnd897BnJTD0yORvEd6ifpVay6RWSg/ajLY8cdliTcl0SR4r+25EI9GLp C8ixm6BY2gpDcA2C5IomcC8Sq/wDhZm9gLxJg9wFDaRwNTCDBqCgfuS5h7qv54I51Lx9hRMS5 wbC5BPT/LdKEhSknmwMlHUPLLiIn2quO5vDfrJgaDkIODM1QaomcZDzcjh30eYoBHTNLd95Sh kfVO7XQKx93x2ou5QNg3M6w58an+StU2C6zZd829/AXv6b6DIlTeTV/GlEM9xDTn/jvdVcG3M NxagpJ3EQQ1SkB/+PItGpQD6aA8IvcPbK7tsWplGBVYbdBoM+P+o9PIBpSSA8h2hjdFM5iHPB vKhzqw4CRnBmhn3L65tbJdLcDMF6bibKX8qeKbQyQR9S2byyIjbJ46ycK6MsdTjRfWLQ= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160229_012014_115741_882DDAD9 X-CRM114-Status: GOOD ( 10.89 ) X-Spam-Score: -2.6 (--) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Arnd Bergmann , linux-kernel@vger.kernel.org, iommu@lists.linux-foundation.org, linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, Matthias Brugger , Robin Murphy , Yong Wu MIME-Version: 1.0 Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP When CONFIG_PM is unset, we get a harmless warning for this driver: drivers/iommu/mtk_iommu.c:665:12: error: 'mtk_iommu_suspend' defined but not used [-Werror=unused-function] drivers/iommu/mtk_iommu.c:680:12: error: 'mtk_iommu_resume' defined but not used [-Werror=unused-function] Marking the functions as __maybe_unused gits rid of the two functions and lets the compiler silently drop the object code, while still doing syntax checking on them for build-time verification. Signed-off-by: Arnd Bergmann Fixes: 0df4fabe208d ("iommu/mediatek: Add mt8173 IOMMU driver") --- drivers/iommu/mtk_iommu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/iommu/mtk_iommu.c b/drivers/iommu/mtk_iommu.c index 721ffdb296d6..f3c160e4c25d 100644 --- a/drivers/iommu/mtk_iommu.c +++ b/drivers/iommu/mtk_iommu.c @@ -662,7 +662,7 @@ static int mtk_iommu_remove(struct platform_device *pdev) return 0; } -static int mtk_iommu_suspend(struct device *dev) +static int __maybe_unused mtk_iommu_suspend(struct device *dev) { struct mtk_iommu_data *data = dev_get_drvdata(dev); struct mtk_iommu_suspend_reg *reg = &data->reg; @@ -677,7 +677,7 @@ static int mtk_iommu_suspend(struct device *dev) return 0; } -static int mtk_iommu_resume(struct device *dev) +static int __maybe_unused mtk_iommu_resume(struct device *dev) { struct mtk_iommu_data *data = dev_get_drvdata(dev); struct mtk_iommu_suspend_reg *reg = &data->reg;