lkml.org 
[lkml]   [2009]   [Jun]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[tip:branch?] x86: memtest: add proper typecast for pointer comparison
    Commit-ID:  47e64f3c8430d0410c8e83f3e503532491c863c3
    Gitweb: http://git.kernel.org/tip/47e64f3c8430d0410c8e83f3e503532491c863c3
    Author: Andreas Herrmann <andreas.herrmann3@amd.com>
    AuthorDate: Thu, 11 Jun 2009 12:29:27 +0200
    Committer: Thomas Gleixner <tglx@linutronix.de>
    CommitDate: Thu, 11 Jun 2009 13:53:02 +0200

    x86: memtest: add proper typecast for pointer comparison

    Commit c9690998ef48ffefeccb91c70a7739eebdea57f9
    (x86: memtest: remove 64-bit division) introduced following compile warning:

    arch/x86/mm/memtest.c: In function 'memtest':
    arch/x86/mm/memtest.c:56: warning: comparison of distinct pointer types lacks a cast
    arch/x86/mm/memtest.c:58: warning: comparison of distinct pointer types lacks a cast

    Signed-off-by: Andreas Herrmann <andreas.herrmann3@amd.com>
    LKML-Reference: <20090611102927.GE12431@alberich.amd.com>
    Signed-off-by: Thomas Gleixner <tglx@linutronix.de>


    ---
    arch/x86/mm/memtest.c | 4 ++--
    1 files changed, 2 insertions(+), 2 deletions(-)

    diff --git a/arch/x86/mm/memtest.c b/arch/x86/mm/memtest.c
    index c0bedcd..1a8b48f 100644
    --- a/arch/x86/mm/memtest.c
    +++ b/arch/x86/mm/memtest.c
    @@ -53,9 +53,9 @@ static void __init memtest(u64 pattern, u64 start_phys, u64 size)
    start_bad = 0;
    last_bad = 0;

    - for (p = start; p < end; p++)
    + for (p = start; (void *) p < end; p++)
    *p = pattern;
    - for (p = start; p < end; p++, start_phys_aligned += incr) {
    + for (p = start; (void *) p < end; p++, start_phys_aligned += incr) {
    if (*p == pattern)
    continue;
    if (start_phys_aligned == last_bad + incr) {

    \
     
     \ /
      Last update: 2009-06-11 14:01    [W:0.023 / U:32.156 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site