linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kamil Konieczny <k.konieczny@samsung.com>
To: k.konieczny@samsung.com
Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
	Chanwoo Choi <cw00.choi@samsung.com>,
	Kamil Konieczny <k.konieczny@partner.samsung.com>,
	Krzysztof Kozlowski <krzk@kernel.org>,
	Kyungmin Park <kyungmin.park@samsung.com>,
	linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org,
	Marek Szyprowski <m.szyprowski@samsung.com>,
	MyungJoo Ham <myungjoo.ham@samsung.com>
Subject: [PATCH 4/7] devfreq: change var name used in time statistics
Date: Wed, 13 Nov 2019 10:13:33 +0100	[thread overview]
Message-ID: <20191113091336.5218-5-k.konieczny@samsung.com> (raw)
In-Reply-To: <20191113091336.5218-1-k.konieczny@samsung.com>

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@samsung.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


  parent reply	other threads:[~2019-11-13  9:14 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20191113091350eucas1p2545166dfa1dc3b85aee375e353d7a604@eucas1p2.samsung.com>
2019-11-13  9:13 ` [PATCH 0/7] devfreq: improve devfreq statistics counting Kamil Konieczny
     [not found]   ` <CGME20191113091351eucas1p24afdb94f868b6a7a52b43e81462bb674@eucas1p2.samsung.com>
2019-11-13  9:13     ` [PATCH 1/7] devfreq: change time stats to 64-bit Kamil Konieczny
2019-11-13  9:44       ` Chanwoo Choi
     [not found]   ` <CGME20191113091351eucas1p2f83c221ce94fdea695775e00d5215458@eucas1p2.samsung.com>
2019-11-13  9:13     ` [PATCH 2/7] devfreq: protect devfreq stats data with spinlock Kamil Konieczny
2019-11-13  9:47       ` Chanwoo Choi
     [not found]   ` <CGME20191113091352eucas1p2c30c8a73a8362aff872e3cd9312eb24b@eucas1p2.samsung.com>
2019-11-13  9:13     ` [PATCH 3/7] devfreq: add clearing transitions stats in sysfs Kamil Konieczny
2019-11-13  9:41       ` Chanwoo Choi
2019-11-14 18:23         ` Bartlomiej Zolnierkiewicz
2019-11-15  2:47           ` Chanwoo Choi
2019-11-15 14:35             ` Kamil Konieczny
     [not found]   ` <CGME20191113091352eucas1p1825d815661c1a8377449f511c65ea230@eucas1p1.samsung.com>
2019-11-13  9:13     ` Kamil Konieczny [this message]
2019-11-13  9:35       ` [PATCH 4/7] devfreq: change var name used in time statistics Chanwoo Choi
     [not found]   ` <CGME20191113091353eucas1p283be3173c7a9ea726b4767f9cb113f0f@eucas1p2.samsung.com>
2019-11-13  9:13     ` [PATCH 5/7] devfreq: move transition statistics to devfreq profile structure Kamil Konieczny
2019-11-14  2:02       ` Chanwoo Choi
2019-11-14 18:10         ` Bartlomiej Zolnierkiewicz
2019-11-15  5:14           ` Chanwoo Choi
2019-11-15 14:39         ` Kamil Konieczny
     [not found]   ` <CGME20191113091353eucas1p2d9f82697e6ec44c0e38225988227c73c@eucas1p2.samsung.com>
2019-11-13  9:13     ` [PATCH 6/7] devfreq: move transition statistics allocations to set_freq_stats() Kamil Konieczny
     [not found]   ` <CGME20191113091354eucas1p265de4985d167814f5080fbdf21b75a0a@eucas1p2.samsung.com>
2019-11-13  9:13     ` [PATCH 7/7] devfreq: move statistics to separate struct Kamil Konieczny
2019-11-14  1:52       ` Chanwoo Choi
2019-11-14 18:01         ` Bartlomiej Zolnierkiewicz
2019-11-15  3:25           ` Chanwoo Choi
2019-11-15  6:21             ` Chanwoo Choi
2019-11-15 12:40               ` Bartlomiej Zolnierkiewicz
2019-12-16 13:01                 ` Lukasz Luba
2019-12-17  0:07                   ` Chanwoo Choi
2019-12-17  9:10                     ` Lukasz Luba
2020-01-15 15:56                   ` Bartlomiej Zolnierkiewicz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191113091336.5218-5-k.konieczny@samsung.com \
    --to=k.konieczny@samsung.com \
    --cc=b.zolnierkie@samsung.com \
    --cc=cw00.choi@samsung.com \
    --cc=k.konieczny@partner.samsung.com \
    --cc=krzk@kernel.org \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=myungjoo.ham@samsung.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).