[lkml]   [2006]   [Nov]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [PATCH] Added MIPS RM9K watchdog driver
    On Wed, Nov 01, 2006 at 10:11:25PM -0800, Randy Dunlap wrote:

    > > wd_regs = ioremap_nocache(rr->start, rr->end + 1 - rr->start);
    > > if (unlikely(!wd_regs))
    > > return -ENOMEM;
    > There's no way to return the resources on failure?

    MIPS drivers (and this one is specific to a particular MIPS SOC) are
    generally a bit sloopy about checking of return values of ioremap because
    ioremap is only doing some address arithmetic but no allocations that
    actually could fail. So for 64-bit kernels or addresses below 0x20000000
    on a 32-bit system ioremap cannot fail. In the same cases ioremap happens
    to be a no-op because where nothing was allocated nothing needs to be

    > > if (unlikely(__copy_from_user(&val, (const void __user *) arg,

    Note to self, __copy_from_user and gang are generally assume to not
    return an error so it might be a good idea to move that unlikely() into
    the macro definitions.

    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2006-11-02 15:07    [W:0.021 / U:3.000 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site