From patchwork Mon Jul 17 08:56:47 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanimir Varbanov X-Patchwork-Id: 9844295 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 F124460392 for ; Mon, 17 Jul 2017 08:59:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E3D7B23B23 for ; Mon, 17 Jul 2017 08:59:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D8AA723E64; Mon, 17 Jul 2017 08:59:47 +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=-7.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_HI autolearn=unavailable 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 6A04123B23 for ; Mon, 17 Jul 2017 08:59:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751311AbdGQI6H (ORCPT ); Mon, 17 Jul 2017 04:58:07 -0400 Received: from mail-wm0-f54.google.com ([74.125.82.54]:36980 "EHLO mail-wm0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751314AbdGQI6E (ORCPT ); Mon, 17 Jul 2017 04:58:04 -0400 Received: by mail-wm0-f54.google.com with SMTP id b134so40589650wma.0 for ; Mon, 17 Jul 2017 01:58:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=ncAzAKhJAVE9N+B1EOMeWAij1NnYndfH/6XPtc+uvTI=; b=aohM/D7PipgT56M1KR3CmTuWTfxb1mA9QfWYnu/fam046ziOuDU1zaF95jb7Ocm3xq JkF9MQ+cebbsTLG16Fcb2RZfXDlJ1pwTCJPJElIsV1scDWHQRiZ9b3PFmfZE6FVSItKQ LXL6C7uL+QQr9WFYlbewfkobQ1PGoJCvXMNIg= 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:in-reply-to :references; bh=ncAzAKhJAVE9N+B1EOMeWAij1NnYndfH/6XPtc+uvTI=; b=lJ0/KP4iAPJr1zrrgbR4yHMaUz0CFkVDlagsmqg6bsoEDHSPbTr0NY5kGzfvjNxfpf qUz7uaI8K94JmFxYaNgJv2JHIz7pud/hSw4+9D71TRFTS5TfajoDoSdUOGvL4Q7zbxV4 zQQlw7D2A/DLGsA5XPH7ekhTnL35dt6t2Lk8p+YAyQZyWIhoEGhBv3Jvp78Na7MP1w03 lyprPvVmDTJ2cOP9ia1qEb9AOlZXloYa9HVuquafXYv1SLr9CtUR0ZRxkDgQ2pl1fLIu QS2W7DvccFdCD4eo7lAVh9YZ9EC/07AW8py9hUNNZPk2XmQ4H1AfxPT65x+7+xCVnzTd emNg== X-Gm-Message-State: AIVw113cTxqWECUyUDkdo5KYnwbXLoXuoPQWZuYa+9YiBPLReC8n4Lla m0uxhuDf3ofUBIHc X-Received: by 10.28.154.19 with SMTP id c19mr3237201wme.87.1500281883576; Mon, 17 Jul 2017 01:58:03 -0700 (PDT) Received: from localhost.localdomain ([37.157.136.206]) by smtp.gmail.com with ESMTPSA id q17sm11558700wmd.4.2017.07.17.01.58.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 17 Jul 2017 01:58:03 -0700 (PDT) From: Stanimir Varbanov To: Mauro Carvalho Chehab Cc: Hans Verkuil , Arnd Bergmann , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org Subject: [PATCH 1/4] venus: mark PM functions as __maybe_unused Date: Mon, 17 Jul 2017 11:56:47 +0300 Message-Id: <20170717085650.12185-2-stanimir.varbanov@linaro.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170717085650.12185-1-stanimir.varbanov@linaro.org> References: <20170717085650.12185-1-stanimir.varbanov@linaro.org> 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 From: Arnd Bergmann Without PM support, gcc warns about two unused functions: platform/qcom/venus/core.c:146:13: error: 'venus_clks_disable' defined but not used [-Werror=unused-function] platform/qcom/venus/core.c:126:12: error: 'venus_clks_enable' defined but not used [-Werror=unused-function] The problem as usual are incorrect #ifdefs, so the easiest fix is to do away with the #ifdef completely and mark the suspend/resume handlers as __maybe_unused, which they are. Fixes: af2c3834c8ca ("[media] media: venus: adding core part and helper functions") Signed-off-by: Arnd Bergmann Reviewed-by: Stanimir Varbanov --- drivers/media/platform/qcom/venus/core.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/media/platform/qcom/venus/core.c b/drivers/media/platform/qcom/venus/core.c index 776d2bae6979..694f57a78288 100644 --- a/drivers/media/platform/qcom/venus/core.c +++ b/drivers/media/platform/qcom/venus/core.c @@ -270,8 +270,7 @@ static int venus_remove(struct platform_device *pdev) return ret; } -#ifdef CONFIG_PM -static int venus_runtime_suspend(struct device *dev) +static __maybe_unused int venus_runtime_suspend(struct device *dev) { struct venus_core *core = dev_get_drvdata(dev); int ret; @@ -283,7 +282,7 @@ static int venus_runtime_suspend(struct device *dev) return ret; } -static int venus_runtime_resume(struct device *dev) +static __maybe_unused int venus_runtime_resume(struct device *dev) { struct venus_core *core = dev_get_drvdata(dev); int ret; @@ -302,7 +301,6 @@ static int venus_runtime_resume(struct device *dev) venus_clks_disable(core); return ret; } -#endif static const struct dev_pm_ops venus_pm_ops = { SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,