sparse pointer use of zero as null
Get rid of sparse related warnings from places that use integer as NULL pointer. [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Cc: Andi Kleen <ak@suse.de> Cc: Jeff Garzik <jeff@garzik.org> Cc: Matt Mackall <mpm@selenic.com> Cc: Ian Kent <raven@themaw.net> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Davide Libenzi <davidel@xmailserver.org> Cc: Stephen Smalley <sds@tycho.nsa.gov> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:

committed by
Linus Torvalds

parent
0e9663ee45
commit
c80544dc0b
@@ -217,7 +217,7 @@ static int journal_start_thread(journal_t *journal)
|
||||
if (IS_ERR(t))
|
||||
return PTR_ERR(t);
|
||||
|
||||
wait_event(journal->j_wait_done_commit, journal->j_task != 0);
|
||||
wait_event(journal->j_wait_done_commit, journal->j_task != NULL);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -229,7 +229,8 @@ static void journal_kill_thread(journal_t *journal)
|
||||
while (journal->j_task) {
|
||||
wake_up(&journal->j_wait_commit);
|
||||
spin_unlock(&journal->j_state_lock);
|
||||
wait_event(journal->j_wait_done_commit, journal->j_task == 0);
|
||||
wait_event(journal->j_wait_done_commit,
|
||||
journal->j_task == NULL);
|
||||
spin_lock(&journal->j_state_lock);
|
||||
}
|
||||
spin_unlock(&journal->j_state_lock);
|
||||
@@ -1651,14 +1652,14 @@ static struct journal_head *journal_alloc_journal_head(void)
|
||||
atomic_inc(&nr_journal_heads);
|
||||
#endif
|
||||
ret = kmem_cache_alloc(journal_head_cache, GFP_NOFS);
|
||||
if (ret == 0) {
|
||||
if (ret == NULL) {
|
||||
jbd_debug(1, "out of memory for journal_head\n");
|
||||
if (time_after(jiffies, last_warning + 5*HZ)) {
|
||||
printk(KERN_NOTICE "ENOMEM in %s, retrying.\n",
|
||||
__FUNCTION__);
|
||||
last_warning = jiffies;
|
||||
}
|
||||
while (ret == 0) {
|
||||
while (ret == NULL) {
|
||||
yield();
|
||||
ret = kmem_cache_alloc(journal_head_cache, GFP_NOFS);
|
||||
}
|
||||
|
Reference in New Issue
Block a user