From patchwork Wed Sep 9 11:29:21 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 11765379 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E47D292C for ; Wed, 9 Sep 2020 11:39:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D225321D7F for ; Wed, 9 Sep 2020 11:39:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729129AbgIILhm (ORCPT ); Wed, 9 Sep 2020 07:37:42 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:32860 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729621AbgIILgl (ORCPT ); Wed, 9 Sep 2020 07:36:41 -0400 Received: from DGGEMS407-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 2B942C9497287A881891; Wed, 9 Sep 2020 19:20:18 +0800 (CST) Received: from kernelci-master.huawei.com (10.175.101.6) by DGGEMS407-HUB.china.huawei.com (10.3.19.207) with Microsoft SMTP Server id 14.3.487.0; Wed, 9 Sep 2020 19:20:11 +0800 From: Wei Yongjun To: Hulk Robot , Jonathan Corbet , "Mauro Carvalho Chehab" , Lubomir Rintel CC: Wei Yongjun , Subject: [PATCH -next] media: marvell-ccic: mmp: mark PM functions as __maybe_unused Date: Wed, 9 Sep 2020 19:29:21 +0800 Message-ID: <20200909112921.5116-1-weiyongjun1@huawei.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 X-Originating-IP: [10.175.101.6] X-CFilter-Loop: Reflected Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org The suspend/resume functions have no callers depending on configuration, so they must be marked __maybe_unused to avoid these harmless warnings: drivers/media/platform/marvell-ccic/mmp-driver.c:347:12: warning: 'mmpcam_resume' defined but not used [-Wunused-function] 347 | static int mmpcam_resume(struct device *dev) | ^~~~~~~~~~~~~ drivers/media/platform/marvell-ccic/mmp-driver.c:338:12: warning: 'mmpcam_suspend' defined but not used [-Wunused-function] 338 | static int mmpcam_suspend(struct device *dev) | ^~~~~~~~~~~~~~ Fixes: 55cd34524aa3 ("media: marvell-ccic: add support for runtime PM") Reported-by: Hulk Robot Signed-off-by: Wei Yongjun Acked-by: Lubomir Rintel --- drivers/media/platform/marvell-ccic/mmp-driver.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/platform/marvell-ccic/mmp-driver.c b/drivers/media/platform/marvell-ccic/mmp-driver.c index c4b28a00a3a2..cd902b180669 100644 --- a/drivers/media/platform/marvell-ccic/mmp-driver.c +++ b/drivers/media/platform/marvell-ccic/mmp-driver.c @@ -335,7 +335,7 @@ static int mmpcam_runtime_suspend(struct device *dev) return 0; } -static int mmpcam_suspend(struct device *dev) +static int __maybe_unused mmpcam_suspend(struct device *dev) { struct mmp_camera *cam = dev_get_drvdata(dev); @@ -344,7 +344,7 @@ static int mmpcam_suspend(struct device *dev) return 0; } -static int mmpcam_resume(struct device *dev) +static int __maybe_unused mmpcam_resume(struct device *dev) { struct mmp_camera *cam = dev_get_drvdata(dev);