<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/kernel/locking/lockdep_proc.c, branch v3.15-rc6</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>lockdep/proc: Fix lock-time avg computation</title>
<updated>2013-11-11T11:41:34+00:00</updated>
<author>
<name>Peter Zijlstra</name>
<email>peterz@infradead.org</email>
</author>
<published>2013-11-06T16:42:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=838cc7b488f89ee642fd8336e8e1b620c8c3ece2'/>
<id>838cc7b488f89ee642fd8336e8e1b620c8c3ece2</id>
<content type='text'>
&gt;    kernel/locking/lockdep_proc.c: In function 'seq_lock_time':
&gt; &gt;&gt; kernel/locking/lockdep_proc.c:424:23: warning: comparison of distinct pointer types lacks a cast [enabled by default]
&gt;
&gt;    418	static void seq_lock_time(struct seq_file *m, struct lock_time *lt)
&gt;    419	{
&gt;    420		seq_printf(m, "%14lu", lt-&gt;nr);
&gt;    421		seq_time(m, lt-&gt;min);
&gt;    422		seq_time(m, lt-&gt;max);
&gt;    423		seq_time(m, lt-&gt;total);
&gt;  &gt; 424		seq_time(m, lt-&gt;nr ? do_div(lt-&gt;total, lt-&gt;nr) : 0);
&gt;    425	}

My compiler refuses to actually say that; but it looks wrong in that
do_div() returns the remainder, not the divisor.

Reported-by: Fengguang Wu &lt;fengguang.wu@intel.com&gt;
Tested-by: Fengguang Wu &lt;fengguang.wu@intel.com&gt;
Signed-off-by: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Davidlohr Bueso &lt;davidlohr@hp.com&gt;
Link: http://lkml.kernel.org/r/20131106164230.GE16117@laptop.programming.kicks-ass.net
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
&gt;    kernel/locking/lockdep_proc.c: In function 'seq_lock_time':
&gt; &gt;&gt; kernel/locking/lockdep_proc.c:424:23: warning: comparison of distinct pointer types lacks a cast [enabled by default]
&gt;
&gt;    418	static void seq_lock_time(struct seq_file *m, struct lock_time *lt)
&gt;    419	{
&gt;    420		seq_printf(m, "%14lu", lt-&gt;nr);
&gt;    421		seq_time(m, lt-&gt;min);
&gt;    422		seq_time(m, lt-&gt;max);
&gt;    423		seq_time(m, lt-&gt;total);
&gt;  &gt; 424		seq_time(m, lt-&gt;nr ? do_div(lt-&gt;total, lt-&gt;nr) : 0);
&gt;    425	}

My compiler refuses to actually say that; but it looks wrong in that
do_div() returns the remainder, not the divisor.

Reported-by: Fengguang Wu &lt;fengguang.wu@intel.com&gt;
Tested-by: Fengguang Wu &lt;fengguang.wu@intel.com&gt;
Signed-off-by: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Davidlohr Bueso &lt;davidlohr@hp.com&gt;
Link: http://lkml.kernel.org/r/20131106164230.GE16117@laptop.programming.kicks-ass.net
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>locking: Move the lockdep code to kernel/locking/</title>
<updated>2013-11-06T06:55:08+00:00</updated>
<author>
<name>Peter Zijlstra</name>
<email>peterz@infradead.org</email>
</author>
<published>2013-10-31T17:14:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=8eddac3f103736163f49255bcb109edadea167f6'/>
<id>8eddac3f103736163f49255bcb109edadea167f6</id>
<content type='text'>
Suggested-by: Ingo Molnar &lt;mingo@kernel.org&gt;
Signed-off-by: Peter Zijlstra &lt;peterz@infradead.org&gt;
Link: http://lkml.kernel.org/n/tip-wl7s3tta5isufzfguc23et06@git.kernel.org
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Suggested-by: Ingo Molnar &lt;mingo@kernel.org&gt;
Signed-off-by: Peter Zijlstra &lt;peterz@infradead.org&gt;
Link: http://lkml.kernel.org/n/tip-wl7s3tta5isufzfguc23et06@git.kernel.org
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
