Skip to contentSkip to conversation

lockdep: remove unused factor variable from lockdep_stats_show

PATCH In review Sergey Senozhatsky 2 participants 4 messages Mar 23, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 lockdep: remove unused factor variable from lockdep_stats_show

lockdep: remove unused factor variable from lockdep_stats_show

---

 kernel/lockdep_proc.c |    9 +--------
 1 files changed, 1 insertions(+), 8 deletions(-)
kernel/lockdep_proc.c +1 -8
index 1969d2f..71edd2f 100644
@@ -225,7 +225,7 @@ static int lockdep_stats_show(struct seq_file *m, void *v)
 		      nr_irq_read_safe = 0, nr_irq_read_unsafe = 0,
 		      nr_softirq_read_safe = 0, nr_softirq_read_unsafe = 0,
 		      nr_hardirq_read_safe = 0, nr_hardirq_read_unsafe = 0,
-		      sum_forward_deps = 0, factor = 0;
+		      sum_forward_deps = 0;
 
 	list_for_each_entry(class, &all_lock_classes, lock_entry) {
 
@@ -283,13 +283,6 @@ static int lockdep_stats_show(struct seq_file *m, void *v)
 			nr_hardirq_unsafe * nr_hardirq_safe +
 			nr_list_entries);
 
-	/*
-	 * Estimated factor between direct and indirect
-	 * dependencies:
-	 */
-	if (nr_list_entries)
-		factor = sum_forward_deps / nr_list_entries;
-
 #ifdef CONFIG_PROVE_LOCKING
 	seq_printf(m, " dependency chains:             %11lu [max: %lu]\n",
 			nr_lock_chains, MAX_LOCKDEP_CHAINS);
#1 lore raw
Quoted 1 line · Sergey Senozhatsky

lockdep: remove unused factor variable from lockdep_stats_show

Please use more readable subject lines in the future. I have changed this one to:

lockdep: Remove unused 'factor' variable from lockdep_stats_show()

Note the capitalization of the sentence, the quotes and the brackets - all which which help readability by structuring/differentiating various parts of the title properly.

Thanks,

Ingo

#2 lore raw

Hello,

Quoted 4 lines · Ingo Molnar
Quoted 1 line · Sergey Senozhatsky

lockdep: remove unused factor variable from lockdep_stats_show

Quoted 9 lines

Please use more readable subject lines in the future. I have changed this one to:

lockdep: Remove unused 'factor' variable from lockdep_stats_show()

Note the capitalization of the sentence, the quotes and the brackets - all which which help readability by structuring/differentiating various parts of the title properly.

Sorry for that. Sure will do.

Thanks,
Sergey

#3 lore raw

[tip:core/urgent] lockdep: Remove unused 'factor' variable from lockdep_stats_show()

In reply to Sergey Senozhatsky
Commit-ID:  dec2960827c85253d76938dbfa909df3be34958b
Gitweb:     http://git.kernel.org/tip/dec2960827c85253d76938dbfa909df3be34958b
Author:     Sergey Senozhatsky <[email protected]>
AuthorDate: Wed, 23 Mar 2011 14:38:28 +0200
Committer:  Ingo Molnar <[email protected]>
CommitDate: Wed, 23 Mar 2011 13:54:47 +0100

lockdep: Remove unused 'factor' variable from lockdep_stats_show()

LKML-Reference: <[email protected]>

---
 kernel/lockdep_proc.c |    9 +--------
 1 files changed, 1 insertions(+), 8 deletions(-)
kernel/lockdep_proc.c +1 -8
index 1969d2f..71edd2f 100644
@@ -225,7 +225,7 @@ static int lockdep_stats_show(struct seq_file *m, void *v)
 		      nr_irq_read_safe = 0, nr_irq_read_unsafe = 0,
 		      nr_softirq_read_safe = 0, nr_softirq_read_unsafe = 0,
 		      nr_hardirq_read_safe = 0, nr_hardirq_read_unsafe = 0,
-		      sum_forward_deps = 0, factor = 0;
+		      sum_forward_deps = 0;
 
 	list_for_each_entry(class, &all_lock_classes, lock_entry) {
 
@@ -283,13 +283,6 @@ static int lockdep_stats_show(struct seq_file *m, void *v)
 			nr_hardirq_unsafe * nr_hardirq_safe +
 			nr_list_entries);
 
-	/*
-	 * Estimated factor between direct and indirect
-	 * dependencies:
-	 */
-	if (nr_list_entries)
-		factor = sum_forward_deps / nr_list_entries;
-
 #ifdef CONFIG_PROVE_LOCKING
 	seq_printf(m, " dependency chains:             %11lu [max: %lu]\n",
 			nr_lock_chains, MAX_LOCKDEP_CHAINS);