Thread (94 messages) 94 messages, 7 authors, 2016-02-03

Re: [RFC PATCH 04/19] cpufreq: bring data structures close to their locks

From: Viresh Kumar <viresh.kumar@linaro.org>
Date: 2016-01-12 09:34:01
Also in: lkml

On 11-01-16, 23:07, Peter Zijlstra wrote:
On Mon, Jan 11, 2016 at 05:35:45PM +0000, Juri Lelli wrote:
quoted
+/**
+ * Iterate over governors
+ *
+ * cpufreq_governor_list is protected by cpufreq_governor_mutex.
+ */
+static LIST_HEAD(cpufreq_governor_list);
+static DEFINE_MUTEX(cpufreq_governor_mutex);
+#define for_each_governor(__governor)				\
+	list_for_each_entry(__governor, &cpufreq_governor_list, governor_list)
So you could stuff the lockdep_assert_held() you later add intididually
into the for_each_governor macro, impossible to forget that way.
How exactly? I couldn't see how it can be done in a neat and clean
way.

-- 
viresh
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help