05 Dec, 2008

1 commit

  • of_node_put is needed before discarding a value received from
    of_find_node_by_name, eg in error handling code or when the device
    node is no longer used.

    The semantic match that catches the bug is as follows:
    (http://www.emn.fr/x-info/coccinelle/)

    //
    @r exists@
    local idexpression struct device_node *n;
    position p1, p2;
    struct device_node *n1;
    statement S;
    identifier f;
    expression E;
    expression *ptr != NULL;
    @@

    n@p1 = of_find_node_by_name(...)
    ...
    if (!n) S
    ... when != of_node_put(n)
    when != n1 = f(n,...)
    when != E = n
    when any
    when strict
    (
    return \(0\|\|ptr\);
    |
    return@p2 ...;
    |
    of_node_put(n);
    |
    n1 = f(n,...)
    |
    E = n
    )

    @script:python@
    p1 << r.p1;
    p2 << r.p2;
    @@

    print "* file: %s of_find_node_by_name %s return %s" % (p1[0].file,p1[0].line,p2[0].line)
    //

    Signed-off-by: Nicolas Palix
    Signed-off-by: Julia Lawall
    Signed-off-by: David S. Miller

    Nicolas Palix
     

08 Oct, 2008

1 commit

  • Here is an updated version of a patch I wrote 6 years ago
    http://marc.info/?l=linux-sparc&m=103939103607617&w=2
    that simplifies interrupt mask lookup. It's main purpose
    is to add VME bus support but it's really a cleanup of the mask code.

    Signed-off-by: Robert Reif
    Signed-off-by: David S. Miller

    Robert Reif
     

20 Sep, 2008

6 commits


14 Sep, 2008

1 commit


29 Aug, 2008

2 commits


18 Jul, 2008

1 commit

  • This patch contains the following possible cleanups:
    - make the following needlessly global code static:
    - apc.c: apc_swift_idle()
    - ebus.c: ebus_blacklist_irq()
    - ebus.c: fill_ebus_child()
    - ebus.c: fill_ebus_device()
    - entry.S: syscall_is_too_hard
    - etra: tsetup_sun4c_stackchk
    - head.S: cputyp
    - head.S: prom_vector_p
    - idprom.c: Sun_Machines[]
    - ioport.c: _sparc_find_resource()
    - ioport.c: create_proc_read_entry()
    - irq.c: struct sparc_irq[]
    - rtrap.S: sun4c_rett_stackchk
    - setup.c: prom_sync_me()
    - setup.c: boot_flags
    - sun4c_irq.c: sun4c_sbint_to_irq()
    - sun4d_irq.c: sbus_tid[]
    - sun4d_irq.c: struct sbus_actions
    - sun4d_irq.c: sun4d_sbint_to_irq()
    - sun4m_irq.c: sun4m_sbint_to_irq()
    - sun4m_irq.c: sun4m_get_irqmask()
    - sun4m_irq.c: sun4m_timers
    - sun4m_smp.c: smp4m_cross_call()
    - sun4m_smp.c: smp4m_blackbox_id()
    - sun4m_smp.c: smp4m_blackbox_current()
    - time.c: sp_clock_typ
    - time.c: sbus_time_init()
    - traps.c: instruction_dump()
    - wof.S: spwin_sun4c_stackchk
    - wuf.S: sun4c_fwin_stackchk
    - #if 0 the following unused code:
    - process.c: sparc_backtrace_lock
    - process.c: __show_backtrace()
    - process.c: show_backtrace()
    - process.c: smp_show_backtrace_all_cpus()
    - remove the following unused code:
    - entry.S: __handle_exception
    - smp.c: smp_num_cpus
    - smp.c: smp_activated
    - smp.c: __cpu_number_map[]
    - smp.c: __cpu_logical_map[]
    - smp.c: bitops_spinlock
    - traps.c: trap_curbuf
    - traps.c: trapbuf[]
    - traps.c: linux_smp_still_initting
    - traps.c: thiscpus_tbr
    - traps.c: thiscpus_mid

    Signed-off-by: Adrian Bunk
    Signed-off-by: David S. Miller

    Adrian Bunk
     

22 Jul, 2007

1 commit


12 May, 2007

1 commit


09 Oct, 2006

2 commits


03 Jul, 2006

1 commit


01 Jul, 2006

1 commit


20 Jun, 2006

1 commit

  • This ugly hack was long overdue to die.

    It was a way to print out Sparc interrupts in a more freindly format,
    since IRQ numbers were arbitrary opaque 32-bit integers which vectored
    into PIL levels. These 32-bit integers were not necessarily in the
    0-->NR_IRQS range, but the PILs they vectored to were.

    The idea now is that we will increase NR_IRQS a little bit and use a
    virtualreal IRQ number mapping scheme similar to PowerPC.

    That makes this IRQ printing hack irrelevant, and furthermore only a
    handful of drivers actually used __irq_itoa() making it even less
    useful.

    Signed-off-by: David S. Miller

    David S. Miller
     

17 Apr, 2005

1 commit

  • Initial git repository build. I'm not bothering with the full history,
    even though we have it. We can create a separate "historical" git
    archive of that later if we want to, and in the meantime it's about
    3.2GB when imported into git - space that would just make the early
    git days unnecessarily complicated, when we don't have a lot of good
    infrastructure for it.

    Let it rip!

    Linus Torvalds