diff options
author | Robert Richter <robert.richter@amd.com> | 2008-07-18 11:56:05 -0400 |
---|---|---|
committer | Robert Richter <robert.richter@amd.com> | 2008-10-15 14:47:34 -0400 |
commit | 2d55a478827f3eed2ee9701605fdeb9cac2d78dc (patch) | |
tree | a34e2b92c65335a6d3b4d61b4406f4d5379a08b3 /arch/x86/oprofile/op_model_amd.c | |
parent | e2fee2761ad1df2d29b9d502a3cefc87a17b32ca (diff) |
OProfile: Rework string handling in setup_ibs_files()
Signed-off-by: Robert Richter <robert.richter@amd.com>
Diffstat (limited to 'arch/x86/oprofile/op_model_amd.c')
-rw-r--r-- | arch/x86/oprofile/op_model_amd.c | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/arch/x86/oprofile/op_model_amd.c b/arch/x86/oprofile/op_model_amd.c index 54632e0d6bf4..0657c56a66b5 100644 --- a/arch/x86/oprofile/op_model_amd.c +++ b/arch/x86/oprofile/op_model_amd.c | |||
@@ -473,7 +473,6 @@ static int (*create_arch_files)(struct super_block * sb, struct dentry * root); | |||
473 | 473 | ||
474 | static int setup_ibs_files(struct super_block * sb, struct dentry * root) | 474 | static int setup_ibs_files(struct super_block * sb, struct dentry * root) |
475 | { | 475 | { |
476 | char buf[12]; | ||
477 | struct dentry *dir; | 476 | struct dentry *dir; |
478 | int ret = 0; | 477 | int ret = 0; |
479 | 478 | ||
@@ -495,22 +494,22 @@ static int setup_ibs_files(struct super_block * sb, struct dentry * root) | |||
495 | ibs_config.max_cnt_op = 250000; | 494 | ibs_config.max_cnt_op = 250000; |
496 | ibs_config.op_enabled = 0; | 495 | ibs_config.op_enabled = 0; |
497 | ibs_config.dispatched_ops = 1; | 496 | ibs_config.dispatched_ops = 1; |
498 | snprintf(buf, sizeof(buf), "ibs_fetch"); | 497 | |
499 | dir = oprofilefs_mkdir(sb, root, buf); | 498 | dir = oprofilefs_mkdir(sb, root, "ibs_fetch"); |
500 | oprofilefs_create_ulong(sb, dir, "rand_enable", | ||
501 | &ibs_config.rand_en); | ||
502 | oprofilefs_create_ulong(sb, dir, "enable", | 499 | oprofilefs_create_ulong(sb, dir, "enable", |
503 | &ibs_config.fetch_enabled); | 500 | &ibs_config.fetch_enabled); |
504 | oprofilefs_create_ulong(sb, dir, "max_count", | 501 | oprofilefs_create_ulong(sb, dir, "max_count", |
505 | &ibs_config.max_cnt_fetch); | 502 | &ibs_config.max_cnt_fetch); |
506 | snprintf(buf, sizeof(buf), "ibs_uops"); | 503 | oprofilefs_create_ulong(sb, dir, "rand_enable", |
507 | dir = oprofilefs_mkdir(sb, root, buf); | 504 | &ibs_config.rand_en); |
505 | |||
506 | dir = oprofilefs_mkdir(sb, root, "ibs_uops"); | ||
508 | oprofilefs_create_ulong(sb, dir, "enable", | 507 | oprofilefs_create_ulong(sb, dir, "enable", |
509 | &ibs_config.op_enabled); | 508 | &ibs_config.op_enabled); |
510 | oprofilefs_create_ulong(sb, dir, "max_count", | 509 | oprofilefs_create_ulong(sb, dir, "max_count", |
511 | &ibs_config.max_cnt_op); | 510 | &ibs_config.max_cnt_op); |
512 | oprofilefs_create_ulong(sb, dir, "dispatched_ops", | 511 | oprofilefs_create_ulong(sb, dir, "dispatched_ops", |
513 | &ibs_config.dispatched_ops); | 512 | &ibs_config.dispatched_ops); |
514 | 513 | ||
515 | return 0; | 514 | return 0; |
516 | } | 515 | } |