From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Rafael J. Wysocki" Subject: Re: [PATCH] PM / OPP: fix condition for empty of_init_opp_table() Date: Thu, 21 Feb 2013 17:24:45 +0100 Message-ID: <75659049.45v5PxmPVX@vostro.rjw.lan> References: <1361444685-1034-1-git-send-email-shawn.guo@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: Received: from hydra.sisk.pl ([212.160.235.94]:40879 "EHLO hydra.sisk.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753596Ab3BUQSI convert rfc822-to-8bit (ORCPT ); Thu, 21 Feb 2013 11:18:08 -0500 In-Reply-To: <1361444685-1034-1-git-send-email-shawn.guo@linaro.org> Sender: linux-pm-owner@vger.kernel.org List-Id: linux-pm@vger.kernel.org To: Shawn Guo Cc: linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Nishanth Menon On Thursday, February 21, 2013 07:04:45 PM Shawn Guo wrote: > randconfig build reports the following error which is caused by that > CONFIG_PM_OPP is unset. >=20 > CC arch/arm/mach-imx/mach-imx6q.o > arch/arm/mach-imx/mach-imx6q.c: In function =E2=80=98imx6q_opp_init=E2= =80=99: > arch/arm/mach-imx/mach-imx6q.c:248:2: error: implicit declaration of = function =E2=80=98of_init_opp_table=E2=80=99 [-Werror=3Dimplicit-functi= on-declaration] >=20 > Fix the error by giving a more correct condition for empty > of_init_opp_table() implementation. >=20 > Reported-by: Rob Herring > Signed-off-by: Shawn Guo Applied to linux-pm.git/linux-next, I'm going to push it to Linus later= this week. Thanks, Rafael > --- > include/linux/opp.h | 18 +++++++++--------- > 1 file changed, 9 insertions(+), 9 deletions(-) >=20 > diff --git a/include/linux/opp.h b/include/linux/opp.h > index 214e0eb..3aca2b8 100644 > --- a/include/linux/opp.h > +++ b/include/linux/opp.h > @@ -47,15 +47,6 @@ int opp_enable(struct device *dev, unsigned long f= req); > int opp_disable(struct device *dev, unsigned long freq); > =20 > struct srcu_notifier_head *opp_get_notifier(struct device *dev); > - > -#ifdef CONFIG_OF > -int of_init_opp_table(struct device *dev); > -#else > -static inline int of_init_opp_table(struct device *dev) > -{ > - return -EINVAL; > -} > -#endif /* CONFIG_OF */ > #else > static inline unsigned long opp_get_voltage(struct opp *opp) > { > @@ -112,6 +103,15 @@ static inline struct srcu_notifier_head *opp_get= _notifier(struct device *dev) > } > #endif /* CONFIG_PM_OPP */ > =20 > +#if defined(CONFIG_PM_OPP) && defined(CONFIG_OF) > +int of_init_opp_table(struct device *dev); > +#else > +static inline int of_init_opp_table(struct device *dev) > +{ > + return -EINVAL; > +} > +#endif > + > #if defined(CONFIG_CPU_FREQ) && defined(CONFIG_PM_OPP) > int opp_init_cpufreq_table(struct device *dev, > struct cpufreq_frequency_table **table); >=20 --=20 I speak only for myself. Rafael J. Wysocki, Intel Open Source Technology Center.