1
0
Fork 0

NULL noise: fs/*, mm/*, kernel/*

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
hifive-unleashed-5.1
Al Viro 2008-03-29 03:07:28 +00:00 committed by Linus Torvalds
parent 1076d17ac7
commit 9dce07f1a4
8 changed files with 19 additions and 17 deletions

View File

@ -283,7 +283,7 @@ static int balance_leaf(struct tree_balance *tb, struct item_head *ih, /* item h
return balance_leaf_when_delete(tb, flag); return balance_leaf_when_delete(tb, flag);
zeros_num = 0; zeros_num = 0;
if (flag == M_INSERT && body == 0) if (flag == M_INSERT && !body)
zeros_num = ih_item_len(ih); zeros_num = ih_item_len(ih);
pos_in_item = tb->tb_path->pos_in_item; pos_in_item = tb->tb_path->pos_in_item;
@ -1728,7 +1728,7 @@ struct buffer_head *get_FEB(struct tree_balance *tb)
struct buffer_info bi; struct buffer_info bi;
for (i = 0; i < MAX_FEB_SIZE; i++) for (i = 0; i < MAX_FEB_SIZE; i++)
if (tb->FEB[i] != 0) if (tb->FEB[i] != NULL)
break; break;
if (i == MAX_FEB_SIZE) if (i == MAX_FEB_SIZE)
@ -1827,7 +1827,7 @@ int get_left_neighbor_position(struct tree_balance *tb, int h)
{ {
int Sh_position = PATH_H_POSITION(tb->tb_path, h + 1); int Sh_position = PATH_H_POSITION(tb->tb_path, h + 1);
RFALSE(PATH_H_PPARENT(tb->tb_path, h) == 0 || tb->FL[h] == 0, RFALSE(PATH_H_PPARENT(tb->tb_path, h) == NULL || tb->FL[h] == NULL,
"vs-12325: FL[%d](%p) or F[%d](%p) does not exist", "vs-12325: FL[%d](%p) or F[%d](%p) does not exist",
h, tb->FL[h], h, PATH_H_PPARENT(tb->tb_path, h)); h, tb->FL[h], h, PATH_H_PPARENT(tb->tb_path, h));
@ -1841,7 +1841,7 @@ int get_right_neighbor_position(struct tree_balance *tb, int h)
{ {
int Sh_position = PATH_H_POSITION(tb->tb_path, h + 1); int Sh_position = PATH_H_POSITION(tb->tb_path, h + 1);
RFALSE(PATH_H_PPARENT(tb->tb_path, h) == 0 || tb->FR[h] == 0, RFALSE(PATH_H_PPARENT(tb->tb_path, h) == NULL || tb->FR[h] == NULL,
"vs-12330: F[%d](%p) or FR[%d](%p) does not exist", "vs-12330: F[%d](%p) or FR[%d](%p) does not exist",
h, PATH_H_PPARENT(tb->tb_path, h), h, tb->FR[h]); h, PATH_H_PPARENT(tb->tb_path, h), h, tb->FR[h]);

View File

@ -153,7 +153,7 @@ static void create_virtual_node(struct tree_balance *tb, int h)
if (vn->vn_mode == M_INSERT) { if (vn->vn_mode == M_INSERT) {
struct virtual_item *vi = vn->vn_vi + vn->vn_affected_item_num; struct virtual_item *vi = vn->vn_vi + vn->vn_affected_item_num;
RFALSE(vn->vn_ins_ih == 0, RFALSE(vn->vn_ins_ih == NULL,
"vs-8040: item header of inserted item is not specified"); "vs-8040: item header of inserted item is not specified");
vi->vi_item_len = tb->insert_size[0]; vi->vi_item_len = tb->insert_size[0];
vi->vi_ih = vn->vn_ins_ih; vi->vi_ih = vn->vn_ins_ih;
@ -857,7 +857,8 @@ static int get_lfree(struct tree_balance *tb, int h)
struct buffer_head *l, *f; struct buffer_head *l, *f;
int order; int order;
if ((f = PATH_H_PPARENT(tb->tb_path, h)) == 0 || (l = tb->FL[h]) == 0) if ((f = PATH_H_PPARENT(tb->tb_path, h)) == NULL ||
(l = tb->FL[h]) == NULL)
return 0; return 0;
if (f == l) if (f == l)
@ -878,7 +879,8 @@ static int get_rfree(struct tree_balance *tb, int h)
struct buffer_head *r, *f; struct buffer_head *r, *f;
int order; int order;
if ((f = PATH_H_PPARENT(tb->tb_path, h)) == 0 || (r = tb->FR[h]) == 0) if ((f = PATH_H_PPARENT(tb->tb_path, h)) == NULL ||
(r = tb->FR[h]) == NULL)
return 0; return 0;
if (f == r) if (f == r)

View File

@ -626,7 +626,7 @@ static void leaf_define_dest_src_infos(int shift_mode, struct tree_balance *tb,
"vs-10250: leaf_define_dest_src_infos: shift type is unknown (%d)", "vs-10250: leaf_define_dest_src_infos: shift type is unknown (%d)",
shift_mode); shift_mode);
} }
RFALSE(src_bi->bi_bh == 0 || dest_bi->bi_bh == 0, RFALSE(!src_bi->bi_bh || !dest_bi->bi_bh,
"vs-10260: mode==%d, source (%p) or dest (%p) buffer is initialized incorrectly", "vs-10260: mode==%d, source (%p) or dest (%p) buffer is initialized incorrectly",
shift_mode, src_bi->bi_bh, dest_bi->bi_bh); shift_mode, src_bi->bi_bh, dest_bi->bi_bh);
} }

View File

@ -452,7 +452,7 @@ static int reiserfs_add_entry(struct reiserfs_transaction_handle *th,
buflen = DEH_SIZE + ROUND_UP(namelen); buflen = DEH_SIZE + ROUND_UP(namelen);
if (buflen > sizeof(small_buf)) { if (buflen > sizeof(small_buf)) {
buffer = kmalloc(buflen, GFP_NOFS); buffer = kmalloc(buflen, GFP_NOFS);
if (buffer == 0) if (!buffer)
return -ENOMEM; return -ENOMEM;
} else } else
buffer = small_buf; buffer = small_buf;

View File

@ -206,7 +206,7 @@ int smbiod_retry(struct smb_sb_info *server)
smb_close_socket(server); smb_close_socket(server);
if (pid == 0) { if (!pid) {
/* FIXME: this is fatal, umount? */ /* FIXME: this is fatal, umount? */
printk(KERN_ERR "smb_retry: no connection process\n"); printk(KERN_ERR "smb_retry: no connection process\n");
server->state = CONN_RETRIED; server->state = CONN_RETRIED;

View File

@ -2082,7 +2082,7 @@ static int cgroup_tasks_open(struct inode *unused, struct file *file)
kfree(pidarray); kfree(pidarray);
} else { } else {
ctr->buf = 0; ctr->buf = NULL;
ctr->bufsz = 0; ctr->bufsz = 0;
} }
file->private_data = ctr; file->private_data = ctr;
@ -2614,7 +2614,7 @@ static int proc_cgroupstats_show(struct seq_file *m, void *v)
static int cgroupstats_open(struct inode *inode, struct file *file) static int cgroupstats_open(struct inode *inode, struct file *file)
{ {
return single_open(file, proc_cgroupstats_show, 0); return single_open(file, proc_cgroupstats_show, NULL);
} }
static struct file_operations proc_cgroupstats_operations = { static struct file_operations proc_cgroupstats_operations = {

View File

@ -281,7 +281,7 @@ static int get_futex_key(u32 __user *uaddr, struct rw_semaphore *fshared,
*/ */
static void get_futex_key_refs(union futex_key *key) static void get_futex_key_refs(union futex_key *key)
{ {
if (key->both.ptr == 0) if (key->both.ptr == NULL)
return; return;
switch (key->both.offset & (FUT_OFF_INODE|FUT_OFF_MMSHARED)) { switch (key->both.offset & (FUT_OFF_INODE|FUT_OFF_MMSHARED)) {
case FUT_OFF_INODE: case FUT_OFF_INODE:

View File

@ -76,7 +76,7 @@ pte_t * __meminit vmemmap_pte_populate(pmd_t *pmd, unsigned long addr, int node)
pte_t entry; pte_t entry;
void *p = vmemmap_alloc_block(PAGE_SIZE, node); void *p = vmemmap_alloc_block(PAGE_SIZE, node);
if (!p) if (!p)
return 0; return NULL;
entry = pfn_pte(__pa(p) >> PAGE_SHIFT, PAGE_KERNEL); entry = pfn_pte(__pa(p) >> PAGE_SHIFT, PAGE_KERNEL);
set_pte_at(&init_mm, addr, pte, entry); set_pte_at(&init_mm, addr, pte, entry);
} }
@ -89,7 +89,7 @@ pmd_t * __meminit vmemmap_pmd_populate(pud_t *pud, unsigned long addr, int node)
if (pmd_none(*pmd)) { if (pmd_none(*pmd)) {
void *p = vmemmap_alloc_block(PAGE_SIZE, node); void *p = vmemmap_alloc_block(PAGE_SIZE, node);
if (!p) if (!p)
return 0; return NULL;
pmd_populate_kernel(&init_mm, pmd, p); pmd_populate_kernel(&init_mm, pmd, p);
} }
return pmd; return pmd;
@ -101,7 +101,7 @@ pud_t * __meminit vmemmap_pud_populate(pgd_t *pgd, unsigned long addr, int node)
if (pud_none(*pud)) { if (pud_none(*pud)) {
void *p = vmemmap_alloc_block(PAGE_SIZE, node); void *p = vmemmap_alloc_block(PAGE_SIZE, node);
if (!p) if (!p)
return 0; return NULL;
pud_populate(&init_mm, pud, p); pud_populate(&init_mm, pud, p);
} }
return pud; return pud;
@ -113,7 +113,7 @@ pgd_t * __meminit vmemmap_pgd_populate(unsigned long addr, int node)
if (pgd_none(*pgd)) { if (pgd_none(*pgd)) {
void *p = vmemmap_alloc_block(PAGE_SIZE, node); void *p = vmemmap_alloc_block(PAGE_SIZE, node);
if (!p) if (!p)
return 0; return NULL;
pgd_populate(&init_mm, pgd, p); pgd_populate(&init_mm, pgd, p);
} }
return pgd; return pgd;