Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752981AbdGHQAr (ORCPT ); Sat, 8 Jul 2017 12:00:47 -0400 Received: from mail-qk0-f194.google.com ([209.85.220.194]:33584 "EHLO mail-qk0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752689AbdGHQAp (ORCPT ); Sat, 8 Jul 2017 12:00:45 -0400 MIME-Version: 1.0 In-Reply-To: <20170708000303.21863-1-dbasehore@chromium.org> References: <20170708000303.21863-1-dbasehore@chromium.org> From: Andy Shevchenko Date: Sat, 8 Jul 2017 19:00:43 +0300 Message-ID: Subject: Re: [PATCH v5 1/5] x86: stub out pmc function To: Derek Basehore Cc: "linux-kernel@vger.kernel.org" , Thomas Gleixner , Ingo Molnar , Rajneesh Bhardwaj , "x86@kernel.org" , Platform Driver , "Rafael J . Wysocki" , Len Brown , "linux-pm@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1161 Lines: 41 On Sat, Jul 8, 2017 at 3:02 AM, Derek Basehore wrote: > This creates an inline function of intel_pmc_slp_s0_counter_read for > !CONFIG_INTEL_PMC_CORE. it doesn't make sense alone. There is a plan to move this header to where it nowadays belongs to, i.e. include/linux/platform_data/x86/. Please, do this relocation first. > > Signed-off-by: Derek Basehore > --- > arch/x86/include/asm/pmc_core.h | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/arch/x86/include/asm/pmc_core.h b/arch/x86/include/asm/pmc_core.h > index d4855f11136d..5d142d915f30 100644 > --- a/arch/x86/include/asm/pmc_core.h > +++ b/arch/x86/include/asm/pmc_core.h > @@ -22,6 +22,10 @@ > #define _ASM_PMC_CORE_H > > /* API to read SLP_S0_RESIDENCY counter */ > -int intel_pmc_slp_s0_counter_read(u32 *data); > +#ifdef CONFIG_INTEL_PMC_CORE > +extern int intel_pmc_slp_s0_counter_read(u32 *data); > +#else > +static inline int intel_pmc_slp_s0_counter_read(u32 *data) { return -EPERM; } > +#endif > > #endif /* _ASM_PMC_CORE_H */ > -- > 2.13.2.725.g09c95d1e9-goog > -- With Best Regards, Andy Shevchenko