diff --git a/[refs] b/[refs] index df7696f1bd27..86e13cba71c9 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 8b2cc917a02936c3ea7d8da46801c7b7b6233093 +refs/heads/master: 2688905e6a9b3647bf7b452cb0ff2bdb166bd8fe diff --git a/trunk/MAINTAINERS b/trunk/MAINTAINERS index f5583dc7ea39..abe27871ad6a 100644 --- a/trunk/MAINTAINERS +++ b/trunk/MAINTAINERS @@ -2112,10 +2112,12 @@ L: netdev@vger.kernel.org S: Maintained INTEL ETHERNET DRIVERS (e100/e1000/e1000e/igb/ixgb/ixgbe) -P: Jeff Kirsher -M: jeffrey.t.kirsher@intel.com +P: Auke Kok +M: auke-jan.h.kok@intel.com P: Jesse Brandeburg M: jesse.brandeburg@intel.com +P: Jeff Kirsher +M: jeffrey.t.kirsher@intel.com P: Bruce Allan M: bruce.w.allan@intel.com P: John Ronciak diff --git a/trunk/arch/cris/kernel/sys_cris.c b/trunk/arch/cris/kernel/sys_cris.c index d124066e1728..8b9984197edc 100644 --- a/trunk/arch/cris/kernel/sys_cris.c +++ b/trunk/arch/cris/kernel/sys_cris.c @@ -40,11 +40,8 @@ asmlinkage int sys_pipe(unsigned long __user * fildes) error = do_pipe(fd); unlock_kernel(); if (!error) { - if (copy_to_user(fildes, fd, 2*sizeof(int))) { - sys_close(fd[0]); - sys_close(fd[1]); + if (copy_to_user(fildes, fd, 2*sizeof(int))) error = -EFAULT; - } } return error; } diff --git a/trunk/arch/m32r/kernel/sys_m32r.c b/trunk/arch/m32r/kernel/sys_m32r.c index 319c79720b8a..6d7a80fdad48 100644 --- a/trunk/arch/m32r/kernel/sys_m32r.c +++ b/trunk/arch/m32r/kernel/sys_m32r.c @@ -90,11 +90,8 @@ sys_pipe(unsigned long r0, unsigned long r1, unsigned long r2, error = do_pipe(fd); if (!error) { - if (copy_to_user((void __user *)r0, fd, 2*sizeof(int))) { - sys_close(fd[0]); - sys_close(fd[1]); + if (copy_to_user((void __user *)r0, fd, 2*sizeof(int))) error = -EFAULT; - } } return error; } diff --git a/trunk/arch/s390/kernel/entry.S b/trunk/arch/s390/kernel/entry.S index bdbb3bcd78a5..708cf9cf9a35 100644 --- a/trunk/arch/s390/kernel/entry.S +++ b/trunk/arch/s390/kernel/entry.S @@ -279,8 +279,6 @@ sysc_do_restart: st %r2,SP_R2(%r15) # store return value (change R2 on stack) sysc_return: - tm SP_PSW+1(%r15),0x01 # returning to user ? - bno BASED(sysc_restore) tm __TI_flags+3(%r9),_TIF_WORK_SVC bnz BASED(sysc_work) # there is work to do (signals etc.) sysc_restore: @@ -312,6 +310,8 @@ sysc_work_loop: # One of the work bits is on. Find out which one. # sysc_work: + tm SP_PSW+1(%r15),0x01 # returning to user ? + bno BASED(sysc_restore) tm __TI_flags+3(%r9),_TIF_MCCK_PENDING bo BASED(sysc_mcck_pending) tm __TI_flags+3(%r9),_TIF_NEED_RESCHED @@ -602,12 +602,6 @@ io_no_vtime: la %r2,SP_PTREGS(%r15) # address of register-save area basr %r14,%r1 # branch to standard irq handler io_return: - tm SP_PSW+1(%r15),0x01 # returning to user ? -#ifdef CONFIG_PREEMPT - bno BASED(io_preempt) # no -> check for preemptive scheduling -#else - bno BASED(io_restore) # no-> skip resched & signal -#endif tm __TI_flags+3(%r9),_TIF_WORK_INT bnz BASED(io_work) # there is work to do (signals etc.) io_restore: @@ -629,10 +623,18 @@ io_restore_trace_psw: .long 0, io_restore_trace + 0x80000000 #endif -#ifdef CONFIG_PREEMPT -io_preempt: +# +# switch to kernel stack, then check the TIF bits +# +io_work: + tm SP_PSW+1(%r15),0x01 # returning to user ? +#ifndef CONFIG_PREEMPT + bno BASED(io_restore) # no-> skip resched & signal +#else + bnz BASED(io_work_user) # no -> check for preemptive scheduling + # check for preemptive scheduling icm %r0,15,__TI_precount(%r9) - bnz BASED(io_restore) + bnz BASED(io_restore) # preemption disabled l %r1,SP_R15(%r15) s %r1,BASED(.Lc_spsize) mvc SP_PTREGS(__PT_SIZE,%r1),SP_PTREGS(%r15) @@ -646,10 +648,7 @@ io_resume_loop: br %r1 # call schedule #endif -# -# switch to kernel stack, then check the TIF bits -# -io_work: +io_work_user: l %r1,__LC_KERNEL_STACK s %r1,BASED(.Lc_spsize) mvc SP_PTREGS(__PT_SIZE,%r1),SP_PTREGS(%r15) diff --git a/trunk/arch/s390/kernel/entry64.S b/trunk/arch/s390/kernel/entry64.S index 5a4a7bcd2bba..a57909d63149 100644 --- a/trunk/arch/s390/kernel/entry64.S +++ b/trunk/arch/s390/kernel/entry64.S @@ -271,8 +271,6 @@ sysc_noemu: stg %r2,SP_R2(%r15) # store return value (change R2 on stack) sysc_return: - tm SP_PSW+1(%r15),0x01 # returning to user ? - jno sysc_restore tm __TI_flags+7(%r9),_TIF_WORK_SVC jnz sysc_work # there is work to do (signals etc.) sysc_restore: @@ -304,6 +302,8 @@ sysc_work_loop: # One of the work bits is on. Find out which one. # sysc_work: + tm SP_PSW+1(%r15),0x01 # returning to user ? + jno sysc_restore tm __TI_flags+7(%r9),_TIF_MCCK_PENDING jo sysc_mcck_pending tm __TI_flags+7(%r9),_TIF_NEED_RESCHED @@ -585,12 +585,6 @@ io_no_vtime: la %r2,SP_PTREGS(%r15) # address of register-save area brasl %r14,do_IRQ # call standard irq handler io_return: - tm SP_PSW+1(%r15),0x01 # returning to user ? -#ifdef CONFIG_PREEMPT - jno io_preempt # no -> check for preemptive scheduling -#else - jno io_restore # no-> skip resched & signal -#endif tm __TI_flags+7(%r9),_TIF_WORK_INT jnz io_work # there is work to do (signals etc.) io_restore: @@ -612,10 +606,18 @@ io_restore_trace_psw: .quad 0, io_restore_trace #endif -#ifdef CONFIG_PREEMPT -io_preempt: +# +# switch to kernel stack, then check TIF bits +# +io_work: + tm SP_PSW+1(%r15),0x01 # returning to user ? +#ifndef CONFIG_PREEMPT + jno io_restore # no-> skip resched & signal +#else + jnz io_work_user # yes -> do resched & signal + # check for preemptive scheduling icm %r0,15,__TI_precount(%r9) - jnz io_restore + jnz io_restore # preemption is disabled # switch to kernel stack lg %r1,SP_R15(%r15) aghi %r1,-SP_SIZE @@ -629,10 +631,7 @@ io_resume_loop: jg preempt_schedule_irq #endif -# -# switch to kernel stack, then check TIF bits -# -io_work: +io_work_user: lg %r1,__LC_KERNEL_STACK aghi %r1,-SP_SIZE mvc SP_PTREGS(__PT_SIZE,%r1),SP_PTREGS(%r15) diff --git a/trunk/arch/sparc/kernel/process.c b/trunk/arch/sparc/kernel/process.c index 36431f377dee..e7f35198ae34 100644 --- a/trunk/arch/sparc/kernel/process.c +++ b/trunk/arch/sparc/kernel/process.c @@ -419,26 +419,14 @@ asmlinkage int sparc_do_fork(unsigned long clone_flags, unsigned long stack_size) { unsigned long parent_tid_ptr, child_tid_ptr; - unsigned long orig_i1 = regs->u_regs[UREG_I1]; - long ret; parent_tid_ptr = regs->u_regs[UREG_I2]; child_tid_ptr = regs->u_regs[UREG_I4]; - ret = do_fork(clone_flags, stack_start, - regs, stack_size, - (int __user *) parent_tid_ptr, - (int __user *) child_tid_ptr); - - /* If we get an error and potentially restart the system - * call, we're screwed because copy_thread() clobbered - * the parent's %o1. So detect that case and restore it - * here. - */ - if ((unsigned long)ret >= -ERESTART_RESTARTBLOCK) - regs->u_regs[UREG_I1] = orig_i1; - - return ret; + return do_fork(clone_flags, stack_start, + regs, stack_size, + (int __user *) parent_tid_ptr, + (int __user *) child_tid_ptr); } /* Copy a Sparc thread. The fork() return value conventions diff --git a/trunk/arch/sparc/kernel/sys_sparc.c b/trunk/arch/sparc/kernel/sys_sparc.c index e995491c4436..f188b5dc9fd0 100644 --- a/trunk/arch/sparc/kernel/sys_sparc.c +++ b/trunk/arch/sparc/kernel/sys_sparc.c @@ -223,7 +223,8 @@ int sparc_mmap_check(unsigned long addr, unsigned long len, unsigned long flags) { if (ARCH_SUN4C_SUN4 && (len > 0x20000000 || - (addr < 0xe0000000 && addr + len > 0x20000000))) + ((flags & MAP_FIXED) && + addr < 0xe0000000 && addr + len > 0x20000000))) return -EINVAL; /* See asm-sparc/uaccess.h */ diff --git a/trunk/arch/sparc64/kernel/process.c b/trunk/arch/sparc64/kernel/process.c index 4129c0449856..500ac6d483a0 100644 --- a/trunk/arch/sparc64/kernel/process.c +++ b/trunk/arch/sparc64/kernel/process.c @@ -503,8 +503,6 @@ asmlinkage long sparc_do_fork(unsigned long clone_flags, unsigned long stack_size) { int __user *parent_tid_ptr, *child_tid_ptr; - unsigned long orig_i1 = regs->u_regs[UREG_I1]; - long ret; #ifdef CONFIG_COMPAT if (test_thread_flag(TIF_32BIT)) { @@ -517,19 +515,9 @@ asmlinkage long sparc_do_fork(unsigned long clone_flags, child_tid_ptr = (int __user *) regs->u_regs[UREG_I4]; } - ret = do_fork(clone_flags, stack_start, - regs, stack_size, - parent_tid_ptr, child_tid_ptr); - - /* If we get an error and potentially restart the system - * call, we're screwed because copy_thread() clobbered - * the parent's %o1. So detect that case and restore it - * here. - */ - if ((unsigned long)ret >= -ERESTART_RESTARTBLOCK) - regs->u_regs[UREG_I1] = orig_i1; - - return ret; + return do_fork(clone_flags, stack_start, + regs, stack_size, + parent_tid_ptr, child_tid_ptr); } /* Copy a Sparc thread. The fork() return value conventions diff --git a/trunk/arch/sparc64/kernel/smp.c b/trunk/arch/sparc64/kernel/smp.c index 0d6403a630ac..3aba47624df4 100644 --- a/trunk/arch/sparc64/kernel/smp.c +++ b/trunk/arch/sparc64/kernel/smp.c @@ -865,14 +865,21 @@ void smp_call_function_client(int irq, struct pt_regs *regs) void *info = call_data->info; clear_softint(1 << irq); + + irq_enter(); + + if (!call_data->wait) { + /* let initiator proceed after getting data */ + atomic_inc(&call_data->finished); + } + + func(info); + + irq_exit(); + if (call_data->wait) { /* let initiator proceed only after completion */ - func(info); atomic_inc(&call_data->finished); - } else { - /* let initiator proceed after getting data */ - atomic_inc(&call_data->finished); - func(info); } } @@ -1034,7 +1041,9 @@ void smp_receive_signal(int cpu) void smp_receive_signal_client(int irq, struct pt_regs *regs) { + irq_enter(); clear_softint(1 << irq); + irq_exit(); } void smp_new_mmu_context_version_client(int irq, struct pt_regs *regs) @@ -1042,6 +1051,8 @@ void smp_new_mmu_context_version_client(int irq, struct pt_regs *regs) struct mm_struct *mm; unsigned long flags; + irq_enter(); + clear_softint(1 << irq); /* See if we need to allocate a new TLB context because @@ -1061,6 +1072,8 @@ void smp_new_mmu_context_version_client(int irq, struct pt_regs *regs) load_secondary_context(mm); __flush_tlb_mm(CTX_HWBITS(mm->context), SECONDARY_CONTEXT); + + irq_exit(); } void smp_new_mmu_context_version(void) @@ -1226,6 +1239,8 @@ void smp_penguin_jailcell(int irq, struct pt_regs *regs) { clear_softint(1 << irq); + irq_enter(); + preempt_disable(); __asm__ __volatile__("flushw"); @@ -1238,6 +1253,8 @@ void smp_penguin_jailcell(int irq, struct pt_regs *regs) prom_world(0); preempt_enable(); + + irq_exit(); } /* /proc/profile writes can call this, don't __init it please. */ diff --git a/trunk/arch/sparc64/kernel/sys_sparc.c b/trunk/arch/sparc64/kernel/sys_sparc.c index 0dbc941f130e..8d4761f15fa9 100644 --- a/trunk/arch/sparc64/kernel/sys_sparc.c +++ b/trunk/arch/sparc64/kernel/sys_sparc.c @@ -549,13 +549,13 @@ int sparc64_mmap_check(unsigned long addr, unsigned long len, if (len >= STACK_TOP32) return -EINVAL; - if (addr > STACK_TOP32 - len) + if ((flags & MAP_FIXED) && addr > STACK_TOP32 - len) return -EINVAL; } else { if (len >= VA_EXCLUDE_START) return -EINVAL; - if (invalid_64bit_range(addr, len)) + if ((flags & MAP_FIXED) && invalid_64bit_range(addr, len)) return -EINVAL; } diff --git a/trunk/arch/sparc64/kernel/sys_sparc32.c b/trunk/arch/sparc64/kernel/sys_sparc32.c index 1aa4288125f2..161ce4710fe7 100644 --- a/trunk/arch/sparc64/kernel/sys_sparc32.c +++ b/trunk/arch/sparc64/kernel/sys_sparc32.c @@ -236,6 +236,13 @@ asmlinkage long sys32_getegid16(void) /* 32-bit timeval and related flotsam. */ +static long get_tv32(struct timeval *o, struct compat_timeval __user *i) +{ + return (!access_ok(VERIFY_READ, i, sizeof(*i)) || + (__get_user(o->tv_sec, &i->tv_sec) | + __get_user(o->tv_usec, &i->tv_usec))); +} + static inline long put_tv32(struct compat_timeval __user *o, struct timeval *i) { return (!access_ok(VERIFY_WRITE, o, sizeof(*o)) || @@ -750,6 +757,30 @@ asmlinkage long sys32_settimeofday(struct compat_timeval __user *tv, return do_sys_settimeofday(tv ? &kts : NULL, tz ? &ktz : NULL); } +asmlinkage long sys32_utimes(char __user *filename, + struct compat_timeval __user *tvs) +{ + struct timespec tv[2]; + + if (tvs) { + struct timeval ktvs[2]; + if (get_tv32(&ktvs[0], tvs) || + get_tv32(&ktvs[1], 1+tvs)) + return -EFAULT; + + if (ktvs[0].tv_usec < 0 || ktvs[0].tv_usec >= 1000000 || + ktvs[1].tv_usec < 0 || ktvs[1].tv_usec >= 1000000) + return -EINVAL; + + tv[0].tv_sec = ktvs[0].tv_sec; + tv[0].tv_nsec = 1000 * ktvs[0].tv_usec; + tv[1].tv_sec = ktvs[1].tv_sec; + tv[1].tv_nsec = 1000 * ktvs[1].tv_usec; + } + + return do_utimes(AT_FDCWD, filename, tvs ? tv : NULL, 0); +} + /* These are here just in case some old sparc32 binary calls it. */ asmlinkage long sys32_pause(void) { diff --git a/trunk/arch/sparc64/kernel/systbls.S b/trunk/arch/sparc64/kernel/systbls.S index 8b5282d433c4..a4fef2ba1ae1 100644 --- a/trunk/arch/sparc64/kernel/systbls.S +++ b/trunk/arch/sparc64/kernel/systbls.S @@ -45,7 +45,7 @@ sys_call_table32: /*120*/ .word compat_sys_readv, compat_sys_writev, sys32_settimeofday, sys32_fchown16, sys_fchmod .word sys_nis_syscall, sys32_setreuid16, sys32_setregid16, sys_rename, sys_truncate /*130*/ .word sys_ftruncate, sys_flock, compat_sys_lstat64, sys_nis_syscall, sys_nis_syscall - .word sys_nis_syscall, sys32_mkdir, sys_rmdir, compat_sys_utimes, compat_sys_stat64 + .word sys_nis_syscall, sys32_mkdir, sys_rmdir, sys32_utimes, compat_sys_stat64 /*140*/ .word sys32_sendfile64, sys_nis_syscall, sys32_futex, sys_gettid, compat_sys_getrlimit .word compat_sys_setrlimit, sys_pivot_root, sys32_prctl, sys_pciconfig_read, sys_pciconfig_write /*150*/ .word sys_nis_syscall, sys_inotify_init, sys_inotify_add_watch, sys_poll, sys_getdents64 diff --git a/trunk/arch/sparc64/mm/init.c b/trunk/arch/sparc64/mm/init.c index ec3e2c72302a..4cad0b32b0af 100644 --- a/trunk/arch/sparc64/mm/init.c +++ b/trunk/arch/sparc64/mm/init.c @@ -771,9 +771,6 @@ static void __init find_ramdisk(unsigned long phys_base) initrd_end = ramdisk_image + sparc_ramdisk_size; lmb_reserve(initrd_start, initrd_end); - - initrd_start += PAGE_OFFSET; - initrd_end += PAGE_OFFSET; } #endif } @@ -2365,3 +2362,16 @@ void __flush_tlb_all(void) __asm__ __volatile__("wrpr %0, 0, %%pstate" : : "r" (pstate)); } + +#ifdef CONFIG_MEMORY_HOTPLUG + +void online_page(struct page *page) +{ + ClearPageReserved(page); + init_page_count(page); + __free_page(page); + totalram_pages++; + num_physpages++; +} + +#endif /* CONFIG_MEMORY_HOTPLUG */ diff --git a/trunk/arch/um/drivers/line.c b/trunk/arch/um/drivers/line.c index 5047490fc299..10b86e1cc659 100644 --- a/trunk/arch/um/drivers/line.c +++ b/trunk/arch/um/drivers/line.c @@ -191,9 +191,9 @@ void line_flush_chars(struct tty_struct *tty) line_flush_buffer(tty); } -int line_put_char(struct tty_struct *tty, unsigned char ch) +void line_put_char(struct tty_struct *tty, unsigned char ch) { - return line_write(tty, &ch, sizeof(ch)); + line_write(tty, &ch, sizeof(ch)); } int line_write(struct tty_struct *tty, const unsigned char *buf, int len) diff --git a/trunk/arch/um/include/line.h b/trunk/arch/um/include/line.h index 979b73e6352d..1223f2c844b4 100644 --- a/trunk/arch/um/include/line.h +++ b/trunk/arch/um/include/line.h @@ -71,7 +71,7 @@ extern int line_setup(struct line *lines, unsigned int sizeof_lines, char *init, char **error_out); extern int line_write(struct tty_struct *tty, const unsigned char *buf, int len); -extern int line_put_char(struct tty_struct *tty, unsigned char ch); +extern void line_put_char(struct tty_struct *tty, unsigned char ch); extern void line_set_termios(struct tty_struct *tty, struct ktermios * old); extern int line_chars_in_buffer(struct tty_struct *tty); extern void line_flush_buffer(struct tty_struct *tty); diff --git a/trunk/drivers/accessibility/Kconfig b/trunk/drivers/accessibility/Kconfig index ef3b65bfdd0a..1264c4b98094 100644 --- a/trunk/drivers/accessibility/Kconfig +++ b/trunk/drivers/accessibility/Kconfig @@ -1,17 +1,7 @@ menuconfig ACCESSIBILITY bool "Accessibility support" ---help--- - Accessibility handles all special kinds of hardware devices or - software adapters which help people with disabilities (e.g. - blindness) to use computers. - - That includes braille devices, speech synthesis, keyboard - remapping, etc. - - Say Y here to get to see options for accessibility. - This option alone does not add any kernel code. - - If you say N, all options in this submenu will be skipped and disabled. + Enable a submenu where accessibility items may be enabled. If unsure, say N. diff --git a/trunk/drivers/char/sx.c b/trunk/drivers/char/sx.c index b1a7a8cb65ea..f39f6fd89350 100644 --- a/trunk/drivers/char/sx.c +++ b/trunk/drivers/char/sx.c @@ -970,8 +970,7 @@ static int sx_set_real_termios(void *ptr) sx_write_channel_byte(port, hi_mask, 0x1f); break; default: - printk(KERN_INFO "sx: Invalid wordsize: %u\n", - (unsigned int)CFLAG & CSIZE); + printk(KERN_INFO "sx: Invalid wordsize: %u\n", CFLAG & CSIZE); break; } @@ -998,8 +997,7 @@ static int sx_set_real_termios(void *ptr) set_bit(TTY_HW_COOK_IN, &port->gs.tty->flags); } sx_dprintk(SX_DEBUG_TERMIOS, "iflags: %x(%d) ", - (unsigned int)port->gs.tty->termios->c_iflag, - I_OTHER(port->gs.tty)); + port->gs.tty->termios->c_iflag, I_OTHER(port->gs.tty)); /* Tell line discipline whether we will do output cooking. * If OPOST is set and no other output flags are set then we can do output @@ -1012,8 +1010,7 @@ static int sx_set_real_termios(void *ptr) clear_bit(TTY_HW_COOK_OUT, &port->gs.tty->flags); } sx_dprintk(SX_DEBUG_TERMIOS, "oflags: %x(%d)\n", - (unsigned int)port->gs.tty->termios->c_oflag, - O_OTHER(port->gs.tty)); + port->gs.tty->termios->c_oflag, O_OTHER(port->gs.tty)); /* port->c_dcd = sx_get_CD (port); */ func_exit(); return 0; diff --git a/trunk/drivers/char/vt.c b/trunk/drivers/char/vt.c index fa1ffbf2c621..e458b08139af 100644 --- a/trunk/drivers/char/vt.c +++ b/trunk/drivers/char/vt.c @@ -2742,10 +2742,6 @@ static int con_open(struct tty_struct *tty, struct file *filp) tty->winsize.ws_row = vc_cons[currcons].d->vc_rows; tty->winsize.ws_col = vc_cons[currcons].d->vc_cols; } - if (vc->vc_utf) - tty->termios->c_iflag |= IUTF8; - else - tty->termios->c_iflag &= ~IUTF8; release_console_sem(); vcs_make_sysfs(tty); return ret; @@ -2922,8 +2918,6 @@ int __init vty_init(void) console_driver->minor_start = 1; console_driver->type = TTY_DRIVER_TYPE_CONSOLE; console_driver->init_termios = tty_std_termios; - if (default_utf8) - console_driver->init_termios.c_iflag |= IUTF8; console_driver->flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_RESET_TERMIOS; tty_set_operations(console_driver, &con_ops); if (tty_register_driver(console_driver)) diff --git a/trunk/drivers/md/raid10.c b/trunk/drivers/md/raid10.c index faf3d8912979..5938fa962922 100644 --- a/trunk/drivers/md/raid10.c +++ b/trunk/drivers/md/raid10.c @@ -886,7 +886,7 @@ static int make_request(struct request_queue *q, struct bio * bio) */ raid10_find_phys(conf, r10_bio); retry_write: - blocked_rdev = NULL; + blocked_rdev = 0; rcu_read_lock(); for (i = 0; i < conf->copies; i++) { int d = r10_bio->devs[i].devnum; diff --git a/trunk/drivers/media/video/cx18/cx18-driver.c b/trunk/drivers/media/video/cx18/cx18-driver.c index 3f55d47bc4b9..8f5ed9b4bf83 100644 --- a/trunk/drivers/media/video/cx18/cx18-driver.c +++ b/trunk/drivers/media/video/cx18/cx18-driver.c @@ -613,7 +613,7 @@ static int __devinit cx18_probe(struct pci_dev *dev, } cx = kzalloc(sizeof(struct cx18), GFP_ATOMIC); - if (!cx) { + if (cx == 0) { spin_unlock(&cx18_cards_lock); return -ENOMEM; } diff --git a/trunk/drivers/media/video/saa7134/saa7134-video.c b/trunk/drivers/media/video/saa7134/saa7134-video.c index 48e1a01718ec..a0baf2d0ba7f 100644 --- a/trunk/drivers/media/video/saa7134/saa7134-video.c +++ b/trunk/drivers/media/video/saa7134/saa7134-video.c @@ -1634,7 +1634,7 @@ static int saa7134_s_fmt_overlay(struct file *file, void *priv, struct saa7134_fh *fh = priv; struct saa7134_dev *dev = fh->dev; int err; - unsigned long flags; + unsigned int flags; if (saa7134_no_overlay > 0) { printk(KERN_ERR "V4L2_BUF_TYPE_VIDEO_OVERLAY: no_overlay\n"); diff --git a/trunk/drivers/net/usb/asix.c b/trunk/drivers/net/usb/asix.c index dc6f097062df..6f245cfb6624 100644 --- a/trunk/drivers/net/usb/asix.c +++ b/trunk/drivers/net/usb/asix.c @@ -1380,10 +1380,6 @@ static const struct usb_device_id products [] = { // Buffalo LUA-U2-KTX USB_DEVICE (0x0411, 0x003d), .driver_info = (unsigned long) &ax8817x_info, -}, { - // Buffalo LUA-U2-GT 10/100/1000 - USB_DEVICE (0x0411, 0x006e), - .driver_info = (unsigned long) &ax88178_info, }, { // Sitecom LN-029 "USB 2.0 10/100 Ethernet adapter" USB_DEVICE (0x6189, 0x182d), diff --git a/trunk/drivers/rtc/rtc-ds1511.c b/trunk/drivers/rtc/rtc-ds1511.c index 0f0d27d1c4ca..a83a40b3ebaa 100644 --- a/trunk/drivers/rtc/rtc-ds1511.c +++ b/trunk/drivers/rtc/rtc-ds1511.c @@ -184,7 +184,7 @@ ds1511_wdog_disable(void) static int ds1511_rtc_set_time(struct device *dev, struct rtc_time *rtc_tm) { u8 mon, day, dow, hrs, min, sec, yrs, cen; - unsigned long flags; + unsigned int flags; /* * won't have to change this for a while @@ -247,7 +247,7 @@ static int ds1511_rtc_set_time(struct device *dev, struct rtc_time *rtc_tm) static int ds1511_rtc_read_time(struct device *dev, struct rtc_time *rtc_tm) { unsigned int century; - unsigned long flags; + unsigned int flags; spin_lock_irqsave(&ds1511_lock, flags); rtc_disable_update(); diff --git a/trunk/drivers/sbus/char/bpp.c b/trunk/drivers/sbus/char/bpp.c index b87037ec9805..4fab0c23814c 100644 --- a/trunk/drivers/sbus/char/bpp.c +++ b/trunk/drivers/sbus/char/bpp.c @@ -41,7 +41,7 @@ #define BPP_DELAY 100 static const unsigned BPP_MAJOR = LP_MAJOR; -static const char *bpp_dev_name = "bpp"; +static const char* dev_name = "bpp"; /* When switching from compatibility to a mode where I can read, try the following mode first. */ diff --git a/trunk/drivers/scsi/dpt_i2o.c b/trunk/drivers/scsi/dpt_i2o.c index 8508816f303d..0fb5bf4c43ac 100644 --- a/trunk/drivers/scsi/dpt_i2o.c +++ b/trunk/drivers/scsi/dpt_i2o.c @@ -1967,6 +1967,45 @@ static int adpt_i2o_passthru(adpt_hba* pHba, u32 __user *arg) return rcode; } + +/* + * This routine returns information about the system. This does not effect + * any logic and if the info is wrong - it doesn't matter. + */ + +/* Get all the info we can not get from kernel services */ +static int adpt_system_info(void __user *buffer) +{ + sysInfo_S si; + + memset(&si, 0, sizeof(si)); + + si.osType = OS_LINUX; + si.osMajorVersion = 0; + si.osMinorVersion = 0; + si.osRevision = 0; + si.busType = SI_PCI_BUS; + si.processorFamily = DPTI_sig.dsProcessorFamily; + +#if defined __i386__ + adpt_i386_info(&si); +#elif defined (__ia64__) + adpt_ia64_info(&si); +#elif defined(__sparc__) + adpt_sparc_info(&si); +#elif defined (__alpha__) + adpt_alpha_info(&si); +#else + si.processorType = 0xff ; +#endif + if(copy_to_user(buffer, &si, sizeof(si))){ + printk(KERN_WARNING"dpti: Could not copy buffer TO user\n"); + return -EFAULT; + } + + return 0; +} + #if defined __ia64__ static void adpt_ia64_info(sysInfo_S* si) { @@ -1977,6 +2016,7 @@ static void adpt_ia64_info(sysInfo_S* si) } #endif + #if defined __sparc__ static void adpt_sparc_info(sysInfo_S* si) { @@ -1986,6 +2026,7 @@ static void adpt_sparc_info(sysInfo_S* si) si->processorType = PROC_ULTRASPARC; } #endif + #if defined __alpha__ static void adpt_alpha_info(sysInfo_S* si) { @@ -1997,6 +2038,7 @@ static void adpt_alpha_info(sysInfo_S* si) #endif #if defined __i386__ + static void adpt_i386_info(sysInfo_S* si) { // This is all the info we need for now @@ -2017,45 +2059,9 @@ static void adpt_i386_info(sysInfo_S* si) break; } } -#endif - -/* - * This routine returns information about the system. This does not effect - * any logic and if the info is wrong - it doesn't matter. - */ -/* Get all the info we can not get from kernel services */ -static int adpt_system_info(void __user *buffer) -{ - sysInfo_S si; - - memset(&si, 0, sizeof(si)); - - si.osType = OS_LINUX; - si.osMajorVersion = 0; - si.osMinorVersion = 0; - si.osRevision = 0; - si.busType = SI_PCI_BUS; - si.processorFamily = DPTI_sig.dsProcessorFamily; - -#if defined __i386__ - adpt_i386_info(&si); -#elif defined (__ia64__) - adpt_ia64_info(&si); -#elif defined(__sparc__) - adpt_sparc_info(&si); -#elif defined (__alpha__) - adpt_alpha_info(&si); -#else - si.processorType = 0xff ; #endif - if (copy_to_user(buffer, &si, sizeof(si))){ - printk(KERN_WARNING"dpti: Could not copy buffer TO user\n"); - return -EFAULT; - } - return 0; -} static int adpt_ioctl(struct inode *inode, struct file *file, uint cmd, ulong arg) diff --git a/trunk/drivers/scsi/dpti.h b/trunk/drivers/scsi/dpti.h index 337746d46043..924cd5a51676 100644 --- a/trunk/drivers/scsi/dpti.h +++ b/trunk/drivers/scsi/dpti.h @@ -316,6 +316,19 @@ static int adpt_close(struct inode *inode, struct file *file); static void adpt_delay(int millisec); #endif +#if defined __ia64__ +static void adpt_ia64_info(sysInfo_S* si); +#endif +#if defined __sparc__ +static void adpt_sparc_info(sysInfo_S* si); +#endif +#if defined __alpha__ +static void adpt_sparc_info(sysInfo_S* si); +#endif +#if defined __i386__ +static void adpt_i386_info(sysInfo_S* si); +#endif + #define PRINT_BUFFER_SIZE 512 #define HBA_FLAGS_DBG_FLAGS_MASK 0xffff0000 // Mask for debug flags diff --git a/trunk/drivers/serial/serial_core.c b/trunk/drivers/serial/serial_core.c index eab032733790..1e2b9d826f69 100644 --- a/trunk/drivers/serial/serial_core.c +++ b/trunk/drivers/serial/serial_core.c @@ -556,7 +556,7 @@ static int uart_chars_in_buffer(struct tty_struct *tty) static void uart_flush_buffer(struct tty_struct *tty) { struct uart_state *state = tty->driver_data; - struct uart_port *port; + struct uart_port *port = state->port; unsigned long flags; /* @@ -568,7 +568,6 @@ static void uart_flush_buffer(struct tty_struct *tty) return; } - port = state->port; pr_debug("uart_flush_buffer(%d) called\n", tty->index); spin_lock_irqsave(&port->lock, flags); diff --git a/trunk/drivers/usb/host/Kconfig b/trunk/drivers/usb/host/Kconfig index 1ef6df395e0c..33b467a8352d 100644 --- a/trunk/drivers/usb/host/Kconfig +++ b/trunk/drivers/usb/host/Kconfig @@ -129,7 +129,7 @@ config USB_ISP1760_PCI config USB_ISP1760_OF bool "Support for the OF platform bus" - depends on USB_ISP1760_HCD && PPC_OF + depends on USB_ISP1760_HCD && OF ---help--- Enables support for the device present on the PowerPC OpenFirmware platform bus. diff --git a/trunk/drivers/usb/serial/iuu_phoenix.c b/trunk/drivers/usb/serial/iuu_phoenix.c index a01e987c7d32..8a217648b250 100644 --- a/trunk/drivers/usb/serial/iuu_phoenix.c +++ b/trunk/drivers/usb/serial/iuu_phoenix.c @@ -643,7 +643,7 @@ static void read_buf_callback(struct urb *urb) static int iuu_bulk_write(struct usb_serial_port *port) { struct iuu_private *priv = usb_get_serial_port_data(port); - unsigned long flags; + unsigned int flags; int result; int i; char *buf_ptr = port->write_urb->transfer_buffer; @@ -694,7 +694,7 @@ static void iuu_uart_read_callback(struct urb *urb) { struct usb_serial_port *port = urb->context; struct iuu_private *priv = usb_get_serial_port_data(port); - unsigned long flags; + unsigned int flags; int status; int error = 0; int len = 0; @@ -759,7 +759,7 @@ static int iuu_uart_write(struct usb_serial_port *port, const u8 *buf, int count) { struct iuu_private *priv = usb_get_serial_port_data(port); - unsigned long flags; + unsigned int flags; dbg("%s - enter", __func__); if (count > 256) diff --git a/trunk/drivers/video/bw2.c b/trunk/drivers/video/bw2.c index 79f85dc402d6..275d9dab0c61 100644 --- a/trunk/drivers/video/bw2.c +++ b/trunk/drivers/video/bw2.c @@ -329,7 +329,7 @@ static int __devinit bw2_probe(struct of_device *op, const struct of_device_id * if (!info->screen_base) goto out_unmap_regs; - bw2_blank(FB_BLANK_UNBLANK, info); + bw2_blank(0, info); bw2_init_fix(info, linebytes); diff --git a/trunk/drivers/video/cg3.c b/trunk/drivers/video/cg3.c index e31e26a6bb79..010ea53978f8 100644 --- a/trunk/drivers/video/cg3.c +++ b/trunk/drivers/video/cg3.c @@ -398,7 +398,7 @@ static int __devinit cg3_probe(struct of_device *op, if (!info->screen_base) goto out_unmap_regs; - cg3_blank(FB_BLANK_UNBLANK, info); + cg3_blank(0, info); if (!of_find_property(dp, "width", NULL)) { err = cg3_do_default_mode(par); diff --git a/trunk/drivers/video/cg6.c b/trunk/drivers/video/cg6.c index 8000bccecdc6..fc90db6da65a 100644 --- a/trunk/drivers/video/cg6.c +++ b/trunk/drivers/video/cg6.c @@ -767,7 +767,7 @@ static int __devinit cg6_probe(struct of_device *op, cg6_bt_init(par); cg6_chip_init(info); - cg6_blank(FB_BLANK_UNBLANK, info); + cg6_blank(0, info); if (fb_alloc_cmap(&info->cmap, 256, 0)) goto out_unmap_regs; diff --git a/trunk/drivers/video/ffb.c b/trunk/drivers/video/ffb.c index 0f42a696d176..93dca3e2aa50 100644 --- a/trunk/drivers/video/ffb.c +++ b/trunk/drivers/video/ffb.c @@ -987,7 +987,7 @@ static int __devinit ffb_probe(struct of_device *op, * chosen console, it will have video outputs off in * the DAC. */ - ffb_blank(FB_BLANK_UNBLANK, info); + ffb_blank(0, info); if (fb_alloc_cmap(&info->cmap, 256, 0)) goto out_unmap_dac; diff --git a/trunk/drivers/video/leo.c b/trunk/drivers/video/leo.c index fb129928d5d5..f3160fc29795 100644 --- a/trunk/drivers/video/leo.c +++ b/trunk/drivers/video/leo.c @@ -601,7 +601,7 @@ static int __devinit leo_probe(struct of_device *op, const struct of_device_id * leo_init_wids(info); leo_init_hw(info); - leo_blank(FB_BLANK_UNBLANK, info); + leo_blank(0, info); if (fb_alloc_cmap(&info->cmap, 256, 0)) goto out_unmap_regs; diff --git a/trunk/drivers/video/p9100.c b/trunk/drivers/video/p9100.c index 676ffb06d1c7..c95874fe9076 100644 --- a/trunk/drivers/video/p9100.c +++ b/trunk/drivers/video/p9100.c @@ -295,7 +295,7 @@ static int __devinit p9100_probe(struct of_device *op, const struct of_device_id if (!info->screen_base) goto out_unmap_regs; - p9100_blank(FB_BLANK_UNBLANK, info); + p9100_blank(0, info); if (fb_alloc_cmap(&info->cmap, 256, 0)) goto out_unmap_screen; diff --git a/trunk/drivers/video/tcx.c b/trunk/drivers/video/tcx.c index 44e8c27ed0fc..a71774305772 100644 --- a/trunk/drivers/video/tcx.c +++ b/trunk/drivers/video/tcx.c @@ -84,7 +84,7 @@ struct tcx_tec { struct tcx_thc { u32 thc_rev; - u32 thc_pad0[511]; + u32 thc_pad0[511]; u32 thc_hs; /* hsync timing */ u32 thc_hsdvs; u32 thc_hd; @@ -126,10 +126,10 @@ struct tcx_par { }; /* Reset control plane so that WID is 8-bit plane. */ -static void __tcx_set_control_plane(struct tcx_par *par) +static void __tcx_set_control_plane (struct tcx_par *par) { u32 __iomem *p, *pend; - + if (par->lowdepth) return; @@ -143,8 +143,8 @@ static void __tcx_set_control_plane(struct tcx_par *par) sbus_writel(tmp, p); } } - -static void tcx_reset(struct fb_info *info) + +static void tcx_reset (struct fb_info *info) { struct tcx_par *par = (struct tcx_par *) info->par; unsigned long flags; @@ -365,8 +365,7 @@ static void tcx_unmap_regs(struct of_device *op, struct fb_info *info, info->screen_base, par->fbsize); } -static int __devinit tcx_probe(struct of_device *op, - const struct of_device_id *match) +static int __devinit tcx_init_one(struct of_device *op) { struct device_node *dp = op->node; struct fb_info *info; @@ -489,6 +488,13 @@ static int __devinit tcx_probe(struct of_device *op, return err; } +static int __devinit tcx_probe(struct of_device *dev, const struct of_device_id *match) +{ + struct of_device *op = to_of_device(&dev->dev); + + return tcx_init_one(op); +} + static int __devexit tcx_remove(struct of_device *op) { struct fb_info *info = dev_get_drvdata(&op->dev); diff --git a/trunk/fs/pipe.c b/trunk/fs/pipe.c index ec228bc9f882..3499f9ff6316 100644 --- a/trunk/fs/pipe.c +++ b/trunk/fs/pipe.c @@ -17,7 +17,6 @@ #include #include #include -#include #include #include @@ -1087,11 +1086,8 @@ asmlinkage long __weak sys_pipe(int __user *fildes) error = do_pipe(fd); if (!error) { - if (copy_to_user(fildes, fd, sizeof(fd))) { - sys_close(fd[0]); - sys_close(fd[1]); + if (copy_to_user(fildes, fd, sizeof(fd))) error = -EFAULT; - } } return error; } diff --git a/trunk/kernel/cpuset.c b/trunk/kernel/cpuset.c index 86ea9e34e326..8da627d33804 100644 --- a/trunk/kernel/cpuset.c +++ b/trunk/kernel/cpuset.c @@ -1031,9 +1031,11 @@ int current_cpuset_is_being_rebound(void) return task_cs(current) == cpuset_being_rebound; } -static int update_relax_domain_level(struct cpuset *cs, s64 val) +static int update_relax_domain_level(struct cpuset *cs, char *buf) { - if ((int)val < 0) + int val = simple_strtol(buf, NULL, 10); + + if (val < 0) val = -1; if (val != cs->relax_domain_level) { @@ -1278,6 +1280,9 @@ static ssize_t cpuset_common_file_write(struct cgroup *cont, case FILE_MEMLIST: retval = update_nodemask(cs, buffer); break; + case FILE_SCHED_RELAX_DOMAIN_LEVEL: + retval = update_relax_domain_level(cs, buffer); + break; default: retval = -EINVAL; goto out2; @@ -1343,30 +1348,6 @@ static int cpuset_write_u64(struct cgroup *cgrp, struct cftype *cft, u64 val) return retval; } -static int cpuset_write_s64(struct cgroup *cgrp, struct cftype *cft, s64 val) -{ - int retval = 0; - struct cpuset *cs = cgroup_cs(cgrp); - cpuset_filetype_t type = cft->private; - - cgroup_lock(); - - if (cgroup_is_removed(cgrp)) { - cgroup_unlock(); - return -ENODEV; - } - switch (type) { - case FILE_SCHED_RELAX_DOMAIN_LEVEL: - retval = update_relax_domain_level(cs, val); - break; - default: - retval = -EINVAL; - break; - } - cgroup_unlock(); - return retval; -} - /* * These ascii lists should be read in a single call, by using a user * buffer large enough to hold the entire map. If read in smaller @@ -1425,6 +1406,9 @@ static ssize_t cpuset_common_file_read(struct cgroup *cont, case FILE_MEMLIST: s += cpuset_sprintf_memlist(s, cs); break; + case FILE_SCHED_RELAX_DOMAIN_LEVEL: + s += sprintf(s, "%d", cs->relax_domain_level); + break; default: retval = -EINVAL; goto out; @@ -1465,18 +1449,6 @@ static u64 cpuset_read_u64(struct cgroup *cont, struct cftype *cft) } } -static s64 cpuset_read_s64(struct cgroup *cont, struct cftype *cft) -{ - struct cpuset *cs = cgroup_cs(cont); - cpuset_filetype_t type = cft->private; - switch (type) { - case FILE_SCHED_RELAX_DOMAIN_LEVEL: - return cs->relax_domain_level; - default: - BUG(); - } -} - /* * for the common functions, 'private' gives the type of file @@ -1527,8 +1499,8 @@ static struct cftype files[] = { { .name = "sched_relax_domain_level", - .read_s64 = cpuset_read_s64, - .write_s64 = cpuset_write_s64, + .read_u64 = cpuset_read_u64, + .write_u64 = cpuset_write_u64, .private = FILE_SCHED_RELAX_DOMAIN_LEVEL, }, diff --git a/trunk/mm/slub.c b/trunk/mm/slub.c index a505a828ef41..d379b782fc83 100644 --- a/trunk/mm/slub.c +++ b/trunk/mm/slub.c @@ -3762,7 +3762,7 @@ static int any_slab_objects(struct kmem_cache *s) if (!n) continue; - if (atomic_long_read(&n->total_objects)) + if (atomic_read(&n->total_objects)) return 1; } return 0; diff --git a/trunk/net/mac80211/rc80211_pid_debugfs.c b/trunk/net/mac80211/rc80211_pid_debugfs.c index ff5c380f3c13..ae75d4178739 100644 --- a/trunk/net/mac80211/rc80211_pid_debugfs.c +++ b/trunk/net/mac80211/rc80211_pid_debugfs.c @@ -85,7 +85,7 @@ static int rate_control_pid_events_open(struct inode *inode, struct file *file) struct rc_pid_sta_info *sinfo = inode->i_private; struct rc_pid_event_buffer *events = &sinfo->events; struct rc_pid_events_file_info *file_info; - unsigned long status; + unsigned int status; /* Allocate a state struct */ file_info = kmalloc(sizeof(*file_info), GFP_KERNEL); @@ -135,7 +135,7 @@ static ssize_t rate_control_pid_events_read(struct file *file, char __user *buf, char pb[RC_PID_PRINT_BUF_SIZE]; int ret; int p; - unsigned long status; + unsigned int status; /* Check if there is something to read. */ if (events->next_entry == file_info->next_entry) { diff --git a/trunk/sound/oss/kahlua.c b/trunk/sound/oss/kahlua.c index eb9bc365530d..dfe670f12e67 100644 --- a/trunk/sound/oss/kahlua.c +++ b/trunk/sound/oss/kahlua.c @@ -67,7 +67,7 @@ static int __devinit probe_one(struct pci_dev *pdev, const struct pci_device_id return 1; mem = ioremap(base, 128); - if (!mem) + if(mem == 0UL) return 1; map = readw(mem + 0x18); /* Read the SMI enables */ iounmap(mem);