diff options
author | Robert Richter <robert.richter@amd.com> | 2009-06-05 15:54:24 +0200 |
---|---|---|
committer | Robert Richter <robert.richter@amd.com> | 2009-06-11 20:15:28 +0200 |
commit | 1a245c45343651a87ff63afc5ddeb8e24d731835 (patch) | |
tree | e5722bc5147779930d7652f6daaa604530013695 /arch/x86/oprofile | |
parent | 95e74e62c1540b1115fe8cec5b592f22960f2bb2 (diff) | |
download | kernel_samsung_crespo-1a245c45343651a87ff63afc5ddeb8e24d731835.zip kernel_samsung_crespo-1a245c45343651a87ff63afc5ddeb8e24d731835.tar.gz kernel_samsung_crespo-1a245c45343651a87ff63afc5ddeb8e24d731835.tar.bz2 |
x86/oprofile: remove some local variables in MSR save/restore functions
The patch removes some local variables in these functions.
Signed-off-by: Robert Richter <robert.richter@amd.com>
Diffstat (limited to 'arch/x86/oprofile')
-rw-r--r-- | arch/x86/oprofile/nmi_int.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/arch/x86/oprofile/nmi_int.c b/arch/x86/oprofile/nmi_int.c index 3b84b78..80b63d5 100644 --- a/arch/x86/oprofile/nmi_int.c +++ b/arch/x86/oprofile/nmi_int.c @@ -71,18 +71,16 @@ static int profile_exceptions_notify(struct notifier_block *self, static void nmi_cpu_save_registers(struct op_msrs *msrs) { - unsigned int const nr_ctrs = model->num_counters; - unsigned int const nr_ctrls = model->num_controls; struct op_msr *counters = msrs->counters; struct op_msr *controls = msrs->controls; unsigned int i; - for (i = 0; i < nr_ctrs; ++i) { + for (i = 0; i < model->num_counters; ++i) { if (counters[i].addr) rdmsrl(counters[i].addr, counters[i].saved); } - for (i = 0; i < nr_ctrls; ++i) { + for (i = 0; i < model->num_controls; ++i) { if (controls[i].addr) rdmsrl(controls[i].addr, controls[i].saved); } @@ -191,18 +189,16 @@ static int nmi_setup(void) static void nmi_restore_registers(struct op_msrs *msrs) { - unsigned int const nr_ctrs = model->num_counters; - unsigned int const nr_ctrls = model->num_controls; struct op_msr *counters = msrs->counters; struct op_msr *controls = msrs->controls; unsigned int i; - for (i = 0; i < nr_ctrls; ++i) { + for (i = 0; i < model->num_controls; ++i) { if (controls[i].addr) wrmsrl(controls[i].addr, controls[i].saved); } - for (i = 0; i < nr_ctrs; ++i) { + for (i = 0; i < model->num_counters; ++i) { if (counters[i].addr) wrmsrl(counters[i].addr, counters[i].saved); } |