Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp3489209ybv; Tue, 25 Feb 2020 02:14:10 -0800 (PST) X-Google-Smtp-Source: APXvYqyYZlB1LdHvrgUWxtAC8r5LTH2RJ8yZadCbYxiaTB6Nrinxls707rXQOK+J1Stu+ou+UBef X-Received: by 2002:aca:ef54:: with SMTP id n81mr3028399oih.86.1582625650817; Tue, 25 Feb 2020 02:14:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582625650; cv=none; d=google.com; s=arc-20160816; b=Oby4q3wrw6TTm6KvlGYOlN1ukizip4795LsKGE3YQdZEWijhks8gmH+bRO5fEjOOX1 S8ENlviqHhINzNjwjRu5ZlWb4Q3T4BKHqdT8kFx8tJv+0DDWemMbYpzwq6djpAA56xcQ j3qbBlaWfOBn3vxTsLo2QjtBG0xCv0jIDFuvg6PG/QC7yC3fTRcJnUW8D/I/OgQLY/MF HdMc6xzMnq3aizPR7QhMVOVA8+4KjfJ4ifEqG9uWNM4YUFDczxhDmU5JsJpZUEc0Zr0b YmpVLEyHu1tPR03AOc9WOZkubhE/80egiOJ55LrA7glistN2fP43bfQxH63PnMJ4psbt 5rug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=12J4Dxh+XhShPnFqF0gVzP/G/+ksyPC2hCO7kPNDBLI=; b=MU8cskyhW9TMn1ULpHmwBf3wl549JJXb7/rX5u9/LiYiFFWX3G4ESpGmyoxYiu4DXE Swinpm6gyvidf89PrlsNc+Q3pQlWMxRicPnsqx+lDWTMRvg1n1xBisxhwmc4tdHcHEGM JtoJohsbO4c9/UNHC3dFPBgCpVz0OpcsXzBLrrdmRaxtDy19TUckLhT9R0tspkE0ObYe Z5+ABVnWldV1bpdjvs0PUiAa1Lw9QSQudl5jTevbUmz0b/i7xiSQjrabxNVmxsuxvqYt pKKduXz0AkGonQssFbYWm1yccz9Rdsh4LWVZIauhK3rbcnlurBFRBJpui46VEGoVrA0C Jx2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Dz54Z+lU; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q26si6171143oij.38.2020.02.25.02.13.56; Tue, 25 Feb 2020 02:14:10 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Dz54Z+lU; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730051AbgBYKNZ (ORCPT + 99 others); Tue, 25 Feb 2020 05:13:25 -0500 Received: from mail-pj1-f68.google.com ([209.85.216.68]:40006 "EHLO mail-pj1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729702AbgBYKNZ (ORCPT ); Tue, 25 Feb 2020 05:13:25 -0500 Received: by mail-pj1-f68.google.com with SMTP id 12so1066274pjb.5; Tue, 25 Feb 2020 02:13:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=12J4Dxh+XhShPnFqF0gVzP/G/+ksyPC2hCO7kPNDBLI=; b=Dz54Z+lUs9k0m+Luhfh7C1Fj9xaIpP14H9bxZCEpQXtiq/H0Z96EQVI9M9kpWLvwpm YQLBjkj3mCu4qHBXDq3YzF4Bk/R13jqVxazQKvaKFNtHoAR+npJhwlWFvueZNJrAOVqF M3I2khOhqvoNZro3JIcTvQ63SoLjOdIrrqvx3oRpB0sAXtSMwYwexkP+DAwi0mjtx9MQ egBRU3rLhacSn/3pfs7YE8alg6aywxsOQ1FCWshq5kpvNKy0flDx+EcxRN0XFzayFjqL tcgq+Srpg/bsU3cbmjYvdSNsB8DZ6vWw6TWgQGy4aOvvpV3b0LrTVm/DvDj/EET0KDCl 633g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=12J4Dxh+XhShPnFqF0gVzP/G/+ksyPC2hCO7kPNDBLI=; b=EolVeQmB+2vPySZaZSiJ2WjxsDjPDdbUEZIcS5AhSe9gZQcuSk6D0nSQJ7a2kAg/Go h6+SsMuGiaagmnXt/B0RVh2lico98i1yzp3WiexDFRzUx40UGIMo1GJXc/NSOWr4KgRg iZuAzdH9CopR7l/w19kiiTSYTYEYXGNu4il8SsKy8HNqUENiLDXvXBXZFU3Zr1rxDyMk Wu8lGgJnvjt0tyUwIqQ/GG9yJigCM3VJzQSzBFGnWAoa/OxPEkLlbEbxNntHvWKup3oi jCoRu/lb2ynpNjaSwyv72a9mKh22sv6nWCAYJtoPM1WPug0iGxu0+DRjZsngTTjY8L4S 2dkA== X-Gm-Message-State: APjAAAUqTZlQmU+nyQuBQO6PXue06MPufO83oLtc4jBMiRbT/SC2DR10 FWGZOfLYNqR0t9H7Oa5GpdPhyTEsBb9ul6MgnNc= X-Received: by 2002:a17:902:b598:: with SMTP id a24mr53059634pls.262.1582625604524; Tue, 25 Feb 2020 02:13:24 -0800 (PST) MIME-Version: 1.0 References: <20200220033335.106963-1-chenzhou10@huawei.com> In-Reply-To: <20200220033335.106963-1-chenzhou10@huawei.com> From: Andy Shevchenko Date: Tue, 25 Feb 2020 12:13:16 +0200 Message-ID: Subject: Re: [PATCH -next] platform/x86: intel_pmc_core: fix build error without CONFIG_DEBUG_FS To: Chen Zhou , Gayatri Kammela Cc: Rajneesh Bhardwaj , Vishwanath Somayaji , Darren Hart , Andy Shevchenko , Platform Driver , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 20, 2020 at 5:40 AM Chen Zhou wrote: > > 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. Thank you for the patch, but I think it's not the right approach. Basically we need to move those functions outside of #if IS_ENABLED(CONFIG_DEBUG_FS). (Move them upper). Also I have noticed another issue in pmc_core_lpm_display(). It uses tgl_lpm_maps directly. It shouldn't. Cc: Gayatri. Gayatri, care to fix? > 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 > -- With Best Regards, Andy Shevchenko