lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 13 Nov 2019 10:13:33 +0100
From:   Kamil Konieczny <k.konieczny@...sung.com>
To:     k.konieczny@...sung.com
Cc:     Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>,
        Chanwoo Choi <cw00.choi@...sung.com>,
        Kamil Konieczny <k.konieczny@...tner.samsung.com>,
        Krzysztof Kozlowski <krzk@...nel.org>,
        Kyungmin Park <kyungmin.park@...sung.com>,
        linux-kernel@...r.kernel.org, linux-pm@...r.kernel.org,
        Marek Szyprowski <m.szyprowski@...sung.com>,
        MyungJoo Ham <myungjoo.ham@...sung.com>
Subject: [PATCH 4/7] devfreq: change var name used in time statistics

Change var name used in time statistics from last_stat_updated to
last_time. This will make it shorter and similar to cpufreq_stats.

Signed-off-by: Kamil Konieczny <k.konieczny@...sung.com>
---
 drivers/devfreq/devfreq.c | 12 ++++++------
 include/linux/devfreq.h   |  4 ++--
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c
index 0a88055d1362..6e5a17f4c92c 100644
--- a/drivers/devfreq/devfreq.c
+++ b/drivers/devfreq/devfreq.c
@@ -165,7 +165,7 @@ int devfreq_update_status(struct devfreq *devfreq, unsigned long freq)
 	/* Immediately exit if previous_freq is not initialized yet. */
 	if (!devfreq->previous_freq) {
 		spin_lock(&devfreq->stats_lock);
-		devfreq->last_stat_updated = cur_time;
+		devfreq->last_time = cur_time;
 		spin_unlock(&devfreq->stats_lock);
 		return 0;
 	}
@@ -179,7 +179,7 @@ int devfreq_update_status(struct devfreq *devfreq, unsigned long freq)
 	}
 
 	devfreq->time_in_state[prev_lev] +=
-			 cur_time - devfreq->last_stat_updated;
+			 cur_time - devfreq->last_time;
 	lev = devfreq_get_freq_level(devfreq, freq);
 	if (lev < 0) {
 		ret = lev;
@@ -193,7 +193,7 @@ int devfreq_update_status(struct devfreq *devfreq, unsigned long freq)
 	}
 
 out:
-	devfreq->last_stat_updated = cur_time;
+	devfreq->last_time = cur_time;
 	spin_unlock(&devfreq->stats_lock);
 	return ret;
 }
@@ -485,7 +485,7 @@ void devfreq_monitor_resume(struct devfreq *devfreq)
 			msecs_to_jiffies(devfreq->profile->polling_ms));
 
 	spin_lock(&devfreq->stats_lock);
-	devfreq->last_stat_updated = get_jiffies_64();
+	devfreq->last_time = get_jiffies_64();
 	spin_unlock(&devfreq->stats_lock);
 	devfreq->stop_polling = false;
 
@@ -714,7 +714,7 @@ struct devfreq *devfreq_add_device(struct device *dev,
 		goto err_devfreq;
 	}
 
-	devfreq->last_stat_updated = get_jiffies_64();
+	devfreq->last_time = get_jiffies_64();
 	spin_lock_init(&devfreq->stats_lock);
 
 	srcu_init_notifier_head(&devfreq->transition_notifier_list);
@@ -1452,7 +1452,7 @@ static void defvreq_stats_clear_table(struct devfreq *devfreq)
 	spin_lock(&devfreq->stats_lock);
 	memset(devfreq->time_in_state, 0, count * sizeof(u64));
 	memset(devfreq->trans_table, 0, count * count * sizeof(int));
-	devfreq->last_stat_updated = get_jiffies_64();
+	devfreq->last_time = get_jiffies_64();
 	devfreq->total_trans = 0;
 	spin_unlock(&devfreq->stats_lock);
 }
diff --git a/include/linux/devfreq.h b/include/linux/devfreq.h
index a344e0be99f3..2ddf25993f7d 100644
--- a/include/linux/devfreq.h
+++ b/include/linux/devfreq.h
@@ -134,7 +134,7 @@ struct devfreq_dev_profile {
  * @total_trans:	Number of devfreq transitions
  * @trans_table:	Statistics of devfreq transitions
  * @time_in_state:	Statistics of devfreq states
- * @last_stat_updated:	The last time stat updated
+ * @last_time:		The last time stats were updated
  * @stats_lock:		Lock protecting trans_table, time_in_state, last_time
  *			and total_trans used for statistics
  * @transition_notifier_list: list head of DEVFREQ_TRANSITION_NOTIFIER notifier
@@ -177,7 +177,7 @@ struct devfreq {
 	unsigned int total_trans;
 	unsigned int *trans_table;
 	u64 *time_in_state;
-	unsigned long long last_stat_updated;
+	unsigned long long last_time;
 	spinlock_t stats_lock;
 
 	struct srcu_notifier_head transition_notifier_list;
-- 
2.24.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ