Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1672811
| From | Juri Lelli <juri.lelli@arm.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH V2 1/5] arch_topology: Get rid of "cap_parsing_done" |
| Date | 2017-06-22 18:50 +0200 |
| Message-ID | <tVdsS-7hT-13@gated-at.bofh.it> (permalink) |
| References | <tUFKy-1oG-5@gated-at.bofh.it> <tUFKy-1oG-21@gated-at.bofh.it> <tV6Up-2Rl-11@gated-at.bofh.it> <tVbhp-5Uv-33@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 22/06/17 19:59, Viresh Kumar wrote:
> On 22-06-17, 10:44, Juri Lelli wrote:
> > Hi,
> >
> > On 21/06/17 10:16, Viresh Kumar wrote:
> > > We can reuse "cap_parsing_failed" instead of keeping an additional
> > > variable here.
> > >
> > > Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
> > > ---
> > > drivers/base/arch_topology.c | 5 ++---
> > > 1 file changed, 2 insertions(+), 3 deletions(-)
> > >
> > > diff --git a/drivers/base/arch_topology.c b/drivers/base/arch_topology.c
> > > index d1c33a85059e..8239a6232808 100644
> > > --- a/drivers/base/arch_topology.c
> > > +++ b/drivers/base/arch_topology.c
> > > @@ -161,7 +161,6 @@ int __init topology_parse_cpu_capacity(struct device_node *cpu_node, int cpu)
> > >
> > > #ifdef CONFIG_CPU_FREQ
> > > static cpumask_var_t cpus_to_visit;
> > > -static bool cap_parsing_done;
> > > static void parsing_done_workfn(struct work_struct *work);
> > > static DECLARE_WORK(parsing_done_work, parsing_done_workfn);
> > >
> > > @@ -173,7 +172,7 @@ init_cpu_capacity_callback(struct notifier_block *nb,
> > > struct cpufreq_policy *policy = data;
> > > int cpu;
> > >
> > > - if (cap_parsing_failed || cap_parsing_done)
> > > + if (cap_parsing_failed)
> > > return 0;
> > >
> > > switch (val) {
> > > @@ -193,7 +192,7 @@ init_cpu_capacity_callback(struct notifier_block *nb,
> > > topology_normalize_cpu_scale();
> > > kfree(raw_capacity);
> > > pr_debug("cpu_capacity: parsing done\n");
> > > - cap_parsing_done = true;
> > > + cap_parsing_failed = true;
> >
> > But we didn't actually failed here, right?
>
> Yeah. So I can actually move this patch to the end of the series and
> cap_parsing_done can be dropped then as we will end up using
> !raw_capacity instead. And the end result will stay the same.
>
OK.
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH V2 0/5] arch_topology: Minor cleanups Viresh Kumar <viresh.kumar@linaro.org> - 2017-06-21 06:50 +0200
[PATCH V2 3/5] arch_topology: Covert switch block to if block Viresh Kumar <viresh.kumar@linaro.org> - 2017-06-21 06:50 +0200
[PATCH V2 4/5] arch_topology: Return 0 or -ve errors from topology_parse_cpu_capacity() Viresh Kumar <viresh.kumar@linaro.org> - 2017-06-21 06:50 +0200
Re: [PATCH V2 4/5] arch_topology: Return 0 or -ve errors from topology_parse_cpu_capacity() Juri Lelli <juri.lelli@arm.com> - 2017-06-22 11:50 +0200
Re: [PATCH V2 4/5] arch_topology: Return 0 or -ve errors from topology_parse_cpu_capacity() Viresh Kumar <viresh.kumar@linaro.org> - 2017-06-22 16:30 +0200
Re: [PATCH V2 4/5] arch_topology: Return 0 or -ve errors from topology_parse_cpu_capacity() Juri Lelli <juri.lelli@arm.com> - 2017-06-22 18:50 +0200
[PATCH V2 5/5] arch_topology: Localize cap_parsing_failed to topology_parse_cpu_capacity() Viresh Kumar <viresh.kumar@linaro.org> - 2017-06-21 06:50 +0200
[PATCH V2 2/5] arch_topology: Don't break lines unnecessarily Viresh Kumar <viresh.kumar@linaro.org> - 2017-06-21 06:50 +0200
[PATCH V2 1/5] arch_topology: Get rid of "cap_parsing_done" Viresh Kumar <viresh.kumar@linaro.org> - 2017-06-21 06:50 +0200
Re: [PATCH V2 1/5] arch_topology: Get rid of "cap_parsing_done" Juri Lelli <juri.lelli@arm.com> - 2017-06-22 11:50 +0200
Re: [PATCH V2 1/5] arch_topology: Get rid of "cap_parsing_done" Viresh Kumar <viresh.kumar@linaro.org> - 2017-06-22 16:30 +0200
Re: [PATCH V2 1/5] arch_topology: Get rid of "cap_parsing_done" Juri Lelli <juri.lelli@arm.com> - 2017-06-22 18:50 +0200
csiph-web