2012-10-22 08:51:41

by Wei Yongjun

[permalink] [raw]
Subject: [PATCH] perf/x86: remove unused variable in nhmex_rbox_alter_er()

From: Wei Yongjun <[email protected]>

The variable port is initialized but never used
otherwise, so remove the unused variable.

dpatch engine is used to auto generate this patch.
(https://github.com/weiyj/dpatch)

Signed-off-by: Wei Yongjun <[email protected]>
---
arch/x86/kernel/cpu/perf_event_intel_uncore.c | 2 --
1 file changed, 2 deletions(-)

diff --git a/arch/x86/kernel/cpu/perf_event_intel_uncore.c b/arch/x86/kernel/cpu/perf_event_intel_uncore.c
index 99d96a4..e7d4061 100644
--- a/arch/x86/kernel/cpu/perf_event_intel_uncore.c
+++ b/arch/x86/kernel/cpu/perf_event_intel_uncore.c
@@ -1547,7 +1547,6 @@ void nhmex_rbox_alter_er(struct intel_uncore_box *box, struct perf_event *event)
{
struct hw_perf_event *hwc = &event->hw;
struct hw_perf_event_extra *reg1 = &hwc->extra_reg;
- int port;

/* adjust the main event selector and extra register index */
if (reg1->idx % 2) {
@@ -1559,7 +1558,6 @@ void nhmex_rbox_alter_er(struct intel_uncore_box *box, struct perf_event *event)
}

/* adjust extra register config */
- port = reg1->idx / 6 + box->pmu->pmu_idx * 4;
switch (reg1->idx % 6) {
case 2:
/* shift the 8~15 bits to the 0~7 bits */


2012-10-24 12:59:43

by [email protected]

[permalink] [raw]
Subject: [tip:perf/urgent] perf/x86: Remove unused variable in nhmex_rbox_alter_er()

Commit-ID: 64dfab8e83644902ad2fd559a56c411b47e3ef3c
Gitweb: http://git.kernel.org/tip/64dfab8e83644902ad2fd559a56c411b47e3ef3c
Author: Wei Yongjun <[email protected]>
AuthorDate: Mon, 22 Oct 2012 16:51:38 +0800
Committer: Ingo Molnar <[email protected]>
CommitDate: Wed, 24 Oct 2012 12:51:40 +0200

perf/x86: Remove unused variable in nhmex_rbox_alter_er()

The variable port is initialized but never used
otherwise, so remove the unused variable.

dpatch engine is used to auto generate this patch.
(https://github.com/weiyj/dpatch)

Signed-off-by: Wei Yongjun <[email protected]>
Cc: Yan, Zheng <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Link: http://lkml.kernel.org/r/CAPgLHd8NZkYSkZm22FpZxiEh6HcA0q-V%3D29vdnheiDhgrJZ%[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
---
arch/x86/kernel/cpu/perf_event_intel_uncore.c | 2 --
1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/arch/x86/kernel/cpu/perf_event_intel_uncore.c b/arch/x86/kernel/cpu/perf_event_intel_uncore.c
index 6f87477..3cf3d97 100644
--- a/arch/x86/kernel/cpu/perf_event_intel_uncore.c
+++ b/arch/x86/kernel/cpu/perf_event_intel_uncore.c
@@ -1558,7 +1558,6 @@ void nhmex_rbox_alter_er(struct intel_uncore_box *box, struct perf_event *event)
{
struct hw_perf_event *hwc = &event->hw;
struct hw_perf_event_extra *reg1 = &hwc->extra_reg;
- int port;

/* adjust the main event selector and extra register index */
if (reg1->idx % 2) {
@@ -1570,7 +1569,6 @@ void nhmex_rbox_alter_er(struct intel_uncore_box *box, struct perf_event *event)
}

/* adjust extra register config */
- port = reg1->idx / 6 + box->pmu->pmu_idx * 4;
switch (reg1->idx % 6) {
case 2:
/* shift the 8~15 bits to the 0~7 bits */