From patchwork Thu Feb 20 03:33:35 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: chenzhou X-Patchwork-Id: 11393197 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 108C314E3 for ; Thu, 20 Feb 2020 03:40:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DE8F4206E2 for ; Thu, 20 Feb 2020 03:40:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727506AbgBTDkN (ORCPT ); Wed, 19 Feb 2020 22:40:13 -0500 Received: from szxga04-in.huawei.com ([45.249.212.190]:10654 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727476AbgBTDkN (ORCPT ); Wed, 19 Feb 2020 22:40:13 -0500 Received: from DGGEMS412-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 4F7AF69BE5179A3B8D1E; Thu, 20 Feb 2020 11:40:11 +0800 (CST) Received: from localhost.localdomain.localdomain (10.175.113.25) by DGGEMS412-HUB.china.huawei.com (10.3.19.212) with Microsoft SMTP Server id 14.3.439.0; Thu, 20 Feb 2020 11:40:03 +0800 From: Chen Zhou To: , CC: , , , , Subject: [PATCH -next] platform/x86: intel_pmc_core: fix build error without CONFIG_DEBUG_FS Date: Thu, 20 Feb 2020 11:33:35 +0800 Message-ID: <20200220033335.106963-1-chenzhou10@huawei.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-Originating-IP: [10.175.113.25] X-CFilter-Loop: Reflected Sender: platform-driver-x86-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: platform-driver-x86@vger.kernel.org If CONFIG_DEBUG_FS is n, build fails: drivers/platform/x86/intel_pmc_core.c: In function pmc_core_resume: drivers/platform/x86/intel_pmc_core.c:1327:3: error: implicit declaration of function pmc_core_slps0_display; did you mean pmc_core_is_pc10_failed? [-Werror=implicit-function-declaration] pmc_core_slps0_display(pmcdev, dev, NULL); ^~~~~~~~~~~~~~~~~~~~~~ Function pmc_core_slps0_display() is responsible for displaying debug registers, which is under CONFIG_DEBUG_FS. Providing the static inline stub whenever CONFIG_DEBUG_FS is disabled to fix this. Function pmc_core_lpm_display() is the same. Reported-by: Hulk Robot Signed-off-by: Chen Zhou --- drivers/platform/x86/intel_pmc_core.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/drivers/platform/x86/intel_pmc_core.c b/drivers/platform/x86/intel_pmc_core.c index f4a36fb..939f8e0 100644 --- a/drivers/platform/x86/intel_pmc_core.c +++ b/drivers/platform/x86/intel_pmc_core.c @@ -1117,6 +1117,20 @@ static void pmc_core_dbgfs_register(struct pmc_dev *pmcdev) } } #else +static inline void pmc_core_slps0_display(struct pmc_dev *pmcdev, + struct device *dev, + struct seq_file *s) +{ +} + +static inline void pmc_core_lpm_display(struct pmc_dev *pmcdev, + struct device *dev, + struct seq_file *s, u32 offset, + const char *str, + const struct pmc_bit_map **maps) +{ +} + static inline void pmc_core_dbgfs_register(struct pmc_dev *pmcdev) { }