hulk inclusion category: cleanup bugzilla: https://gitee.com/openeuler/kernel/issues/ID29QH -------------------------------- After merging the commit 59874d0ded9c, the prev_val variable is no longer referenced, so it can be removed. Fixes: 59874d0ded9c ("arm64/mpam: Fix MBWU monitor overflow handling") Signed-off-by: Zeng Heng <zengheng4@huawei.com> --- drivers/platform/mpam/mpam_devices.c | 8 -------- drivers/platform/mpam/mpam_internal.h | 3 --- 2 files changed, 11 deletions(-) diff --git a/drivers/platform/mpam/mpam_devices.c b/drivers/platform/mpam/mpam_devices.c index 387fc444267c..fab2dba70c9f 100644 --- a/drivers/platform/mpam/mpam_devices.c +++ b/drivers/platform/mpam/mpam_devices.c @@ -937,7 +937,6 @@ static void write_msmon_ctl_flt_vals(struct mon_read *m, u32 ctl_val, u32 flt_val) { struct mpam_msc *msc = m->ris->msc; - struct msmon_mbwu_state *mbwu_state; /* * Write the ctl_val with the enable bit cleared, reset the counter, @@ -960,11 +959,6 @@ static void write_msmon_ctl_flt_vals(struct mon_read *m, u32 ctl_val, mpam_write_monsel_reg(msc, MBWU, 0); mpam_write_monsel_reg(msc, CFG_MBWU_CTL, ctl_val|MSMON_CFG_x_CTL_EN); - - mbwu_state = &m->ris->mbwu_state[m->ctx->mon]; - if (mbwu_state) - mbwu_state->prev_val = 0; - break; default: return; @@ -1070,7 +1064,6 @@ static void __ris_msmon_read(void *arg) mpam_csu_hisi_need_retrigger(ris, m->err == -EBUSY)) { write_msmon_ctl_flt_vals(m, ctl_val, flt_val); if (mbwu_state) { - mbwu_state->prev_val = 0; mbwu_state->correction = 0; mbwu_overflow = false; } @@ -1132,7 +1125,6 @@ static void __ris_msmon_read(void *arg) if (mbwu_overflow) overflow_val = mpam_msmon_overflow_val(ris); - mbwu_state->prev_val = now; mbwu_state->correction += overflow_val; /* Include bandwidth consumed before the last hardware reset */ diff --git a/drivers/platform/mpam/mpam_internal.h b/drivers/platform/mpam/mpam_internal.h index 7fe4ac636952..5f60e0cc4eeb 100644 --- a/drivers/platform/mpam/mpam_internal.h +++ b/drivers/platform/mpam/mpam_internal.h @@ -224,9 +224,6 @@ struct msmon_mbwu_state { bool reset_on_next_read; struct mon_cfg cfg; - /* The value last read from the hardware. Used to detect overflow. */ - u64 prev_val; - /* * The value to add to the new reading to account for power management, * and shifts to trigger the overflow interrupt. -- 2.25.1