diff options
author | Markus Armbruster <armbru@redhat.com> | 2006-06-26 03:24:34 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-26 12:58:17 -0400 |
commit | 0c6856f702732d3cfc33eb59303e998ad6961de8 (patch) | |
tree | 98d3c76586f6e63b4dc43a0f763e9b6a7cc4a984 /arch/sh/oprofile | |
parent | 57136ca6d57359c7f21a9bbb4a5a0a61eeb53f2b (diff) |
[PATCH] oprofile: Fix unnecessary cleverness
nmi_create_files() in arch/i386/oprofile/nmi_int.c depends on
model->num_counters (number of performance counters) being less than 10.
While this is currently the case, it's too clever by half.
Other archs aren't quite as clever: they assume 100. I suggest to
normalize them all to 1000.
Cc: Philippe Elie <phil.el@wanadoo.fr>
Cc: John Levon <levon@movementarian.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/sh/oprofile')
-rw-r--r-- | arch/sh/oprofile/op_model_sh7750.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/sh/oprofile/op_model_sh7750.c b/arch/sh/oprofile/op_model_sh7750.c index 5ec9ddcc4b0b..c265185b22a7 100644 --- a/arch/sh/oprofile/op_model_sh7750.c +++ b/arch/sh/oprofile/op_model_sh7750.c | |||
@@ -198,7 +198,7 @@ static int sh7750_perf_counter_create_files(struct super_block *sb, struct dentr | |||
198 | 198 | ||
199 | for (i = 0; i < NR_CNTRS; i++) { | 199 | for (i = 0; i < NR_CNTRS; i++) { |
200 | struct dentry *dir; | 200 | struct dentry *dir; |
201 | char buf[3]; | 201 | char buf[4]; |
202 | 202 | ||
203 | snprintf(buf, sizeof(buf), "%d", i); | 203 | snprintf(buf, sizeof(buf), "%d", i); |
204 | dir = oprofilefs_mkdir(sb, root, buf); | 204 | dir = oprofilefs_mkdir(sb, root, buf); |