Re: [PATCH 7/7] cpufreq: Separate CPU device removal from CPU online

From: Rafael J. Wysocki
Date: Tue Jul 28 2015 - 10:22:57 EST


Hi Viresh,

On Tue, Jul 28, 2015 at 4:06 AM, Viresh Kumar <viresh.kumar@xxxxxxxxxx> wrote:
> On 27-07-15, 23:56, Rafael J. Wysocki wrote:
>> OK, I've just seen that patch, but it doesn't modify bus_probe_device() AFAICS.
>
> Why is bus_probe_device() required to be modified?

Because that's a different place where sif->add() is called and if it
can fail, we need to fail the probing there too.

In other words, failing things in one place and not doing that in
another analogous place is inconsistent and incorrect.

> I wrote this patch to propagate -EPROBE_DEFER from the ->init()
> callback, which is called from cpufreq_register_driver().
>
> And that worked after my patch..
>
>> Plus we also ignore the return value of cpufreq_add_dev() in the
>> hotplug notifier callback.
>
> My use case needed it for the subsys callback.

That case is a failing cpufreq driver registration, right?

What if a CPU is registered after the cpufreq driver has been
registered and *that* fails? Shouldn't it fail in the same way in
both cases?

Thanks,
Rafael
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/