diff options
-rw-r--r-- | fs/reiserfs/do_balan.c | 8 | ||||
-rw-r--r-- | fs/reiserfs/fix_node.c | 8 | ||||
-rw-r--r-- | fs/reiserfs/lbalance.c | 2 | ||||
-rw-r--r-- | fs/reiserfs/namei.c | 2 | ||||
-rw-r--r-- | fs/smbfs/smbiod.c | 2 | ||||
-rw-r--r-- | kernel/cgroup.c | 4 | ||||
-rw-r--r-- | kernel/futex.c | 2 | ||||
-rw-r--r-- | mm/sparse-vmemmap.c | 8 |
8 files changed, 19 insertions, 17 deletions
diff --git a/fs/reiserfs/do_balan.c b/fs/reiserfs/do_balan.c index f85c5cf4934c..7ee4208793b6 100644 --- a/fs/reiserfs/do_balan.c +++ b/fs/reiserfs/do_balan.c | |||
@@ -283,7 +283,7 @@ static int balance_leaf(struct tree_balance *tb, struct item_head *ih, /* item h | |||
283 | return balance_leaf_when_delete(tb, flag); | 283 | return balance_leaf_when_delete(tb, flag); |
284 | 284 | ||
285 | zeros_num = 0; | 285 | zeros_num = 0; |
286 | if (flag == M_INSERT && body == 0) | 286 | if (flag == M_INSERT && !body) |
287 | zeros_num = ih_item_len(ih); | 287 | zeros_num = ih_item_len(ih); |
288 | 288 | ||
289 | pos_in_item = tb->tb_path->pos_in_item; | 289 | pos_in_item = tb->tb_path->pos_in_item; |
@@ -1728,7 +1728,7 @@ struct buffer_head *get_FEB(struct tree_balance *tb) | |||
1728 | struct buffer_info bi; | 1728 | struct buffer_info bi; |
1729 | 1729 | ||
1730 | for (i = 0; i < MAX_FEB_SIZE; i++) | 1730 | for (i = 0; i < MAX_FEB_SIZE; i++) |
1731 | if (tb->FEB[i] != 0) | 1731 | if (tb->FEB[i] != NULL) |
1732 | break; | 1732 | break; |
1733 | 1733 | ||
1734 | if (i == MAX_FEB_SIZE) | 1734 | if (i == MAX_FEB_SIZE) |
@@ -1827,7 +1827,7 @@ int get_left_neighbor_position(struct tree_balance *tb, int h) | |||
1827 | { | 1827 | { |
1828 | int Sh_position = PATH_H_POSITION(tb->tb_path, h + 1); | 1828 | int Sh_position = PATH_H_POSITION(tb->tb_path, h + 1); |
1829 | 1829 | ||
1830 | RFALSE(PATH_H_PPARENT(tb->tb_path, h) == 0 || tb->FL[h] == 0, | 1830 | RFALSE(PATH_H_PPARENT(tb->tb_path, h) == NULL || tb->FL[h] == NULL, |
1831 | "vs-12325: FL[%d](%p) or F[%d](%p) does not exist", | 1831 | "vs-12325: FL[%d](%p) or F[%d](%p) does not exist", |
1832 | h, tb->FL[h], h, PATH_H_PPARENT(tb->tb_path, h)); | 1832 | h, tb->FL[h], h, PATH_H_PPARENT(tb->tb_path, h)); |
1833 | 1833 | ||
@@ -1841,7 +1841,7 @@ int get_right_neighbor_position(struct tree_balance *tb, int h) | |||
1841 | { | 1841 | { |
1842 | int Sh_position = PATH_H_POSITION(tb->tb_path, h + 1); | 1842 | int Sh_position = PATH_H_POSITION(tb->tb_path, h + 1); |
1843 | 1843 | ||
1844 | RFALSE(PATH_H_PPARENT(tb->tb_path, h) == 0 || tb->FR[h] == 0, | 1844 | RFALSE(PATH_H_PPARENT(tb->tb_path, h) == NULL || tb->FR[h] == NULL, |
1845 | "vs-12330: F[%d](%p) or FR[%d](%p) does not exist", | 1845 | "vs-12330: F[%d](%p) or FR[%d](%p) does not exist", |
1846 | h, PATH_H_PPARENT(tb->tb_path, h), h, tb->FR[h]); | 1846 | h, PATH_H_PPARENT(tb->tb_path, h), h, tb->FR[h]); |
1847 | 1847 | ||
diff --git a/fs/reiserfs/fix_node.c b/fs/reiserfs/fix_node.c index 0ee35c6c9b72..07d05e0842b7 100644 --- a/fs/reiserfs/fix_node.c +++ b/fs/reiserfs/fix_node.c | |||
@@ -153,7 +153,7 @@ static void create_virtual_node(struct tree_balance *tb, int h) | |||
153 | if (vn->vn_mode == M_INSERT) { | 153 | if (vn->vn_mode == M_INSERT) { |
154 | struct virtual_item *vi = vn->vn_vi + vn->vn_affected_item_num; | 154 | struct virtual_item *vi = vn->vn_vi + vn->vn_affected_item_num; |
155 | 155 | ||
156 | RFALSE(vn->vn_ins_ih == 0, | 156 | RFALSE(vn->vn_ins_ih == NULL, |
157 | "vs-8040: item header of inserted item is not specified"); | 157 | "vs-8040: item header of inserted item is not specified"); |
158 | vi->vi_item_len = tb->insert_size[0]; | 158 | vi->vi_item_len = tb->insert_size[0]; |
159 | vi->vi_ih = vn->vn_ins_ih; | 159 | vi->vi_ih = vn->vn_ins_ih; |
@@ -857,7 +857,8 @@ static int get_lfree(struct tree_balance *tb, int h) | |||
857 | struct buffer_head *l, *f; | 857 | struct buffer_head *l, *f; |
858 | int order; | 858 | int order; |
859 | 859 | ||
860 | if ((f = PATH_H_PPARENT(tb->tb_path, h)) == 0 || (l = tb->FL[h]) == 0) | 860 | if ((f = PATH_H_PPARENT(tb->tb_path, h)) == NULL || |
861 | (l = tb->FL[h]) == NULL) | ||
861 | return 0; | 862 | return 0; |
862 | 863 | ||
863 | if (f == l) | 864 | if (f == l) |
@@ -878,7 +879,8 @@ static int get_rfree(struct tree_balance *tb, int h) | |||
878 | struct buffer_head *r, *f; | 879 | struct buffer_head *r, *f; |
879 | int order; | 880 | int order; |
880 | 881 | ||
881 | if ((f = PATH_H_PPARENT(tb->tb_path, h)) == 0 || (r = tb->FR[h]) == 0) | 882 | if ((f = PATH_H_PPARENT(tb->tb_path, h)) == NULL || |
883 | (r = tb->FR[h]) == NULL) | ||
882 | return 0; | 884 | return 0; |
883 | 885 | ||
884 | if (f == r) | 886 | if (f == r) |
diff --git a/fs/reiserfs/lbalance.c b/fs/reiserfs/lbalance.c index 281f8061ac58..6de060a6aa7f 100644 --- a/fs/reiserfs/lbalance.c +++ b/fs/reiserfs/lbalance.c | |||
@@ -626,7 +626,7 @@ static void leaf_define_dest_src_infos(int shift_mode, struct tree_balance *tb, | |||
626 | "vs-10250: leaf_define_dest_src_infos: shift type is unknown (%d)", | 626 | "vs-10250: leaf_define_dest_src_infos: shift type is unknown (%d)", |
627 | shift_mode); | 627 | shift_mode); |
628 | } | 628 | } |
629 | RFALSE(src_bi->bi_bh == 0 || dest_bi->bi_bh == 0, | 629 | RFALSE(!src_bi->bi_bh || !dest_bi->bi_bh, |
630 | "vs-10260: mode==%d, source (%p) or dest (%p) buffer is initialized incorrectly", | 630 | "vs-10260: mode==%d, source (%p) or dest (%p) buffer is initialized incorrectly", |
631 | shift_mode, src_bi->bi_bh, dest_bi->bi_bh); | 631 | shift_mode, src_bi->bi_bh, dest_bi->bi_bh); |
632 | } | 632 | } |
diff --git a/fs/reiserfs/namei.c b/fs/reiserfs/namei.c index b378eea332ca..8867533cb727 100644 --- a/fs/reiserfs/namei.c +++ b/fs/reiserfs/namei.c | |||
@@ -452,7 +452,7 @@ static int reiserfs_add_entry(struct reiserfs_transaction_handle *th, | |||
452 | buflen = DEH_SIZE + ROUND_UP(namelen); | 452 | buflen = DEH_SIZE + ROUND_UP(namelen); |
453 | if (buflen > sizeof(small_buf)) { | 453 | if (buflen > sizeof(small_buf)) { |
454 | buffer = kmalloc(buflen, GFP_NOFS); | 454 | buffer = kmalloc(buflen, GFP_NOFS); |
455 | if (buffer == 0) | 455 | if (!buffer) |
456 | return -ENOMEM; | 456 | return -ENOMEM; |
457 | } else | 457 | } else |
458 | buffer = small_buf; | 458 | buffer = small_buf; |
diff --git a/fs/smbfs/smbiod.c b/fs/smbfs/smbiod.c index fae8e85af0ed..6bd9b691a463 100644 --- a/fs/smbfs/smbiod.c +++ b/fs/smbfs/smbiod.c | |||
@@ -206,7 +206,7 @@ int smbiod_retry(struct smb_sb_info *server) | |||
206 | 206 | ||
207 | smb_close_socket(server); | 207 | smb_close_socket(server); |
208 | 208 | ||
209 | if (pid == 0) { | 209 | if (!pid) { |
210 | /* FIXME: this is fatal, umount? */ | 210 | /* FIXME: this is fatal, umount? */ |
211 | printk(KERN_ERR "smb_retry: no connection process\n"); | 211 | printk(KERN_ERR "smb_retry: no connection process\n"); |
212 | server->state = CONN_RETRIED; | 212 | server->state = CONN_RETRIED; |
diff --git a/kernel/cgroup.c b/kernel/cgroup.c index e9c2fb01e89b..53d86b4b0ce0 100644 --- a/kernel/cgroup.c +++ b/kernel/cgroup.c | |||
@@ -2082,7 +2082,7 @@ static int cgroup_tasks_open(struct inode *unused, struct file *file) | |||
2082 | 2082 | ||
2083 | kfree(pidarray); | 2083 | kfree(pidarray); |
2084 | } else { | 2084 | } else { |
2085 | ctr->buf = 0; | 2085 | ctr->buf = NULL; |
2086 | ctr->bufsz = 0; | 2086 | ctr->bufsz = 0; |
2087 | } | 2087 | } |
2088 | file->private_data = ctr; | 2088 | file->private_data = ctr; |
@@ -2614,7 +2614,7 @@ static int proc_cgroupstats_show(struct seq_file *m, void *v) | |||
2614 | 2614 | ||
2615 | static int cgroupstats_open(struct inode *inode, struct file *file) | 2615 | static int cgroupstats_open(struct inode *inode, struct file *file) |
2616 | { | 2616 | { |
2617 | return single_open(file, proc_cgroupstats_show, 0); | 2617 | return single_open(file, proc_cgroupstats_show, NULL); |
2618 | } | 2618 | } |
2619 | 2619 | ||
2620 | static struct file_operations proc_cgroupstats_operations = { | 2620 | static struct file_operations proc_cgroupstats_operations = { |
diff --git a/kernel/futex.c b/kernel/futex.c index 87a6428cb5b6..e43945e995f5 100644 --- a/kernel/futex.c +++ b/kernel/futex.c | |||
@@ -281,7 +281,7 @@ static int get_futex_key(u32 __user *uaddr, struct rw_semaphore *fshared, | |||
281 | */ | 281 | */ |
282 | static void get_futex_key_refs(union futex_key *key) | 282 | static void get_futex_key_refs(union futex_key *key) |
283 | { | 283 | { |
284 | if (key->both.ptr == 0) | 284 | if (key->both.ptr == NULL) |
285 | return; | 285 | return; |
286 | switch (key->both.offset & (FUT_OFF_INODE|FUT_OFF_MMSHARED)) { | 286 | switch (key->both.offset & (FUT_OFF_INODE|FUT_OFF_MMSHARED)) { |
287 | case FUT_OFF_INODE: | 287 | case FUT_OFF_INODE: |
diff --git a/mm/sparse-vmemmap.c b/mm/sparse-vmemmap.c index cd75b21dd4c3..99c4f36eb8a3 100644 --- a/mm/sparse-vmemmap.c +++ b/mm/sparse-vmemmap.c | |||
@@ -76,7 +76,7 @@ pte_t * __meminit vmemmap_pte_populate(pmd_t *pmd, unsigned long addr, int node) | |||
76 | pte_t entry; | 76 | pte_t entry; |
77 | void *p = vmemmap_alloc_block(PAGE_SIZE, node); | 77 | void *p = vmemmap_alloc_block(PAGE_SIZE, node); |
78 | if (!p) | 78 | if (!p) |
79 | return 0; | 79 | return NULL; |
80 | entry = pfn_pte(__pa(p) >> PAGE_SHIFT, PAGE_KERNEL); | 80 | entry = pfn_pte(__pa(p) >> PAGE_SHIFT, PAGE_KERNEL); |
81 | set_pte_at(&init_mm, addr, pte, entry); | 81 | set_pte_at(&init_mm, addr, pte, entry); |
82 | } | 82 | } |
@@ -89,7 +89,7 @@ pmd_t * __meminit vmemmap_pmd_populate(pud_t *pud, unsigned long addr, int node) | |||
89 | if (pmd_none(*pmd)) { | 89 | if (pmd_none(*pmd)) { |
90 | void *p = vmemmap_alloc_block(PAGE_SIZE, node); | 90 | void *p = vmemmap_alloc_block(PAGE_SIZE, node); |
91 | if (!p) | 91 | if (!p) |
92 | return 0; | 92 | return NULL; |
93 | pmd_populate_kernel(&init_mm, pmd, p); | 93 | pmd_populate_kernel(&init_mm, pmd, p); |
94 | } | 94 | } |
95 | return pmd; | 95 | return pmd; |
@@ -101,7 +101,7 @@ pud_t * __meminit vmemmap_pud_populate(pgd_t *pgd, unsigned long addr, int node) | |||
101 | if (pud_none(*pud)) { | 101 | if (pud_none(*pud)) { |
102 | void *p = vmemmap_alloc_block(PAGE_SIZE, node); | 102 | void *p = vmemmap_alloc_block(PAGE_SIZE, node); |
103 | if (!p) | 103 | if (!p) |
104 | return 0; | 104 | return NULL; |
105 | pud_populate(&init_mm, pud, p); | 105 | pud_populate(&init_mm, pud, p); |
106 | } | 106 | } |
107 | return pud; | 107 | return pud; |
@@ -113,7 +113,7 @@ pgd_t * __meminit vmemmap_pgd_populate(unsigned long addr, int node) | |||
113 | if (pgd_none(*pgd)) { | 113 | if (pgd_none(*pgd)) { |
114 | void *p = vmemmap_alloc_block(PAGE_SIZE, node); | 114 | void *p = vmemmap_alloc_block(PAGE_SIZE, node); |
115 | if (!p) | 115 | if (!p) |
116 | return 0; | 116 | return NULL; |
117 | pgd_populate(&init_mm, pgd, p); | 117 | pgd_populate(&init_mm, pgd, p); |
118 | } | 118 | } |
119 | return pgd; | 119 | return pgd; |