From 1f8896a35b00540a46f29db811cb68c976dbefb4 Mon Sep 17 00:00:00 2001 From: Amir Vajid Date: Thu, 7 May 2020 11:39:51 -0700 Subject: [PATCH] PM / devfreq: bw_hwmon: remove unused variable The bw_hwmon variable undo_over_req_mbps is never used. Remove it to clean up the code. Change-Id: Ifb81052c30cdb79d2c9d8dcda56b3cc2a58b8ec7 Signed-off-by: Amir Vajid --- drivers/devfreq/governor_bw_hwmon.c | 6 ------ drivers/devfreq/governor_bw_hwmon.h | 1 - 2 files changed, 7 deletions(-) diff --git a/drivers/devfreq/governor_bw_hwmon.c b/drivers/devfreq/governor_bw_hwmon.c index 665de8557804..3f9892cbc5c4 100644 --- a/drivers/devfreq/governor_bw_hwmon.c +++ b/drivers/devfreq/governor_bw_hwmon.c @@ -409,7 +409,6 @@ static unsigned long get_bw_and_set_irq(struct hwmon_node *node, hw->up_wake_mbps = (max(MIN_MBPS, req_mbps) * (100 + node->up_thres)) / 100; hw->down_wake_mbps = 0; - hw->undo_over_req_mbps = 0; thres = mbps_to_bytes(max(MIN_MBPS, req_mbps / 2), node->sample_ms); } else { @@ -422,10 +421,6 @@ static unsigned long get_bw_and_set_irq(struct hwmon_node *node, */ hw->up_wake_mbps = (req_mbps * (100 + node->up_thres)) / 100; hw->down_wake_mbps = (meas_mbps * node->down_thres) / 100; - if (node->wake == UP_WAKE) - hw->undo_over_req_mbps = min(req_mbps, meas_mbps_zone); - else - hw->undo_over_req_mbps = 0; thres = mbps_to_bytes(meas_mbps, node->sample_ms); } @@ -545,7 +540,6 @@ static int start_monitor(struct devfreq *df, bool init) mbps = (df->previous_freq * node->io_percent) / 100; hw->up_wake_mbps = mbps; hw->down_wake_mbps = MIN_MBPS; - hw->undo_over_req_mbps = 0; ret = hw->start_hwmon(hw, mbps); } else { ret = hw->resume_hwmon(hw); diff --git a/drivers/devfreq/governor_bw_hwmon.h b/drivers/devfreq/governor_bw_hwmon.h index 8cde9ce4c265..c88fa1d0ab8f 100644 --- a/drivers/devfreq/governor_bw_hwmon.h +++ b/drivers/devfreq/governor_bw_hwmon.h @@ -52,7 +52,6 @@ struct bw_hwmon { struct device_node *of_node; struct devfreq_governor *gov; unsigned long up_wake_mbps; - unsigned long undo_over_req_mbps; unsigned long down_wake_mbps; unsigned int down_cnt; struct devfreq *df;