uml: formatting fixes around os_{read_write}_file callers

2007-05-07 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=dc764e5087bceeb26714bb7975b711062b39d804
Commit: dc764e5087bceeb26714bb7975b711062b39d804
Parent: fda83a99b2b49016b9d7ed562745969db25c4ef9
Author: Jeff Dike <[EMAIL PROTECTED]>
AuthorDate: Sun May 6 14:51:41 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Mon May 7 12:13:03 2007 -0700

uml: formatting fixes around os_{read_write}_file callers

Formatting fixes ahead of renaming os_{read_write}_file_k to
os_{read_write}_file and fixing all the callers.

Signed-off-by: Jeff Dike <[EMAIL PROTECTED]>
Cc: Paolo 'Blaisorblade' Giarrusso <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 arch/um/drivers/chan_user.c |   11 
 arch/um/drivers/cow_sys.h   |   17 ++
 arch/um/drivers/ubd_kern.c  |  124 +-
 arch/um/kernel/initrd.c |   32 +--
 arch/um/kernel/smp.c|   25 +++--
 5 files changed, 89 insertions(+), 120 deletions(-)

diff --git a/arch/um/drivers/chan_user.c b/arch/um/drivers/chan_user.c
index d226f10..a15be17 100644
--- a/arch/um/drivers/chan_user.c
+++ b/arch/um/drivers/chan_user.c
@@ -203,14 +203,3 @@ void register_winch(int fd, struct tty_struct *tty)
}
}
 }
-
-/*
- * Overrides for Emacs so that we follow Linus's tabbing style.
- * Emacs will notice this stuff at the end of the file and automatically
- * adjust the settings for this buffer only.  This must remain at the end
- * of the file.
- * ---
- * Local variables:
- * c-file-style: "linux"
- * End:
- */
diff --git a/arch/um/drivers/cow_sys.h b/arch/um/drivers/cow_sys.h
index 3255583..aa7bef9 100644
--- a/arch/um/drivers/cow_sys.h
+++ b/arch/um/drivers/cow_sys.h
@@ -8,7 +8,7 @@
 
 static inline void *cow_malloc(int size)
 {
-   return(um_kmalloc(size));
+   return um_kmalloc(size);
 }
 
 static inline void cow_free(void *ptr)
@@ -20,29 +20,22 @@ static inline void cow_free(void *ptr)
 
 static inline char *cow_strdup(char *str)
 {
-   return(uml_strdup(str));
+   return uml_strdup(str);
 }
 
 static inline int cow_seek_file(int fd, __u64 offset)
 {
-   return(os_seek_file(fd, offset));
+   return os_seek_file(fd, offset);
 }
 
 static inline int cow_file_size(char *file, unsigned long long *size_out)
 {
-   return(os_file_size(file, size_out));
+   return os_file_size(file, size_out);
 }
 
 static inline int cow_write_file(int fd, void *buf, int size)
 {
-   return(os_write_file_k(fd, buf, size));
+   return os_write_file_k(fd, buf, size);
 }
 
 #endif
-
-/*
- * ---
- * Local variables:
- * c-file-style: "linux"
- * End:
- */
diff --git a/arch/um/drivers/ubd_kern.c b/arch/um/drivers/ubd_kern.c
index 2a00203..614fe25 100644
--- a/arch/um/drivers/ubd_kern.c
+++ b/arch/um/drivers/ubd_kern.c
@@ -89,7 +89,7 @@ static inline int ubd_test_bit(__u64 bit, unsigned char *data)
bits = sizeof(data[0]) * 8;
n = bit / bits;
off = bit % bits;
-   return((data[n] & (1 << off)) != 0);
+   return (data[n] & (1 << off)) != 0;
 }
 
 static inline void ubd_set_bit(__u64 bit, unsigned char *data)
@@ -146,7 +146,7 @@ struct cow {
unsigned long *bitmap;
unsigned long bitmap_len;
int bitmap_offset;
-int data_offset;
+   int data_offset;
 };
 
 #define MAX_SG 64
@@ -174,10 +174,10 @@ struct ubd {
 
 #define DEFAULT_COW { \
.file = NULL, \
-.fd =  -1, \
-.bitmap =  NULL, \
+   .fd =   -1, \
+   .bitmap =   NULL, \
.bitmap_offset =0, \
-.data_offset = 0, \
+   .data_offset =  0, \
 }
 
 #define DEFAULT_UBD { \
@@ -187,9 +187,9 @@ struct ubd {
.size = -1, \
.boot_openflags =   OPEN_FLAGS, \
.openflags =OPEN_FLAGS, \
-.no_cow =   0, \
+   .no_cow =   0, \
.shared =   0, \
-.cow = DEFAULT_COW, \
+   .cow =  DEFAULT_COW, \
.lock = SPIN_LOCK_UNLOCKED, \
.request =  NULL, \
.start_sg = 0, \
@@ -249,7 +249,7 @@ static void make_ide_entries(char *dev_name)
 static int fake_ide_setup(char *str)
 {
fake_ide = 1;
-   return(1);
+   return 1;
 }
 
 __setup("fake_ide", fake_ide_setup);
@@ -267,7 +267,7 @@ static int parse_unit(char **ptr)
if(isdigit(*str)) {
n = simple_strtoul(str, &end,

uml: formatting fixes

2007-05-07 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=a5ed1ffa6c2480cdcf3f0aa945f0b8622fe4e90b
Commit: a5ed1ffa6c2480cdcf3f0aa945f0b8622fe4e90b
Parent: 11100b1dfb6e9444d54d38e822753f59ee42a7e6
Author: Jeff Dike <[EMAIL PROTECTED]>
AuthorDate: Sun May 6 14:50:58 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Mon May 7 12:13:00 2007 -0700

uml: formatting fixes

Formatting fixes -
style violations
whitespace breakage
emacs formatting comment removal

Signed-off-by: Jeff Dike <[EMAIL PROTECTED]>
Cc: Paolo 'Blaisorblade' Giarrusso <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 arch/um/kernel/um_arch.c  |   51 -
 arch/um/os-Linux/main.c   |   11 +
 arch/um/sys-i386/bugs.c   |   54 -
 arch/um/sys-x86_64/bugs.c |   34 ++--
 4 files changed, 67 insertions(+), 83 deletions(-)

diff --git a/arch/um/kernel/um_arch.c b/arch/um/kernel/um_arch.c
index 89c6dba..299d75a 100644
--- a/arch/um/kernel/um_arch.c
+++ b/arch/um/kernel/um_arch.c
@@ -63,8 +63,8 @@ struct cpuinfo_um boot_cpu_data = {
 
 unsigned long thread_saved_pc(struct task_struct *task)
 {
-   return(os_process_pc(CHOOSE_MODE_PROC(thread_pid_tt, thread_pid_skas,
- task)));
+   return os_process_pc(CHOOSE_MODE_PROC(thread_pid_tt, thread_pid_skas,
+ task));
 }
 
 static int show_cpuinfo(struct seq_file *m, void *v)
@@ -86,7 +86,7 @@ static int show_cpuinfo(struct seq_file *m, void *v)
   loops_per_jiffy/(50/HZ),
   (loops_per_jiffy/(5000/HZ)) % 100);
 
-   return(0);
+   return 0;
 }
 
 static void *c_start(struct seq_file *m, loff_t *pos)
@@ -212,12 +212,12 @@ __uml_setup("debug", no_skas_debug_setup,
 #ifdef CONFIG_SMP
 static int __init uml_ncpus_setup(char *line, int *add)
 {
-   if (!sscanf(line, "%d", &ncpus)) {
-   printf("Couldn't parse [%s]\n", line);
-   return -1;
-   }
+   if (!sscanf(line, "%d", &ncpus)) {
+   printf("Couldn't parse [%s]\n", line);
+   return -1;
+   }
 
-   return 0;
+   return 0;
 }
 
 __uml_setup("ncpus=", uml_ncpus_setup,
@@ -234,7 +234,7 @@ static int force_tt = 0;
 static int __init mode_tt_setup(char *line, int *add)
 {
force_tt = 1;
-   return(0);
+   return 0;
 }
 
 #else
@@ -245,7 +245,7 @@ static int __init mode_tt_setup(char *line, int *add)
 static int __init mode_tt_setup(char *line, int *add)
 {
printf("CONFIG_MODE_TT disabled - 'mode=tt' ignored\n");
-   return(0);
+   return 0;
 }
 
 #else
@@ -256,7 +256,7 @@ static int __init mode_tt_setup(char *line, int *add)
 static int __init mode_tt_setup(char *line, int *add)
 {
printf("CONFIG_MODE_SKAS disabled - 'mode=tt' redundant\n");
-   return(0);
+   return 0;
 }
 
 #endif
@@ -274,16 +274,15 @@ int mode_tt = DEFAULT_TT;
 
 static int __init Usage(char *line, int *add)
 {
-   const char **p;
+   const char **p;
 
printf(usage_string, init_utsname()->release);
-   p = &__uml_help_start;
-   while (p < &__uml_help_end) {
-   printf("%s", *p);
-   p++;
-   }
+   p = &__uml_help_start;
+   while (p < &__uml_help_end) {
+   printf("%s", *p);
+   p++;
+   }
exit(0);
-
return 0;
 }
 
@@ -379,8 +378,8 @@ int __init linux_main(int argc, char **argv)
  set_task_sizes_skas, &task_size);
 
/*
-* Setting up handlers to 'sig_info' struct
-*/
+* Setting up handlers to 'sig_info' struct
+*/
os_fill_handlinfo(handlinfo_kern);
 
brk_start = (unsigned long) sbrk(0);
@@ -407,7 +406,7 @@ int __init linux_main(int argc, char **argv)
argv1_begin = argv[1];
argv1_end = &argv[1][strlen(argv[1])];
 #endif
-  
+
highmem = 0;
iomem_size = (iomem_size + PAGE_SIZE - 1) & PAGE_MASK;
max_physmem = get_kmem_end() - uml_physmem - iomem_size - MIN_VMALLOC;
@@ -449,12 +448,12 @@ int __init linux_main(int argc, char **argv)
printf("Kernel virtual memory size shrunk to %lu bytes\n",
   virtmem_size);
 
-   uml_postsetup();
+   uml_postsetup();
 
task_protections((unsigned long) &init_thread_info);
os_flush_stdout();
 
-   return(CHOOSE_MODE(start_uml_tt(), start_uml_skas()));
+