aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um/drivers/mconsole_kern.c
diff options
context:
space:
mode:
authorJeff Dike <jdike@addtoit.com>2006-01-06 03:18:50 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-06 11:33:45 -0500
commitd50084a2991f3d9490d5c0f3af72e6fe1515a493 (patch)
tree051d6c46ddab1ee47db40252cdad4cbbe0a04f5b /arch/um/drivers/mconsole_kern.c
parent1b57e9c27882a908f180d4daf72ee12c6f137178 (diff)
[PATCH] uml: Formatting changes
This patch makes a bunch of non-functional changes - return(foo); becomes return foo; some statements are broken across lines for readability some trailing whitespace is cleaned up open_one_chan took four arguments, three of which could be deduced from the first. Accordingly, they were eliminated. some examples of "} else {" had a newline added some whitespace cleanup in the indentation lines_init got some control flow cleanup some long lines were broken removed another emacs-specific C formatting comment Signed-off-by: Jeff Dike <jdike@addtoit.com> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/um/drivers/mconsole_kern.c')
-rw-r--r--arch/um/drivers/mconsole_kern.c25
1 files changed, 12 insertions, 13 deletions
diff --git a/arch/um/drivers/mconsole_kern.c b/arch/um/drivers/mconsole_kern.c
index b36786410453..355866af5e0b 100644
--- a/arch/um/drivers/mconsole_kern.c
+++ b/arch/um/drivers/mconsole_kern.c
@@ -34,7 +34,7 @@
34#include "irq_kern.h" 34#include "irq_kern.h"
35#include "choose-mode.h" 35#include "choose-mode.h"
36 36
37static int do_unlink_socket(struct notifier_block *notifier, 37static int do_unlink_socket(struct notifier_block *notifier,
38 unsigned long what, void *data) 38 unsigned long what, void *data)
39{ 39{
40 return(mconsole_unlink_socket()); 40 return(mconsole_unlink_socket());
@@ -46,7 +46,7 @@ static struct notifier_block reboot_notifier = {
46 .priority = 0, 46 .priority = 0,
47}; 47};
48 48
49/* Safe without explicit locking for now. Tasklets provide their own 49/* Safe without explicit locking for now. Tasklets provide their own
50 * locking, and the interrupt handler is safe because it can't interrupt 50 * locking, and the interrupt handler is safe because it can't interrupt
51 * itself and it can only happen on CPU 0. 51 * itself and it can only happen on CPU 0.
52 */ 52 */
@@ -60,7 +60,7 @@ static void mc_work_proc(void *unused)
60 60
61 while(!list_empty(&mc_requests)){ 61 while(!list_empty(&mc_requests)){
62 local_save_flags(flags); 62 local_save_flags(flags);
63 req = list_entry(mc_requests.next, struct mconsole_entry, 63 req = list_entry(mc_requests.next, struct mconsole_entry,
64 list); 64 list);
65 list_del(&req->list); 65 list_del(&req->list);
66 local_irq_restore(flags); 66 local_irq_restore(flags);
@@ -103,8 +103,8 @@ void mconsole_version(struct mc_request *req)
103{ 103{
104 char version[256]; 104 char version[256];
105 105
106 sprintf(version, "%s %s %s %s %s", system_utsname.sysname, 106 sprintf(version, "%s %s %s %s %s", system_utsname.sysname,
107 system_utsname.nodename, system_utsname.release, 107 system_utsname.nodename, system_utsname.release,
108 system_utsname.version, system_utsname.machine); 108 system_utsname.version, system_utsname.machine);
109 mconsole_reply(req, version, 0, 0); 109 mconsole_reply(req, version, 0, 0);
110} 110}
@@ -348,7 +348,7 @@ static struct mc_device *mconsole_find_dev(char *name)
348 348
349#define CONFIG_BUF_SIZE 64 349#define CONFIG_BUF_SIZE 64
350 350
351static void mconsole_get_config(int (*get_config)(char *, char *, int, 351static void mconsole_get_config(int (*get_config)(char *, char *, int,
352 char **), 352 char **),
353 struct mc_request *req, char *name) 353 struct mc_request *req, char *name)
354{ 354{
@@ -389,7 +389,6 @@ static void mconsole_get_config(int (*get_config)(char *, char *, int,
389 out: 389 out:
390 if(buf != default_buf) 390 if(buf != default_buf)
391 kfree(buf); 391 kfree(buf);
392
393} 392}
394 393
395void mconsole_config(struct mc_request *req) 394void mconsole_config(struct mc_request *req)
@@ -420,7 +419,7 @@ void mconsole_config(struct mc_request *req)
420 419
421void mconsole_remove(struct mc_request *req) 420void mconsole_remove(struct mc_request *req)
422{ 421{
423 struct mc_device *dev; 422 struct mc_device *dev;
424 char *ptr = req->request.data, *err_msg = ""; 423 char *ptr = req->request.data, *err_msg = "";
425 char error[256]; 424 char error[256];
426 int err, start, end, n; 425 int err, start, end, n;
@@ -534,7 +533,7 @@ void mconsole_stack(struct mc_request *req)
534/* Changed by mconsole_setup, which is __setup, and called before SMP is 533/* Changed by mconsole_setup, which is __setup, and called before SMP is
535 * active. 534 * active.
536 */ 535 */
537static char *notify_socket = NULL; 536static char *notify_socket = NULL;
538 537
539int mconsole_init(void) 538int mconsole_init(void)
540{ 539{
@@ -566,13 +565,13 @@ int mconsole_init(void)
566 notify_socket = kstrdup(notify_socket, GFP_KERNEL); 565 notify_socket = kstrdup(notify_socket, GFP_KERNEL);
567 if(notify_socket != NULL) 566 if(notify_socket != NULL)
568 mconsole_notify(notify_socket, MCONSOLE_SOCKET, 567 mconsole_notify(notify_socket, MCONSOLE_SOCKET,
569 mconsole_socket_name, 568 mconsole_socket_name,
570 strlen(mconsole_socket_name) + 1); 569 strlen(mconsole_socket_name) + 1);
571 else printk(KERN_ERR "mconsole_setup failed to strdup " 570 else printk(KERN_ERR "mconsole_setup failed to strdup "
572 "string\n"); 571 "string\n");
573 } 572 }
574 573
575 printk("mconsole (version %d) initialized on %s\n", 574 printk("mconsole (version %d) initialized on %s\n",
576 MCONSOLE_VERSION, mconsole_socket_name); 575 MCONSOLE_VERSION, mconsole_socket_name);
577 return(0); 576 return(0);
578} 577}
@@ -585,7 +584,7 @@ static int write_proc_mconsole(struct file *file, const char __user *buffer,
585 char *buf; 584 char *buf;
586 585
587 buf = kmalloc(count + 1, GFP_KERNEL); 586 buf = kmalloc(count + 1, GFP_KERNEL);
588 if(buf == NULL) 587 if(buf == NULL)
589 return(-ENOMEM); 588 return(-ENOMEM);
590 589
591 if(copy_from_user(buf, buffer, count)){ 590 if(copy_from_user(buf, buffer, count)){
@@ -661,7 +660,7 @@ static int notify_panic(struct notifier_block *self, unsigned long unused1,
661 660
662 if(notify_socket == NULL) return(0); 661 if(notify_socket == NULL) return(0);
663 662
664 mconsole_notify(notify_socket, MCONSOLE_PANIC, message, 663 mconsole_notify(notify_socket, MCONSOLE_PANIC, message,
665 strlen(message) + 1); 664 strlen(message) + 1);
666 return(0); 665 return(0);
667} 666}