From: H Hartley Sweeten <hartleys@visionengravers.com>
To: Linux Kernel <linux-kernel@vger.kernel.org>
Cc: <x86@kernel.org>, <tglx@linutronix.de>, <mingo@redhat.com>,
<hpa@zytor.com>, <akpm@linux-foundation.org>,
<kamal@canonical.com>, <paul.gortmaker@windriver.com>,
<mditto@google.com>
Subject: [PATCH] e820.c: quiet sparse noise about plain integer as NULL pointer
Date: Fri, 9 Sep 2011 14:20:52 -0700 [thread overview]
Message-ID: <201109091420.52593.hartleys@visionengravers.com> (raw)
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 */
reply other threads:[~2011-09-09 21:21 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201109091420.52593.hartleys@visionengravers.com \
--to=hartleys@visionengravers.com \
--cc=akpm@linux-foundation.org \
--cc=hpa@zytor.com \
--cc=kamal@canonical.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mditto@google.com \
--cc=mingo@redhat.com \
--cc=paul.gortmaker@windriver.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®