mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] e820.c: quiet sparse noise about plain integer as NULL pointer
@ 2011-09-09 21:20 H Hartley Sweeten
  0 siblings, 0 replies; only message in thread
From: H Hartley Sweeten @ 2011-09-09 21:20 UTC (permalink / raw)
  To: Linux Kernel; +Cc: x86, tglx, mingo, hpa, akpm, kamal, paul.gortmaker, mditto

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>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Kamal Mostafa <kamal@canonical.com>
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
Cc: Mike Ditto <mditto@google.com>

---

diff --git a/arch/x86/kernel/e820.c b/arch/x86/kernel/e820.c
index f655f80..d6bd853 100644
--- a/arch/x86/kernel/e820.c
+++ b/arch/x86/kernel/e820.c
@@ -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 */

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-09-09 21:21 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-09 21:20 [PATCH] e820.c: quiet sparse noise about plain integer as NULL pointer H Hartley Sweeten

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®