From patchwork Wed Jun 29 14:26:34 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 9205435 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 601A360752 for ; Wed, 29 Jun 2016 14:26:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 526EA2864C for ; Wed, 29 Jun 2016 14:26:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4743528665; Wed, 29 Jun 2016 14:26:04 +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.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI 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 A44362864C for ; Wed, 29 Jun 2016 14:26:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752640AbcF2OZq (ORCPT ); Wed, 29 Jun 2016 10:25:46 -0400 Received: from mout.kundenserver.de ([212.227.126.135]:50017 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752254AbcF2OZf (ORCPT ); Wed, 29 Jun 2016 10:25:35 -0400 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue004) with ESMTPA (Nemesis) id 0LxKk2-1bO78r1ORO-016txI; Wed, 29 Jun 2016 16:25:15 +0200 From: Arnd Bergmann To: Mauro Carvalho Chehab Cc: Arnd Bergmann , Greg Kroah-Hartman , Kamil Debski , Hans Verkuil , linux-media@vger.kernel.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/3] [media] s5p_cec: mark suspend/resume as __maybe_unused Date: Wed, 29 Jun 2016 16:26:34 +0200 Message-Id: <20160629142749.4125434-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:9Y/un9Wn6r+rSR1EF9trAB3XoGgCy8eAohMBJWB2gIe1S+p9gb5 j4wkqzqnfIxb0giYRDZXULP9EzAsobtbfxwEdr2yZQ/qDhUt2b8fob++xS/VUs2dmVhkYwY XvsOLXmnQQWbaz1+V3x3R/bTfoyrrlg+RETDHWqP+c/qwYTgMWRYeCobmoH09vYQ85Ot+XH WC63cnZbUl4s1mC6LrpMg== X-UI-Out-Filterresults: notjunk:1; V01:K0:N1PYNXbQgrA=:dCZfrKq7irSm17TMFS7pse TXOvj4SVSQpJBtPwcvXARGMH7+6reiMHM2LQA5paJQu9UvnWPyIJ/77YhFmgUNWb0s2ZVIJpx EdTsZxcJWjNrKHoQggPErrSR+H9+OlRFVEGejNsWCP1i7rpZ4gFUYnhgRP9tSJzAPAM8Ka3Ki TS9F37zQJ6RMqRJOYgE0Wf0NvIF8CmB9gESQB4iQ3MAKGmiV1UlIMKaN8kqYptNkLsNMOSA/i 2bWC9oF+GTnjzCvfydU8MbjehoTEmzgWtMQsuHM90bbqUdEU4xsMHjNenevF234XeovKT7B5Q Y3E5JNJcKMRD8VOfwUy9VW7NAlgxGb5ClUR8/9AZPnNxnSmTXMS1xYrjV+SiJQ7/Roi8Jg4CL 1Zz5DhPH9q9Q3szo/++fhh/rnc18Vf3m+zPNA+wB87EX4bNFNUvRu02hWWU4m/AwRsrK3ul/K GoPPYSAZDqTKA24rXx2/xYYKfhTYjn2ii7VXT8ekhG/Y0kx72rVZ45hQdPtlTfGy/IJmXwIFZ lVtVFUSGBonot9m4VUlzChChcH3gWpikQMlYb9ks6dzC5f/VegyCI0++8iIBW9vyTKcBNnSEC 4uW2Ni4bgsWmU+pwusrWTuhYnY0WFqTWHwrdRthn60ie3KfER5Z3VB9f2YplesNhaXyIej0ju kxkRDQUmYlLeOUL3tcChpJpgYMTEvsf63R3dSPWawXm0L5qiLBBjQEO0m6KSyieShnY4= Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The suspend/resume functions in the s5p-cec driver are only referenced when CONFIG_PM is enabled, so we get a warning about unused functions otherwise: drivers/staging/media/s5p-cec/s5p_cec.c:260:12: error: 's5p_cec_resume' defined but not used [-Werror=unused-function] static int s5p_cec_resume(struct device *dev) ^~~~~~~~~~~~~~ drivers/staging/media/s5p-cec/s5p_cec.c:253:12: error: 's5p_cec_suspend' defined but not used [-Werror=unused-function] static int s5p_cec_suspend(struct device *dev) This marks them as __maybe_unused to avoid the warning without having to introduce an extra #ifdef. Signed-off-by: Arnd Bergmann --- drivers/staging/media/s5p-cec/s5p_cec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/media/s5p-cec/s5p_cec.c b/drivers/staging/media/s5p-cec/s5p_cec.c index f90b7c4e48fe..78333273c4e5 100644 --- a/drivers/staging/media/s5p-cec/s5p_cec.c +++ b/drivers/staging/media/s5p-cec/s5p_cec.c @@ -250,14 +250,14 @@ static int s5p_cec_runtime_resume(struct device *dev) return 0; } -static int s5p_cec_suspend(struct device *dev) +static int __maybe_unused s5p_cec_suspend(struct device *dev) { if (pm_runtime_suspended(dev)) return 0; return s5p_cec_runtime_suspend(dev); } -static int s5p_cec_resume(struct device *dev) +static int __maybe_unused s5p_cec_resume(struct device *dev) { if (pm_runtime_suspended(dev)) return 0;