summaryrefslogtreecommitdiff
path: root/arch/um/os-Linux/irq.c
diff options
context:
space:
mode:
authorJeff Dike <jdike@addtoit.com>2008-02-05 09:31:02 +0300
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-05 20:44:29 +0300
commitfee64d3c153f1d5c28f91214b4d0db54d3f1fe0a (patch)
tree5a846181005cdb4513d8284c4b1f036afaa78ff8 /arch/um/os-Linux/irq.c
parent260c0cb886c304b760835b6033bf876a7701eb91 (diff)
downloadlinux-fee64d3c153f1d5c28f91214b4d0db54d3f1fe0a.tar.xz
uml: syle fixes in arch/um/os-Linux
Style fixes in arch/um/os-Linux/irq.c and arch/um/os-Linux/sigio.c: Updated copyrights trimmed includes added severity indicators to printks CodingStyle fixes turned an bunch of panics into printks call some libc functions directly instead of going through the os_* wrappers 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/os-Linux/irq.c')
-rw-r--r--arch/um/os-Linux/irq.c27
1 files changed, 13 insertions, 14 deletions
diff --git a/arch/um/os-Linux/irq.c b/arch/um/os-Linux/irq.c
index a26e0662aa12..430866ca1ce4 100644
--- a/arch/um/os-Linux/irq.c
+++ b/arch/um/os-Linux/irq.c
@@ -1,22 +1,19 @@
/*
- * Copyright (C) 2000, 2001, 2002 Jeff Dike (jdike@karaya.com)
+ * Copyright (C) 2000 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
* Licensed under the GPL
*/
#include <stdlib.h>
-#include <unistd.h>
#include <errno.h>
+#include <poll.h>
#include <signal.h>
#include <string.h>
-#include <sys/poll.h>
-#include <sys/types.h>
-#include <sys/time.h>
-#include "user.h"
-#include "process.h"
-#include "sigio.h"
#include "irq_user.h"
+#include "kern_constants.h"
#include "os.h"
+#include "process.h"
#include "um_malloc.h"
+#include "user.h"
/*
* Locked by irq_lock in arch/um/kernel/irq.c. Changed by os_create_pollfd
@@ -35,7 +32,7 @@ int os_waiting_for_events(struct irq_fd *active_fds)
if (n < 0) {
err = -errno;
if (errno != EINTR)
- printk("sigio_handler: os_waiting_for_events:"
+ printk(UM_KERN_ERR "os_waiting_for_events:"
" poll returned %d, errno = %d\n", n, errno);
return err;
}
@@ -94,24 +91,26 @@ void os_free_irq_by_cb(int (*test)(struct irq_fd *, void *), void *arg,
struct irq_fd *old_fd = *prev;
if ((pollfds[i].fd != -1) &&
(pollfds[i].fd != (*prev)->fd)) {
- printk("os_free_irq_by_cb - mismatch between "
- "active_fds and pollfds, fd %d vs %d\n",
+ printk(UM_KERN_ERR "os_free_irq_by_cb - "
+ "mismatch between active_fds and "
+ "pollfds, fd %d vs %d\n",
(*prev)->fd, pollfds[i].fd);
goto out;
}
pollfds_num--;
- /* This moves the *whole* array after pollfds[i]
+ /*
+ * This moves the *whole* array after pollfds[i]
* (though it doesn't spot as such)!
*/
memmove(&pollfds[i], &pollfds[i + 1],
(pollfds_num - i) * sizeof(pollfds[0]));
- if(*last_irq_ptr2 == &old_fd->next)
+ if (*last_irq_ptr2 == &old_fd->next)
*last_irq_ptr2 = prev;
*prev = (*prev)->next;
- if(old_fd->type == IRQ_WRITE)
+ if (old_fd->type == IRQ_WRITE)
ignore_sigio_fd(old_fd->fd);
kfree(old_fd);
continue;