lkml.org 
[lkml]   [2008]   [Nov]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[patch 23/60] __page_to_pfn warnings
    From: Martin Schwidefsky <schwidefsky@de.ibm.com>

    For CONFIG_SPARSEMEM_VMEMMAP=y on s390 I get warnings like

    init/main.c: In function 'start_kernel':
    init/main.c:641: warning: format '%08lx' expects type 'long unsigned int', but argument 2 has type 'int'

    The warning can be suppressed with a cast to unsigned long in the
    CONFIG_SPARSEMEM_VMEMMAP=y version of __page_to_pfn.

    Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
    ---

    include/asm-generic/memory_model.h | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    Index: quilt-2.6/include/asm-generic/memory_model.h
    ===================================================================
    --- quilt-2.6.orig/include/asm-generic/memory_model.h
    +++ quilt-2.6/include/asm-generic/memory_model.h
    @@ -49,7 +49,7 @@

    /* memmap is virtually contigious. */
    #define __pfn_to_page(pfn) (vmemmap + (pfn))
    -#define __page_to_pfn(page) ((page) - vmemmap)
    +#define __page_to_pfn(page) (unsigned long)((page) - vmemmap)

    #elif defined(CONFIG_SPARSEMEM)
    /*
    --
    blue skies,
    Martin.

    "Reality continues to ruin my life." - Calvin.



    \
     
     \ /
      Last update: 2008-11-27 11:43    [W:0.021 / U:0.320 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site