Skip to contentSkip to conversation

make kernel/sched.c:account_guest_time() static

PATCH Applied Adrian Bunk 2 participants 4 messages Oct 24, 2007

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 make kernel/sched.c:account_guest_time() static

account_guest_time() can become static.

---
2779ceb45e015ce32451d20c3724a8ad2cd26462

kernel/sched.c +1 -1
index 2810e56..c306a4a 100644
@@ -3336,7 +3336,7 @@ void account_user_time(struct task_struct *p, cputime_t cputime)
  * @p: the process that the cpu time gets accounted to
  * @cputime: the cpu time spent in virtual machine since the last update
  */
-void account_guest_time(struct task_struct *p, cputime_t cputime)
+static void account_guest_time(struct task_struct *p, cputime_t cputime)
 {
 	cputime64_t tmp;
 	struct cpu_usage_stat *cpustat = &kstat_this_cpu.cpustat;
Applied
#1 lore raw
Quoted 1 line · Adrian Bunk

account_guest_time() can become static.

thanks, applied.

btw., how about adding your 'check static functions' scripts to the kernel, via a "make checkstatic" pass or something like that? That way people could check this for themselves and could avoid letting them into the kernel.

Ingo

#2 lore raw
Quoted 11 lines · Ingo Molnar
Quoted 1 line · Adrian Bunk

account_guest_time() can become static.

thanks, applied.

btw., how about adding your 'check static functions' scripts to the kernel, via a "make checkstatic" pass or something like that? That way people could check this for themselves and could avoid letting them into the kernel.

It is not my script, it was written by Keith Owens.

It is already available as "make namespacecheck" since kernel 2.6.9.

And yes, it is already documented besides checkstack in Documentation/SubmitChecklist point 10.

Quoted 1 line

Ingo

cu
Adrian

Signature · 4 lines
       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed
#3 lore raw
Quoted 8 lines · Adrian Bunk
Quoted 4 lines

btw., how about adding your 'check static functions' scripts to the kernel, via a "make checkstatic" pass or something like that? That way people could check this for themselves and could avoid letting them into the kernel.

It is not my script, it was written by Keith Owens.

It is already available as "make namespacecheck" since kernel 2.6.9.

heh, *blush* :-) I'll start using it :)

Ingo