mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
[S390] cputime: add sparse checking and cleanup
Make cputime_t and cputime64_t nocast to enable sparse checking to detect incorrect use of cputime. Drop the cputime macros for simple scalar operations. The conversion macros are still needed. Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
This commit is contained in:
parent
55b02d2f44
commit
648616343c
23 changed files with 321 additions and 427 deletions
|
@ -1023,8 +1023,8 @@ void mm_init_owner(struct mm_struct *mm, struct task_struct *p)
|
|||
*/
|
||||
static void posix_cpu_timers_init(struct task_struct *tsk)
|
||||
{
|
||||
tsk->cputime_expires.prof_exp = cputime_zero;
|
||||
tsk->cputime_expires.virt_exp = cputime_zero;
|
||||
tsk->cputime_expires.prof_exp = 0;
|
||||
tsk->cputime_expires.virt_exp = 0;
|
||||
tsk->cputime_expires.sched_exp = 0;
|
||||
INIT_LIST_HEAD(&tsk->cpu_timers[0]);
|
||||
INIT_LIST_HEAD(&tsk->cpu_timers[1]);
|
||||
|
@ -1132,14 +1132,10 @@ static struct task_struct *copy_process(unsigned long clone_flags,
|
|||
|
||||
init_sigpending(&p->pending);
|
||||
|
||||
p->utime = cputime_zero;
|
||||
p->stime = cputime_zero;
|
||||
p->gtime = cputime_zero;
|
||||
p->utimescaled = cputime_zero;
|
||||
p->stimescaled = cputime_zero;
|
||||
p->utime = p->stime = p->gtime = 0;
|
||||
p->utimescaled = p->stimescaled = 0;
|
||||
#ifndef CONFIG_VIRT_CPU_ACCOUNTING
|
||||
p->prev_utime = cputime_zero;
|
||||
p->prev_stime = cputime_zero;
|
||||
p->prev_utime = p->prev_stime = 0;
|
||||
#endif
|
||||
#if defined(SPLIT_RSS_COUNTING)
|
||||
memset(&p->rss_stat, 0, sizeof(p->rss_stat));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue