* [PATCH] posix-cpu-timers: fix two trivial comments
@ 2019-10-21 7:44 Yi Wang
2019-10-23 12:50 ` [tip: timers/urgent] posix-cpu-timers: Fix " tip-bot2 for Yi Wang
0 siblings, 1 reply; 2+ messages in thread
From: Yi Wang @ 2019-10-21 7:44 UTC (permalink / raw)
To: tglx; +Cc: linux-kernel, xue.zhihong, wang.yi59, up2wing, wang.liang82
Commit b7be4ef1365d ("posix-cpu-timers: Switch thread group sampling to
array") and commit 001f7971433a ("posix-cpu-timers: Make expiry checks
array based") made some modification on parameters of function
thread_group_sample_cputime() and task_cputimers_expired(), but forgot
to modify the comment.
This patch can fix this.
Signed-off-by: Yi Wang <wang.yi59@zte.com.cn>
---
kernel/time/posix-cpu-timers.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/time/posix-cpu-timers.c b/kernel/time/posix-cpu-timers.c
index 92a4319..617b919 100644
--- a/kernel/time/posix-cpu-timers.c
+++ b/kernel/time/posix-cpu-timers.c
@@ -266,7 +266,7 @@ static void update_gt_cputime(struct task_cputime_atomic *cputime_atomic,
/**
* thread_group_sample_cputime - Sample cputime for a given task
* @tsk: Task for which cputime needs to be started
- * @iimes: Storage for time samples
+ * @samples: Storage for time samples
*
* Called from sys_getitimer() to calculate the expiry time of an active
* timer. That means group cputime accounting is already active. Called
@@ -1031,7 +1031,7 @@ static void posix_cpu_timer_rearm(struct k_itimer *timer)
/**
* task_cputimers_expired - Check whether posix CPU timers are expired
*
- * @samples: Array of current samples for the CPUCLOCK clocks
+ * @sample: Array of current samples for the CPUCLOCK clocks
* @pct: Pointer to a posix_cputimers container
*
* Returns true if any member of @samples is greater than the corresponding
--
1.8.3.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* [tip: timers/urgent] posix-cpu-timers: Fix two trivial comments
2019-10-21 7:44 [PATCH] posix-cpu-timers: fix two trivial comments Yi Wang
@ 2019-10-23 12:50 ` tip-bot2 for Yi Wang
0 siblings, 0 replies; 2+ messages in thread
From: tip-bot2 for Yi Wang @ 2019-10-23 12:50 UTC (permalink / raw)
To: linux-tip-commits
Cc: Yi Wang, Thomas Gleixner, Ingo Molnar, Borislav Petkov, linux-kernel
The following commit has been merged into the timers/urgent branch of tip:
Commit-ID: 7f2cbcbcafbca5360efbd175b3320852b8f7c637
Gitweb: https://git.kernel.org/tip/7f2cbcbcafbca5360efbd175b3320852b8f7c637
Author: Yi Wang <wang.yi59@zte.com.cn>
AuthorDate: Mon, 21 Oct 2019 15:44:12 +08:00
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitterDate: Wed, 23 Oct 2019 14:48:24 +02:00
posix-cpu-timers: Fix two trivial comments
Recent changes modified the function arguments of
thread_group_sample_cputime() and task_cputimers_expired(), but forgot to
update the comments. Fix it up.
[ tglx: Changed the argument name of task_cputimers_expired() as the pointer
points to an array of samples. ]
Fixes: b7be4ef1365d ("posix-cpu-timers: Switch thread group sampling to array")
Fixes: 001f7971433a ("posix-cpu-timers: Make expiry checks array based")
Signed-off-by: Yi Wang <wang.yi59@zte.com.cn>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lkml.kernel.org/r/1571643852-21848-1-git-send-email-wang.yi59@zte.com.cn
---
kernel/time/posix-cpu-timers.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/kernel/time/posix-cpu-timers.c b/kernel/time/posix-cpu-timers.c
index 92a4319..42d512f 100644
--- a/kernel/time/posix-cpu-timers.c
+++ b/kernel/time/posix-cpu-timers.c
@@ -266,7 +266,7 @@ static void update_gt_cputime(struct task_cputime_atomic *cputime_atomic,
/**
* thread_group_sample_cputime - Sample cputime for a given task
* @tsk: Task for which cputime needs to be started
- * @iimes: Storage for time samples
+ * @samples: Storage for time samples
*
* Called from sys_getitimer() to calculate the expiry time of an active
* timer. That means group cputime accounting is already active. Called
@@ -1038,12 +1038,12 @@ unlock:
* member of @pct->bases[CLK].nextevt. False otherwise
*/
static inline bool
-task_cputimers_expired(const u64 *sample, struct posix_cputimers *pct)
+task_cputimers_expired(const u64 *samples, struct posix_cputimers *pct)
{
int i;
for (i = 0; i < CPUCLOCK_MAX; i++) {
- if (sample[i] >= pct->bases[i].nextevt)
+ if (samples[i] >= pct->bases[i].nextevt)
return true;
}
return false;
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-10-23 12:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-21 7:44 [PATCH] posix-cpu-timers: fix two trivial comments Yi Wang
2019-10-23 12:50 ` [tip: timers/urgent] posix-cpu-timers: Fix " tip-bot2 for Yi Wang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®