]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
arch/x86/kernel/e820.c: quiet sparse noise about plain integer as NULL pointer
authorH Hartley Sweeten <hartleys@visionengravers.com>
Tue, 8 Nov 2011 00:19:53 +0000 (11:19 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 9 Nov 2011 02:10:05 +0000 (13:10 +1100)
The last parameter to sort() is a pointer to the function used to swap
items.  This parameter should be NULL, not 0, when not used.  This quiets
the following sparse warning:

warning: Using plain integer as NULL pointer

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
arch/x86/kernel/e820.c

index f655f802260d69bbf3d80ffaeb9b30e32fe51124..d6bd85352c817873c1b8ec66ca158a2d21a4a684 100644 (file)
@@ -296,7 +296,7 @@ int __init sanitize_e820_map(struct e820entry *biosmap, int max_nr_map,
        chg_nr = chgidx;
 
        /* sort change-point list by memory addresses (low -> high) */
-       sort(change_point, chg_nr, sizeof *change_point, cpcompare, 0);
+       sort(change_point, chg_nr, sizeof *change_point, cpcompare, NULL);
 
        /* create a new bios memory map, removing overlaps */
        overlap_entries = 0;     /* number of entries in the overlap table */