26 Jul, 2008

1 commit


21 Jul, 2008

2 commits


30 Apr, 2008

2 commits

  • __FUNCTION__ is gcc-specific, use __func__

    Signed-off-by: Harvey Harrison
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Harvey Harrison
     
  • Rename defines to be in RIO* namespace to not to collide with other defines in
    tree. This broke (as akpm correctly pointed out) some allmodconfig builds,
    e.g. on ppc:

    In file included from drivers/char/rio/rio_linux.c:81:
    drivers/char/rio/cirrus.h:202:1: warning: "COMPLETE" redefined
    In file included from include/net/netns/ipv4.h:8,
    from include/net/net_namespace.h:13,
    from include/linux/seq_file.h:7,
    from include/asm/machdep.h:12,
    from include/asm/pci.h:17,
    from include/linux/pci.h:951,
    from drivers/char/rio/rio_linux.c:50:
    include/net/inet_frag.h:28:1: warning: this is the location of the previous definition

    Signed-off-by: Jiri Slaby
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jiri Slaby
     

29 Apr, 2008

1 commit


19 Apr, 2008

1 commit


03 Apr, 2008

1 commit


15 Oct, 2007

1 commit


20 Jul, 2007

1 commit

  • Transform some calls to kmalloc/memset to a single kzalloc (or kcalloc).

    Here is a short excerpt of the semantic patch performing
    this transformation:

    @@
    type T2;
    expression x;
    identifier f,fld;
    expression E;
    expression E1,E2;
    expression e1,e2,e3,y;
    statement S;
    @@

    x =
    - kmalloc
    + kzalloc
    (E1,E2)
    ... when != \(x->fld=E;\|y=f(...,x,...);\|f(...,x,...);\|x=E;\|while(...) S\|for(e1;e2;e3) S\)
    - memset((T2)x,0,E1);

    @@
    expression E1,E2,E3;
    @@

    - kzalloc(E1 * E2,E3)
    + kcalloc(E1,E2,E3)

    [akpm@linux-foundation.org: get kcalloc args the right way around]
    Signed-off-by: Yoann Padioleau
    Cc: Richard Henderson
    Cc: Ivan Kokshaysky
    Acked-by: Russell King
    Cc: Bryan Wu
    Acked-by: Jiri Slaby
    Cc: Dave Airlie
    Acked-by: Roland Dreier
    Cc: Jiri Kosina
    Acked-by: Dmitry Torokhov
    Cc: Benjamin Herrenschmidt
    Acked-by: Mauro Carvalho Chehab
    Acked-by: Pierre Ossman
    Cc: Jeff Garzik
    Cc: "David S. Miller"
    Acked-by: Greg KH
    Cc: James Bottomley
    Cc: "Antonino A. Daplas"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Yoann Padioleau
     

11 May, 2007

1 commit


18 Feb, 2007

1 commit

  • The line :

    hp->Mode &= !RIO_PCI_INT_ENABLE;

    is obviously wrong as RIO_PCI_INT_ENABLE=0x04 and is used as a bitmask
    2 lines before. Getting no IRQ would not disable RIO_PCI_INT_ENABLE
    but rather RIO_PCI_BOOT_FROM_RAM which equals 0x01.

    Obvious fix is to change ! for ~.

    Signed-off-by: Willy Tarreau
    Signed-off-by: Adrian Bunk

    Willy Tarreau
     

13 Feb, 2007

1 commit

  • - Use timer macros to set function and data members and to modify
    expiration time.
    - Use DEFINE_TIMER for global timers and do not init them at run-time in
    these cases.
    - del_timer_sync is common in most cases -- we want to wait for timer
    function if it's still running.

    Signed-off-by: Jiri Slaby
    Cc: Dave Airlie
    Cc: David Woodhouse
    Cc: Dominik Brodowski
    Cc: Alessandro Zummo
    Cc: Paul Fulghum
    Cc: Kylene Jo Hall
    Cc: Wim Van Sebroeck
    Acked-by: Dmitry Torokhov (Input bits)
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jiri Slaby
     

12 Feb, 2007

1 commit

  • tty_wakeup cleanup

    - remove wake_up_interruptible(&tty->write_wait) surrounding
    tty_wakup(tty);
    - substitute tty->ldisc.write_wakeup(tty) + wake_up() by tty_wakeup(tty);

    Signed-off-by: Jiri Slaby
    Cc: Alan Cox
    Acked-by: Tilman Schmidt
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jiri Slaby
     

14 Dec, 2006

1 commit

  • Run this:

    #!/bin/sh
    for f in $(grep -Erl "\([^\)]*\) *k[cmz]alloc" *) ; do
    echo "De-casting $f..."
    perl -pi -e "s/ ?= ?\([^\)]*\) *(k[cmz]alloc) *\(/ = \1\(/" $f
    done

    And then go through and reinstate those cases where code is casting pointers
    to non-pointers.

    And then drop a few hunks which conflicted with outstanding work.

    Cc: Russell King , Ian Molton
    Cc: Mikael Starvik
    Cc: Yoshinori Sato
    Cc: Roman Zippel
    Cc: Geert Uytterhoeven
    Cc: Ralf Baechle
    Cc: Paul Mackerras
    Cc: Kyle McMartin
    Cc: Benjamin Herrenschmidt
    Cc: Martin Schwidefsky
    Cc: "David S. Miller"
    Cc: Jeff Dike
    Cc: Greg KH
    Cc: Jens Axboe
    Cc: Paul Fulghum
    Cc: Alan Cox
    Cc: Karsten Keil
    Cc: Mauro Carvalho Chehab
    Cc: Jeff Garzik
    Cc: James Bottomley
    Cc: Ian Kent
    Cc: Steven French
    Cc: David Woodhouse
    Cc: Neil Brown
    Cc: Jaroslav Kysela
    Cc: Takashi Iwai
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Robert P. J. Day
     

08 Dec, 2006

1 commit


30 Nov, 2006

1 commit


22 Oct, 2006

1 commit

  • Commits 881a8c120acf7ec09c90289e2996b7c70f51e996 and
    efe1ec27837d6639eae82e1f5876910ba6433c3f corrects pci device matching in
    only one way; it no longer oopses/crashes, despite hotplug is not solved
    in these changes.

    Whenever pci_find_device -> pci_get_device change is performed, also
    pci_dev_get and pci_dev_put should be in most cases called to properly
    handle hotplug. This patch does exactly this thing -- increase refcount
    to let kernel know, that we are using this piece of HW just now.

    It affects moxa and rio char drivers.

    Cc:
    Acked-by: Amit Gud
    Acked-by: Greg Kroah-Hartman
    Acked-by: Alan Cox
    Signed-off-by: Jiri Slaby
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jiri Slaby
     

16 Oct, 2006

1 commit


07 Oct, 2006

1 commit

  • - Eliminate casts to/from void*

    - Eliminate checks for conditions that never occur. These typically
    fall into two classes:

    1) Checking for 'dev_id == NULL', then it is never called with
    NULL as an argument.

    2) Checking for invalid irq number, when the only caller (the
    system) guarantees the irq handler is called with the proper
    'irq' number argument.

    Signed-off-by: Jeff Garzik

    Jeff Garzik
     

05 Oct, 2006

1 commit

  • Maintain a per-CPU global "struct pt_regs *" variable which can be used instead
    of passing regs around manually through all ~1800 interrupt handlers in the
    Linux kernel.

    The regs pointer is used in few places, but it potentially costs both stack
    space and code to pass it around. On the FRV arch, removing the regs parameter
    from all the genirq function results in a 20% speed up of the IRQ exit path
    (ie: from leaving timer_interrupt() to leaving do_IRQ()).

    Where appropriate, an arch may override the generic storage facility and do
    something different with the variable. On FRV, for instance, the address is
    maintained in GR28 at all times inside the kernel as part of general exception
    handling.

    Having looked over the code, it appears that the parameter may be handed down
    through up to twenty or so layers of functions. Consider a USB character
    device attached to a USB hub, attached to a USB controller that posts its
    interrupts through a cascaded auxiliary interrupt controller. A character
    device driver may want to pass regs to the sysrq handler through the input
    layer which adds another few layers of parameter passing.

    I've build this code with allyesconfig for x86_64 and i386. I've runtested the
    main part of the code on FRV and i386, though I can't test most of the drivers.
    I've also done partial conversion for powerpc and MIPS - these at least compile
    with minimal configurations.

    This will affect all archs. Mostly the changes should be relatively easy.
    Take do_IRQ(), store the regs pointer at the beginning, saving the old one:

    struct pt_regs *old_regs = set_irq_regs(regs);

    And put the old one back at the end:

    set_irq_regs(old_regs);

    Don't pass regs through to generic_handle_irq() or __do_IRQ().

    In timer_interrupt(), this sort of change will be necessary:

    - update_process_times(user_mode(regs));
    - profile_tick(CPU_PROFILING, regs);
    + update_process_times(user_mode(get_irq_regs()));
    + profile_tick(CPU_PROFILING);

    I'd like to move update_process_times()'s use of get_irq_regs() into itself,
    except that i386, alone of the archs, uses something other than user_mode().

    Some notes on the interrupt handling in the drivers:

    (*) input_dev() is now gone entirely. The regs pointer is no longer stored in
    the input_dev struct.

    (*) finish_unlinks() in drivers/usb/host/ohci-q.c needs checking. It does
    something different depending on whether it's been supplied with a regs
    pointer or not.

    (*) Various IRQ handler function pointers have been moved to type
    irq_handler_t.

    Signed-Off-By: David Howells
    (cherry picked from 1b16e7ac850969f38b375e511e3fa2f474a33867 commit)

    David Howells
     

02 Oct, 2006

1 commit

  • As part of an SMP cleanliness pass over UML, I consted a bunch of
    structures in order to not have to document their locking. One of these
    structures was a struct tty_operations. In order to const it in UML
    without introducing compiler complaints, the declaration of
    tty_set_operations needs to be changed, and then all of its callers need to
    be fixed.

    This patch declares all struct tty_operations in the tree as const. In all
    cases, they are static and used only as input to tty_set_operations. As an
    extra check, I ran an i386 allyesconfig build which produced no extra
    warnings.

    53 drivers are affected. I checked the history of a bunch of them, and in
    most cases, there have been only a handful of maintenance changes in the
    last six months. serial_core.c was the busiest one that I looked at.

    Signed-off-by: Jeff Dike
    Acked-by: Alan Cox
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jeff Dike
     

04 Jul, 2006

1 commit

  • Mark the static struct file_operations in drivers/char as const. Making
    them const prevents accidental bugs, and moves them to the .rodata section
    so that they no longer do any false sharing; in addition with the proper
    debug option they are then protected against corruption..

    [akpm@osdl.org: build fix]
    Signed-off-by: Arjan van de Ven
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Arjan van de Ven
     

03 Jul, 2006

1 commit


01 Jul, 2006

1 commit


27 Jun, 2006

1 commit

  • acquired (aquired)
    contiguous (contigious)
    successful (succesful, succesfull)
    surprise (suprise)
    whether (weather)
    some other misspellings

    Signed-off-by: Andreas Mohr
    Signed-off-by: Adrian Bunk

    Andreas Mohr
     

27 May, 2006

9 commits


16 May, 2006

1 commit


24 Mar, 2006

4 commits

  • - Remove more unused headers
    - Remove various typedefs
    - Correct type of PaddrP (physical addresses should be ulong)
    - Kill use of bcopy
    - More printk cleanups
    - Kill true/false
    - Clean up direct access to pci BARs

    Signed-off-by: Alan Cox
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alan Cox
     
  • - Remove more unused headers
    - Remove various typedefs
    - Correct type of PaddrP (physical addresses should be ulong)
    - Kill use of bcopy
    - More printk cleanups
    - Kill true/false
    - Clean up direct access to pci BARs

    Signed-off-by: Alan Cox
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alan Cox
     
  • Final polish. There is no more save_flags/cli type locking left. We also no
    longer use the pcicopy function and file so they can go.

    Signed-off-by: Alan Cox
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alan Cox
     
  • Third large chunk of code cleanup. The split between this and #3 and #4 is
    fairly arbitary and due to the message length limit on the list. These
    patches continue the process of ripping out macros and typedefs while cleaning
    up lots of 32bit assumptions. Several inlines for compatibility also get
    removed and that causes a lot of noise.

    Signed-off-by: Alan Cox
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alan Cox