Skip to content

Commit

Permalink
arch/x86/kernel/e820.c: quiet sparse noise about plain integer as NUL…
Browse files Browse the repository at this point in the history
…L pointer

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>
Cc: hartleys@visionengravers.com
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
H Hartley Sweeten authored and Ingo Molnar committed Dec 5, 2011
1 parent d1bbdd6 commit 706d9a9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/x86/kernel/e820.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit 706d9a9

Please sign in to comment.