Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1191453
| From | Viresh Kumar <viresh.kumar@linaro.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 2/2] cpufreq: Separate CPU device removal from CPU online |
| Date | 2015-07-24 04:20 +0200 |
| Message-ID | <pPAKC-mj-3@gated-at.bofh.it> (permalink) |
| References | <pPbMe-60b-7@gated-at.bofh.it> <pPbMe-60b-5@gated-at.bofh.it> <pPikF-79S-11@gated-at.bofh.it> <pPvhT-Eb-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 23-07-15, 22:56, Rafael J. Wysocki wrote:
> > > + if (policy && policy->kobj_cpu != cpu) {
> >
> > Why are you comparing cpu against kobj_cpu ? I don't think it can ever
> > be false.
So what I meant was that the expression 'policy->kobj_cpu != cpu' will
never return 'false'. Because policy->kobj_cpu is going to get set to
the cpu for which we allocated the policy. And so it wouldn't match
for any other CPU.
> It can. When we're adding a CPU that has a policy already, because it is
> "related" to a previously registered CPU.
In this case also the expression will return true.
> > > + ret = sysfs_create_link(&dev->kobj, &policy->kobj, "cpufreq");
> > > + if (ret) {
> > > + dev_dbg(dev, "%s: Failed to create link (%d)\n",
> >
> > dev_err
>
> Well, I'm wondering about this. Why does this have to be dev_err()?
Isn't this an error? We need to create a symlink, we failed and
atleast the user should know about it. Why hide such failures ?
--
viresh
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH 2/2] cpufreq: Separate CPU device removal from CPU online "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2015-07-23 01:40 +0200
Re: [PATCH 2/2] cpufreq: Separate CPU device removal from CPU online Viresh Kumar <viresh.kumar@linaro.org> - 2015-07-23 08:40 +0200
Re: [PATCH 2/2] cpufreq: Separate CPU device removal from CPU online Viresh Kumar <viresh.kumar@linaro.org> - 2015-07-24 04:20 +0200
csiph-web