Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1393414 > unrolled thread

[PATCH] Fix CONFIG_PM_OPP without CONFIG_OF build failure

Started byEric Engestrom <eric.engestrom@imgtec.com>
First post2016-05-03 15:20 +0200
Last post2016-05-05 13:00 +0200
Articles 5 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] Fix CONFIG_PM_OPP without CONFIG_OF build failure Eric Engestrom <eric.engestrom@imgtec.com> - 2016-05-03 15:20 +0200
    Re: [PATCH] Fix CONFIG_PM_OPP without CONFIG_OF build failure Viresh Kumar <viresh.kumar@linaro.org> - 2016-05-05 05:10 +0200
      [PATCH v2] Fix CONFIG_PM_OPP without CONFIG_OF build failure Eric Engestrom <eric.engestrom@imgtec.com> - 2016-05-05 11:20 +0200
        Re: [PATCH v2] Fix CONFIG_PM_OPP without CONFIG_OF build failure Sudeep Holla <sudeep.holla@arm.com> - 2016-05-05 11:30 +0200
          Re: [PATCH v2] Fix CONFIG_PM_OPP without CONFIG_OF build failure Viresh Kumar <viresh.kumar@linaro.org> - 2016-05-05 13:00 +0200

#1393414 — [PATCH] Fix CONFIG_PM_OPP without CONFIG_OF build failure

FromEric Engestrom <eric.engestrom@imgtec.com>
Date2016-05-03 15:20 +0200
Subject[PATCH] Fix CONFIG_PM_OPP without CONFIG_OF build failure
Message-ID<ruIp5-rE-13@gated-at.bofh.it>
From: Rufus Hamade <rufus.hamade@imgtec.com>

A few `#ifdef CONFIG_OF` were missing or misplaced, resulting in a few
"unused function" warnings in core.c, and preventing the build of cpu.c
because of the redefinition of `dev_pm_opp_set_sharing_cpus()`.

Signed-off-by: Rufus Hamade <rufus.hamade@imgtec.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Tested-by: Eric Engestrom <eric.engestrom@imgtec.com>
---
 drivers/base/power/opp/core.c | 6 ++++++
 drivers/base/power/opp/cpu.c  | 2 +-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/base/power/opp/core.c b/drivers/base/power/opp/core.c
index 433b600..bc5448c 100644
--- a/drivers/base/power/opp/core.c
+++ b/drivers/base/power/opp/core.c
@@ -53,6 +53,7 @@ static struct opp_device *_find_opp_dev(const struct device *dev,
 	return NULL;
 }
 
+#ifdef CONFIG_OF
 static struct opp_table *_managed_opp(const struct device_node *np)
 {
 	struct opp_table *opp_table;
@@ -72,6 +73,7 @@ static struct opp_table *_managed_opp(const struct device_node *np)
 
 	return NULL;
 }
+#endif
 
 /**
  * _find_opp_table() - find opp_table struct using device pointer
@@ -1115,6 +1117,7 @@ static int _opp_add_v1(struct device *dev, unsigned long freq, long u_volt,
 	return ret;
 }
 
+#ifdef CONFIG_OF
 /* TODO: Support multiple regulators */
 static int opp_parse_supplies(struct dev_pm_opp *opp, struct device *dev,
 			      struct opp_table *opp_table)
@@ -1191,6 +1194,7 @@ static int opp_parse_supplies(struct dev_pm_opp *opp, struct device *dev,
 
 	return 0;
 }
+#endif
 
 /**
  * dev_pm_opp_set_supported_hw() - Set supported platforms
@@ -1520,6 +1524,7 @@ void dev_pm_opp_put_regulator(struct device *dev)
 }
 EXPORT_SYMBOL_GPL(dev_pm_opp_put_regulator);
 
+#ifdef CONFIG_OF
 static bool _opp_is_supported(struct device *dev, struct opp_table *opp_table,
 			      struct device_node *np)
 {
@@ -1657,6 +1662,7 @@ static int _opp_add_static_v2(struct device *dev, struct device_node *np)
 	mutex_unlock(&opp_table_lock);
 	return ret;
 }
+#endif
 
 /**
  * dev_pm_opp_add()  - Add an OPP table from a table definitions
diff --git a/drivers/base/power/opp/cpu.c b/drivers/base/power/opp/cpu.c
index ba2bdbd..8aae170 100644
--- a/drivers/base/power/opp/cpu.c
+++ b/drivers/base/power/opp/cpu.c
@@ -119,6 +119,7 @@ void dev_pm_opp_free_cpufreq_table(struct device *dev,
 EXPORT_SYMBOL_GPL(dev_pm_opp_free_cpufreq_table);
 #endif	/* CONFIG_CPU_FREQ */
 
+#ifdef CONFIG_OF
 /* Required only for V1 bindings, as v2 can manage it from DT itself */
 int dev_pm_opp_set_sharing_cpus(struct device *cpu_dev, cpumask_var_t cpumask)
 {
@@ -160,7 +161,6 @@ int dev_pm_opp_set_sharing_cpus(struct device *cpu_dev, cpumask_var_t cpumask)
 }
 EXPORT_SYMBOL_GPL(dev_pm_opp_set_sharing_cpus);
 
-#ifdef CONFIG_OF
 void dev_pm_opp_of_cpumask_remove_table(cpumask_var_t cpumask)
 {
 	struct device *cpu_dev;
-- 
2.8.1

[toc] | [next] | [standalone]


#1394840

FromViresh Kumar <viresh.kumar@linaro.org>
Date2016-05-05 05:10 +0200
Message-ID<rvhPP-8uZ-3@gated-at.bofh.it>
In reply to#1393414
On 03-05-16, 14:14, Eric Engestrom wrote:
> diff --git a/drivers/base/power/opp/cpu.c b/drivers/base/power/opp/cpu.c
> index ba2bdbd..8aae170 100644
> --- a/drivers/base/power/opp/cpu.c
> +++ b/drivers/base/power/opp/cpu.c
> @@ -119,6 +119,7 @@ void dev_pm_opp_free_cpufreq_table(struct device *dev,
>  EXPORT_SYMBOL_GPL(dev_pm_opp_free_cpufreq_table);
>  #endif	/* CONFIG_CPU_FREQ */
>  
> +#ifdef CONFIG_OF
>  /* Required only for V1 bindings, as v2 can manage it from DT itself */
>  int dev_pm_opp_set_sharing_cpus(struct device *cpu_dev, cpumask_var_t cpumask)
>  {
> @@ -160,7 +161,6 @@ int dev_pm_opp_set_sharing_cpus(struct device *cpu_dev, cpumask_var_t cpumask)
>  }
>  EXPORT_SYMBOL_GPL(dev_pm_opp_set_sharing_cpus);
>  
> -#ifdef CONFIG_OF
>  void dev_pm_opp_of_cpumask_remove_table(cpumask_var_t cpumask)
>  {
>  	struct device *cpu_dev;

This change was incorrect as this API can be used for non-OF case.
Some things have already changed, can you please rebase on linux-next
and resend this patch?

-- 
viresh

[toc] | [prev] | [next] | [standalone]


#1394942 — [PATCH v2] Fix CONFIG_PM_OPP without CONFIG_OF build failure

FromEric Engestrom <eric.engestrom@imgtec.com>
Date2016-05-05 11:20 +0200
Subject[PATCH v2] Fix CONFIG_PM_OPP without CONFIG_OF build failure
Message-ID<rvnBU-5DB-9@gated-at.bofh.it>
In reply to#1394840
From: Rufus Hamade <rufus.hamade@imgtec.com>

A few `#ifdef CONFIG_OF` were missing, resulting in "unused function"
warnings in core.c.

Signed-off-by: Rufus Hamade <rufus.hamade@imgtec.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Tested-by: Eric Engestrom <eric.engestrom@imgtec.com>
---
v2: drop incorrect change in cpu.c (Viresh Kumar)

On Thu, May 05, 2016 at 08:31:09AM +0530, Viresh Kumar wrote:
> Some things have already changed, can you please rebase on linux-next
> and resend this patch?

I rebased on top of linux-next (30d0993ec9f6) from the repo
git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
but there were no change (the patch is identical, save for the
removed change in cpu.c; not even a line number changed).
Which repo did you want me to rebase on?

---
 drivers/base/power/opp/core.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/base/power/opp/core.c b/drivers/base/power/opp/core.c
index 433b600..bc5448c 100644
--- a/drivers/base/power/opp/core.c
+++ b/drivers/base/power/opp/core.c
@@ -53,6 +53,7 @@ static struct opp_device *_find_opp_dev(const struct device *dev,
 	return NULL;
 }
 
+#ifdef CONFIG_OF
 static struct opp_table *_managed_opp(const struct device_node *np)
 {
 	struct opp_table *opp_table;
@@ -72,6 +73,7 @@ static struct opp_table *_managed_opp(const struct device_node *np)
 
 	return NULL;
 }
+#endif
 
 /**
  * _find_opp_table() - find opp_table struct using device pointer
@@ -1115,6 +1117,7 @@ static int _opp_add_v1(struct device *dev, unsigned long freq, long u_volt,
 	return ret;
 }
 
+#ifdef CONFIG_OF
 /* TODO: Support multiple regulators */
 static int opp_parse_supplies(struct dev_pm_opp *opp, struct device *dev,
 			      struct opp_table *opp_table)
@@ -1191,6 +1194,7 @@ static int opp_parse_supplies(struct dev_pm_opp *opp, struct device *dev,
 
 	return 0;
 }
+#endif
 
 /**
  * dev_pm_opp_set_supported_hw() - Set supported platforms
@@ -1520,6 +1524,7 @@ void dev_pm_opp_put_regulator(struct device *dev)
 }
 EXPORT_SYMBOL_GPL(dev_pm_opp_put_regulator);
 
+#ifdef CONFIG_OF
 static bool _opp_is_supported(struct device *dev, struct opp_table *opp_table,
 			      struct device_node *np)
 {
@@ -1657,6 +1662,7 @@ static int _opp_add_static_v2(struct device *dev, struct device_node *np)
 	mutex_unlock(&opp_table_lock);
 	return ret;
 }
+#endif
 
 /**
  * dev_pm_opp_add()  - Add an OPP table from a table definitions
-- 
2.8.2

[toc] | [prev] | [next] | [standalone]


#1394947 — Re: [PATCH v2] Fix CONFIG_PM_OPP without CONFIG_OF build failure

FromSudeep Holla <sudeep.holla@arm.com>
Date2016-05-05 11:30 +0200
SubjectRe: [PATCH v2] Fix CONFIG_PM_OPP without CONFIG_OF build failure
Message-ID<rvnLA-5Kz-11@gated-at.bofh.it>
In reply to#1394942
On Thu, May 5, 2016 at 10:14 AM, Eric Engestrom
<eric.engestrom@imgtec.com> wrote:
> From: Rufus Hamade <rufus.hamade@imgtec.com>
>
> A few `#ifdef CONFIG_OF` were missing, resulting in "unused function"
> warnings in core.c.
>
> Signed-off-by: Rufus Hamade <rufus.hamade@imgtec.com>
> Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
> Tested-by: Eric Engestrom <eric.engestrom@imgtec.com>
> ---
> v2: drop incorrect change in cpu.c (Viresh Kumar)
>
> On Thu, May 05, 2016 at 08:31:09AM +0530, Viresh Kumar wrote:
>> Some things have already changed, can you please rebase on linux-next
>> and resend this patch?
>
> I rebased on top of linux-next (30d0993ec9f6) from the repo
> git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
> but there were no change (the patch is identical, save for the
> removed change in cpu.c; not even a line number changed).
> Which repo did you want me to rebase on?
>

I posted some changes around this a week ago, I see Rafael has pulled into
his bleeding-edge[1] patch this morning. If no issue are found, it
should eventually
make to linux-next in couple of days.

Regards,
Sudeep

[1] git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm bleeding-edge

[toc] | [prev] | [next] | [standalone]


#1395032 — Re: [PATCH v2] Fix CONFIG_PM_OPP without CONFIG_OF build failure

FromViresh Kumar <viresh.kumar@linaro.org>
Date2016-05-05 13:00 +0200
SubjectRe: [PATCH v2] Fix CONFIG_PM_OPP without CONFIG_OF build failure
Message-ID<rvpaG-6Ru-17@gated-at.bofh.it>
In reply to#1394947
On 05-05-16, 10:20, Sudeep Holla wrote:
> On Thu, May 5, 2016 at 10:14 AM, Eric Engestrom
> <eric.engestrom@imgtec.com> wrote:
> > From: Rufus Hamade <rufus.hamade@imgtec.com>
> >
> > A few `#ifdef CONFIG_OF` were missing, resulting in "unused function"
> > warnings in core.c.
> >
> > Signed-off-by: Rufus Hamade <rufus.hamade@imgtec.com>
> > Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
> > Tested-by: Eric Engestrom <eric.engestrom@imgtec.com>
> > ---
> > v2: drop incorrect change in cpu.c (Viresh Kumar)
> >
> > On Thu, May 05, 2016 at 08:31:09AM +0530, Viresh Kumar wrote:
> >> Some things have already changed, can you please rebase on linux-next
> >> and resend this patch?
> >
> > I rebased on top of linux-next (30d0993ec9f6) from the repo
> > git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
> > but there were no change (the patch is identical, save for the
> > removed change in cpu.c; not even a line number changed).
> > Which repo did you want me to rebase on?
> >
> 
> I posted some changes around this a week ago, I see Rafael has pulled into
> his bleeding-edge[1] patch this morning. If no issue are found, it
> should eventually
> make to linux-next in couple of days.

I have tried to fix all these issues differently, most of you are cc'd
on that patch:

[PATCH] PM / OPP: Move CONFIG_OF dependent code in a separate file

-- 
viresh

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web