Re: [PATCH 1/4] lmb: Fix compile warning - Kernel

This is a discussion on Re: [PATCH 1/4] lmb: Fix compile warning - Kernel ; From: Kumar Gala Date: Sun, 18 May 2008 13:44:53 -0500 > lib/lmb.c: In function 'lmb_dump_all': > lib/lmb.c:51: warning: format '%lx' expects type 'long unsigned int', but argument 2 has type 'u64' > > Signed-off-by: Kumar Gala That's not right either. ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: Re: [PATCH 1/4] lmb: Fix compile warning

  1. Re: [PATCH 1/4] lmb: Fix compile warning

    From: Kumar Gala
    Date: Sun, 18 May 2008 13:44:53 -0500

    > lib/lmb.c: In function 'lmb_dump_all':
    > lib/lmb.c:51: warning: format '%lx' expects type 'long unsigned int', but argument 2 has type 'u64'
    >
    > Signed-off-by: Kumar Gala


    That's not right either.

    We'll need to cast this argument because it's a different type on sparc
    vs sparc64 vs powerpc.

    u64 != unsigned long long
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  2. [PATCH v2] lmb: Fix compile warning

    lib/lmb.c: In function 'lmb_dump_all':
    lib/lmb.c:51: warning: format '%lx' expects type 'long unsigned int', but argument 2 has type 'u64'

    Signed-off-by: Kumar Gala
    ---

    Cast so it works everywhere.

    - k

    lib/lmb.c | 3 ++-
    1 files changed, 2 insertions(+), 1 deletions(-)

    diff --git a/lib/lmb.c b/lib/lmb.c
    index 867f7b5..5d7b928 100644
    --- a/lib/lmb.c
    +++ b/lib/lmb.c
    @@ -48,7 +48,8 @@ void lmb_dump_all(void)
    }

    pr_info(" reserved.cnt = 0x%lx\n", lmb.reserved.cnt);
    - pr_info(" reserved.size = 0x%lx\n", lmb.reserved.size);
    + pr_info(" reserved.size = 0x%llx\n",
    + (unsigned long long)lmb.memory.size);
    for (i=0; i < lmb.reserved.cnt ;i++) {
    pr_info(" reserved.region[0x%lx].base = 0x%llx\n",
    i, (unsigned long long)lmb.reserved.region[i].base);
    --
    1.5.4.5

    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  3. Re: [PATCH v2] lmb: Fix compile warning

    From: Kumar Gala
    Date: Sun, 18 May 2008 23:34:36 -0500 (CDT)

    > lib/lmb.c: In function 'lmb_dump_all':
    > lib/lmb.c:51: warning: format '%lx' expects type 'long unsigned int', but argument 2 has type 'u64'
    >
    > Signed-off-by: Kumar Gala


    Acked-by: David S. Miller
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

+ Reply to Thread