summaryrefslogtreecommitdiffstats
path: root/arch/um/kernel/time.c
diff options
context:
space:
mode:
authorJeff Dike <jdike@addtoit.com>2007-10-16 01:27:00 -0700
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-16 09:43:05 -0700
commitba180fd437156f7fd8cfb2fdd021d949eeef08d6 (patch)
treeb9f38b9cdd7a5b1aacf00341d1948314663c5871 /arch/um/kernel/time.c
parent77bf4400319db9d2a8af6b00c2be6faa0f3d07cb (diff)
downloadblackbird-op-linux-ba180fd437156f7fd8cfb2fdd021d949eeef08d6.tar.gz
blackbird-op-linux-ba180fd437156f7fd8cfb2fdd021d949eeef08d6.zip
uml: style fixes pass 3
Formatting changes in the files which have been changed in the course of folding foo_skas functions into their callers. These include: copyright updates header file trimming style fixes adding severity to printks These changes should be entirely non-functional. Signed-off-by: Jeff Dike <jdike@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/um/kernel/time.c')
-rw-r--r--arch/um/kernel/time.c32
1 files changed, 12 insertions, 20 deletions
diff --git a/arch/um/kernel/time.c b/arch/um/kernel/time.c
index 90e24e2dbeaa..4fc8c2586b70 100644
--- a/arch/um/kernel/time.c
+++ b/arch/um/kernel/time.c
@@ -1,28 +1,19 @@
/*
- * Copyright (C) 2000 Jeff Dike (jdike@karaya.com)
+ * Copyright (C) 2000 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
* Licensed under the GPL
*/
-#include "linux/kernel.h"
-#include "linux/module.h"
-#include "linux/unistd.h"
-#include "linux/stddef.h"
-#include "linux/spinlock.h"
-#include "linux/time.h"
-#include "linux/sched.h"
#include "linux/interrupt.h"
-#include "linux/init.h"
-#include "linux/delay.h"
-#include "linux/hrtimer.h"
+#include "linux/jiffies.h"
+#include "linux/threads.h"
#include "asm/irq.h"
#include "asm/param.h"
-#include "asm/current.h"
#include "kern_util.h"
#include "os.h"
int hz(void)
{
- return(HZ);
+ return HZ;
}
/*
@@ -43,7 +34,7 @@ void timer_irq(struct uml_pt_regs *regs)
unsigned long long ticks = 0;
#ifdef CONFIG_UML_REAL_TIME_CLOCK
int c = cpu();
- if(prev_nsecs[c]){
+ if (prev_nsecs[c]) {
/* We've had 1 tick */
unsigned long long nsecs = os_nsecs();
@@ -51,7 +42,7 @@ void timer_irq(struct uml_pt_regs *regs)
prev_nsecs[c] = nsecs;
/* Protect against the host clock being set backwards */
- if(delta[c] < 0)
+ if (delta[c] < 0)
delta[c] = 0;
ticks += (delta[c] * HZ) / BILLION;
@@ -61,7 +52,7 @@ void timer_irq(struct uml_pt_regs *regs)
#else
ticks = 1;
#endif
- while(ticks > 0){
+ while (ticks > 0) {
do_IRQ(TIMER_IRQ, regs);
ticks--;
}
@@ -112,12 +103,12 @@ static void register_timer(void)
int err;
err = request_irq(TIMER_IRQ, um_timer, IRQF_DISABLED, "timer", NULL);
- if(err != 0)
+ if (err != 0)
printk(KERN_ERR "register_timer : request_irq failed - "
"errno = %d\n", -err);
err = set_interval(1);
- if(err != 0)
+ if (err != 0)
printk(KERN_ERR "register_timer : set_interval failed - "
"errno = %d\n", -err);
}
@@ -144,7 +135,8 @@ void do_gettimeofday(struct timeval *tv)
xtime.tv_nsec;
#endif
tv->tv_sec = nsecs / NSEC_PER_SEC;
- /* Careful about calculations here - this was originally done as
+ /*
+ * Careful about calculations here - this was originally done as
* (nsecs - tv->tv_sec * NSEC_PER_SEC) / NSEC_PER_USEC
* which gave bogus (> 1000000) values. Dunno why, suspect gcc
* (4.0.0) miscompiled it, or there's a subtle 64/32-bit conversion
@@ -176,7 +168,7 @@ int do_settimeofday(struct timespec *tv)
void timer_handler(int sig, struct uml_pt_regs *regs)
{
- if(current_thread->cpu == 0)
+ if (current_thread->cpu == 0)
timer_irq(regs);
local_irq_disable();
irq_enter();
OpenPOWER on IntegriCloud