Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp4647577ybv; Wed, 26 Feb 2020 00:34:45 -0800 (PST) X-Google-Smtp-Source: APXvYqz6ctG3bVQiNvPCxRZRhxBH3aUl9ztOB+sxV+NFg8KJaWJvgWxpoNPcPJVTgygkDwiqdN9R X-Received: by 2002:a05:6808:8e1:: with SMTP id d1mr2134458oic.68.1582706085688; Wed, 26 Feb 2020 00:34:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582706085; cv=none; d=google.com; s=arc-20160816; b=CE47yA7a12hl7o9g8vYXIQwL2ndZXnl/4u2qK7O1+bNQ/namyd/DVp3UfxbAwuC4aQ uh+dZwG5AcFWOp7pN7O3yASeD5ZgQKyMnPtzM9Ybd0sP8JX1ZStcyqnNNMf/h0JhBTzq fiFgeTfW9uKdI96wDhhgKdr8TbZEc5BTpHDAiwRoagHX1XIz5ZJQxFs9uYrazqCsFkgn ZH2ddL59hR/hMJE+B57M6PeQ7BZ6stxhd87OJPA874Fm/PCukjtWtdel3z8kBqRha80K /r8VWGX4g51rjFltbjA1YhQqUR2JjZI8i7tmOwzZTA0Gpr7/TfuUJhHfHroDps/eGFN2 9zXQ== 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=XqlxF81Ri1fm02o+lsTCsP4GTUvxZgWE/G6mwZn7NMg=; b=CeUOTgK6Sk5YIPjDOrLEAXKq11UVGC9zdD/TFlPYTfEBL9PZVaSEO7AIdSr73HBdDn /HF64df7aF7QR/WURiHWvscUNMNLLr1JirAWEsKHPPNWpMbAg5ifQoWof+NxXxqx203V L6xS3x7FDgFG93xMv9ZnqfQIgz66zpb6s4fZDoB5ytjCwcXW8dkOjS/SH6ILLg96AUDi Euyc2I2/MILrZ46xURXasCz7gGymFU5y6/MDITu36TcFDcgWcjgfdP7F2KFyA6GJZZbD LH9Jw3Ly6j7calNNg9iv9EK3fqUObzSozPRFkY2NIa2sgX2FhMECpdFRvogBYi96K39f Esew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="OFfWmgW/"; 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 a7si854334otp.11.2020.02.26.00.34.33; Wed, 26 Feb 2020 00:34:45 -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="OFfWmgW/"; 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 S1727267AbgBZIdW (ORCPT + 99 others); Wed, 26 Feb 2020 03:33:22 -0500 Received: from mail-pg1-f193.google.com ([209.85.215.193]:42022 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726425AbgBZIdW (ORCPT ); Wed, 26 Feb 2020 03:33:22 -0500 Received: by mail-pg1-f193.google.com with SMTP id h8so944249pgs.9; Wed, 26 Feb 2020 00:33:20 -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=XqlxF81Ri1fm02o+lsTCsP4GTUvxZgWE/G6mwZn7NMg=; b=OFfWmgW/gYHRAZpBGxkDWL0DtZcua2+xHMA15CCD9P1f899OfOItFHWzBT0bVm10sv nGvy+baVNbXyP/if3rC3KlukKmlFEavseT/069nLGmeHSxbJM8QVFUCnDqvhOkQADZIj uVtkHadsa5YelUuxNRxDDT8u1pT3qIyBQXfstFeq8tWcQoPtIFBviho4E8cj9NlhvaXa 5g51dV1hHmsRrHGQr1P/cjYm04Xk7EblzsD/swLpUEqu6+nNWo/zU59m/Vu075NN3l6t JHAG1eiqOAUW8WMdMAZj7TiW2OwPYkjkyFZMxxCJYwHyKpsmnDKSzmBYx4T6VXu+9389 AiBg== 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=XqlxF81Ri1fm02o+lsTCsP4GTUvxZgWE/G6mwZn7NMg=; b=eKjaUDQjFowJEOw5M1OUekR1MmyNAN3jPVwmDJCZwqQ4XR3O6og86dPob12qyIlJhc 1qst3irNfc5yGIxc8xukOJbuNnsPkRNdSHpBAgMNrCBJaxki2H5nqr3cy34LUn3rMokO X4jhRVbeaaJZEM8YM2bKuKtFFk+Hc74qPUAPntZ0DgelDzhNK8tX4cGb4pYvI2ZH7Lg/ R0HInPK55aKzOaUpZM0Kw7ar1Kjiyetcx3cU0BcuGYUFsrzhfRtyTNE3rY5cdwA3GEyw pLzV8ZA79RqD/FiWzB640WNd2aWofeWJXLa8HNvQrbmePe4mrFZd5B2BzIZ9lfF8Pe/1 t5Pg== X-Gm-Message-State: APjAAAXEOy/BuvX3Zt1lJgJd0cyH9aX/ODGsfDzIC2JgrOYoISgCmavK Bsa1oq5U0tYr34s/3APGM3dz6S5P2y3LHXSchIM= X-Received: by 2002:a62:1a09:: with SMTP id a9mr3201886pfa.64.1582706000275; Wed, 26 Feb 2020 00:33:20 -0800 (PST) MIME-Version: 1.0 References: <20200220033335.106963-1-chenzhou10@huawei.com> In-Reply-To: From: Andy Shevchenko Date: Wed, 26 Feb 2020 10:33:08 +0200 Message-ID: Subject: Re: [PATCH -next] platform/x86: intel_pmc_core: fix build error without CONFIG_DEBUG_FS To: "Kammela, Gayatri" , Randy Dunlap Cc: Chen Zhou , Rajneesh Bhardwaj , "Somayaji, Vishwanath" , 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 Wed, Feb 26, 2020 at 3:56 AM Kammela, Gayatri wrote: > > -----Original Message----- > > From: Kammela, Gayatri > > Sent: Tuesday, February 25, 2020 9:11 AM > > To: Andy Shevchenko ; Chen Zhou > > > > Cc: Rajneesh Bhardwaj ; Somayaji, > > Vishwanath ; Darren Hart > > ; Andy Shevchenko ; > > Platform Driver ; Linux Kernel Mailing > > List > > Subject: RE: [PATCH -next] platform/x86: intel_pmc_core: fix build error > > without CONFIG_DEBUG_FS > > > > > -----Original Message----- > > > From: Andy Shevchenko > > > Sent: Tuesday, February 25, 2020 2:13 AM > > > To: Chen Zhou ; Kammela, Gayatri > > > > > > Cc: Rajneesh Bhardwaj ; Somayaji, > > > Vishwanath ; Darren Hart > > > ; Andy Shevchenko ; > > Platform > > > Driver ; Linux Kernel Mailing > > > List > > > Subject: Re: [PATCH -next] platform/x86: intel_pmc_core: fix build > > > error without CONFIG_DEBUG_FS > > > > > > 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). > > Agreed > > > > > > 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? > > Hi Andy, caught this bug in our internal regression too. I will send the patch > > shortly. Thanks! > > Update: Andy, I have 4 small fixes for the patch series merged in for-next branch. I don't see it in the mailing list. Please check if you send them correctly. There are more bug reports coming. We must fix this ASAP. > I am wondering if I should send the fixup patches or if you drop the patch series from for-next branch, I can send out the new version that includes all these fixes. Please suggest. Thanks! > > > > > > > > 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 -- With Best Regards, Andy Shevchenko