lkml.org 
[lkml]   [2009]   [Sep]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 4/5] kmemleak: fix sparse warning over overshadowed flags
    Date
    This fixes this sparse warning:
    mm/kmemleak.c:512:31: warning: symbol 'flags' shadows an earlier one
    mm/kmemleak.c:448:23: originally declared here

    Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
    ---
    mm/kmemleak.c | 6 +++---
    1 files changed, 3 insertions(+), 3 deletions(-)

    diff --git a/mm/kmemleak.c b/mm/kmemleak.c
    index 7bb1d48..09ddf9c 100644
    --- a/mm/kmemleak.c
    +++ b/mm/kmemleak.c
    @@ -509,14 +509,14 @@ static void create_object(unsigned long ptr, size_t size, int min_count,
    * random memory blocks.
    */
    if (node != &object->tree_node) {
    - unsigned long flags;
    + unsigned long flags_object;

    kmemleak_stop("Cannot insert 0x%lx into the object search tree "
    "(already existing)\n", ptr);
    object = lookup_object(ptr, 1);
    - spin_lock_irqsave(&object->lock, flags);
    + spin_lock_irqsave(&object->lock, flags_object);
    dump_object_info(object);
    - spin_unlock_irqrestore(&object->lock, flags);
    + spin_unlock_irqrestore(&object->lock, flags_object);

    goto out;
    }
    --
    1.6.3.3


    \
     
     \ /
      Last update: 2009-09-03 03:43    [W:0.020 / U:60.544 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site