public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Robert Richter <robert.richter@amd.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: LKML <linux-kernel@vger.kernel.org>,
	oprofile-list <oprofile-list@lists.sourceforge.net>,
	Robert Richter <robert.richter@amd.com>
Subject: [PATCH 2/8] OProfile: Rework string handling in setup_ibs_files()
Date: Wed, 15 Oct 2008 22:09:04 +0200	[thread overview]
Message-ID: <1224101350-12877-3-git-send-email-robert.richter@amd.com> (raw)
In-Reply-To: <20081015110444.GA28703@elte.hu>

Signed-off-by: Robert Richter <robert.richter@amd.com>
---
 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 54632e0..0657c56 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);
 
 static int setup_ibs_files(struct super_block * sb, struct dentry * root)
 {
-	char buf[12];
 	struct dentry *dir;
 	int ret = 0;
 
@@ -495,22 +494,22 @@ static int setup_ibs_files(struct super_block * sb, struct dentry * root)
 	ibs_config.max_cnt_op = 250000;
 	ibs_config.op_enabled = 0;
 	ibs_config.dispatched_ops = 1;
-	snprintf(buf,  sizeof(buf), "ibs_fetch");
-	dir = oprofilefs_mkdir(sb, root, buf);
-	oprofilefs_create_ulong(sb, dir, "rand_enable",
-				&ibs_config.rand_en);
+
+	dir = oprofilefs_mkdir(sb, root, "ibs_fetch");
 	oprofilefs_create_ulong(sb, dir, "enable",
-		&ibs_config.fetch_enabled);
+				&ibs_config.fetch_enabled);
 	oprofilefs_create_ulong(sb, dir, "max_count",
-		&ibs_config.max_cnt_fetch);
-	snprintf(buf,  sizeof(buf), "ibs_uops");
-	dir = oprofilefs_mkdir(sb, root, buf);
+				&ibs_config.max_cnt_fetch);
+	oprofilefs_create_ulong(sb, dir, "rand_enable",
+				&ibs_config.rand_en);
+
+	dir = oprofilefs_mkdir(sb, root, "ibs_uops");
 	oprofilefs_create_ulong(sb, dir, "enable",
-		&ibs_config.op_enabled);
+				&ibs_config.op_enabled);
 	oprofilefs_create_ulong(sb, dir, "max_count",
-		&ibs_config.max_cnt_op);
+				&ibs_config.max_cnt_op);
 	oprofilefs_create_ulong(sb, dir, "dispatched_ops",
-		&ibs_config.dispatched_ops);
+				&ibs_config.dispatched_ops);
 
 	return 0;
 }
-- 
1.6.0.1



  parent reply	other threads:[~2008-10-15 21:03 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20081015110444.GA28703@elte.hu>
2008-10-15 20:09 ` [PATCH 0/8] OProfile cleanup patches for v2.6.28 Robert Richter
2008-10-15 20:09 ` [PATCH 1/8] OProfile: Rework oprofile_add_ibs_sample() function Robert Richter
2008-10-15 20:09 ` Robert Richter [this message]
2008-10-15 20:09 ` [PATCH 3/8] OProfile: Rename IBS sysfs dir into "ibs_op" Robert Richter
2008-10-15 20:09 ` [PATCH 4/8] oprofile: whitespace fixes Robert Richter
2008-10-15 20:09 ` [PATCH 5/8] oprofile: more " Robert Richter
2008-10-15 20:09 ` [PATCH 6/8] x86/oprofile: removing unused function parameter in add_ibs_begin() Robert Richter
2008-10-15 20:09 ` [PATCH 7/8] x86/oprofile: reordering functions in nmi_int.c Robert Richter
2008-10-15 20:09 ` [PATCH 8/8] x86/oprofile: add the logic for enabling additional IBS bits Robert Richter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1224101350-12877-3-git-send-email-robert.richter@amd.com \
    --to=robert.richter@amd.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=oprofile-list@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox