Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp206996ybv; Wed, 19 Feb 2020 19:40:29 -0800 (PST) X-Google-Smtp-Source: APXvYqziIhUgTJbNnN8uicTLw/7njXzWf6OC1CgOI7Itpz0KgjIVkk5zi2FIPn+veLd2Ec0HMtMM X-Received: by 2002:a9d:674f:: with SMTP id w15mr22072547otm.243.1582170029725; Wed, 19 Feb 2020 19:40:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582170029; cv=none; d=google.com; s=arc-20160816; b=QJdvfJVctJ+bmyvdqdIjctaDigGTOY/2ogWEOGsHHLp36SLtNlaDKANVKVgL2iq8wf uWNsGDIqkqEWre3cbVacc3/GQtjTEVmswwx3TROL0v5fbQfh/qXYuj+x6mcK0qtLYPHC /uUAcy6ly09QB5LOlgDhlK2EBOPHpfcDXqP4sokX6+DDbwo4G7sjbsPI7uuXcHzl0Yhi c2Bq+PnT+8aOHnX/HY6bK8WKh/WU/PJwu2ryaAPYvo03+HDKeVuYe9O9JhcNlYleII9H Hn/UaUYFn+b5P9/18ZoOKBWqmQ7lJXyKiYuMYL3WoSezDpWoGnhzNOWmGmOJSNftBffx 8iyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=DKRowfD14aLRE6deAylaKOyB45MphuNIVi9mA0ob8ak=; b=z516TBgwRtN/Xxc4QxZj+ma2ywppaQ3tej1Y/dnBs3pMYvibkQgFAd5KtrgqS2r565 Nsl94JrS5LpwARORGs0OFOY3n4YdpMJMr7Kjo0lwIzxpZUgWTmNxy7EGrm1SCIJ0zmwl SP15nT2nkaYHJTc2EBx7Dem+7ftK0Fq+NRSJ+pmnhN1fnptf7JTZ2bTzq/7yAEOtYiUE RRpM48yLKz1ToosEnqXzO896ntJrTFpDpq2yil9a663XpwquwPkzCsR4W0V3cXlwNFgm GEyUSMacvZq2U00uCfsKwVMrJMSlGotfJLEX/J4FJyOYTrARKQ9XeLbFrnRkcylr0wHd f24g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i9si982115otp.139.2020.02.19.19.40.16; Wed, 19 Feb 2020 19:40:29 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727749AbgBTDkN (ORCPT + 99 others); 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 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.113.25] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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) { } -- 2.7.4