On 4 January 2015 at 03:28, Rafael J. Wysocki rjw@rjwysocki.net wrote:
On Friday, January 02, 2015 11:16:39 AM Viresh Kumar wrote:
__cpufreq_stats_create_table() is called from:
- policy create notifier: stats will always be NULL here
- cpufreq_stats_init() calls it for all CPUs as cpufreq-stats can be initialized after cpufreq driver. Because CPUs share clock lines, 'stats' will be NULL here for the first cpu only and will return back for others.
While we return for other CPUs, we don't return the right error value. We must return -EEXIST, as that is the case here.
What exactly is wrong with -EBUSY, then?
Its not that could would fail with EBUSY but this is what I thought. Generally: - Returning EBUSY means: we are busy right not try again. And that might be immediate. - Returning EEXIST means: We already have what you are trying to create and there is no need to create it again, and so no more tries are required.
That's all..