ext4: Fix sparse warning: Using plain integer as NULL pointer
This patch fixes the warning "Using plain integer as NULL pointer", generated by sparse, by replacing the offending 0s with NULL. Signed-off-by: Peter Huewe <peterhuewe@gmx.de> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
This commit is contained in:
committed by
Theodore Ts'o
parent
da488945f4
commit
7dc576158d
@@ -1034,7 +1034,7 @@ cleanup:
|
||||
for (i = 0; i < depth; i++) {
|
||||
if (!ablocks[i])
|
||||
continue;
|
||||
ext4_free_blocks(handle, inode, 0, ablocks[i], 1,
|
||||
ext4_free_blocks(handle, inode, NULL, ablocks[i], 1,
|
||||
EXT4_FREE_BLOCKS_METADATA);
|
||||
}
|
||||
}
|
||||
@@ -2059,7 +2059,7 @@ static int ext4_ext_rm_idx(handle_t *handle, struct inode *inode,
|
||||
if (err)
|
||||
return err;
|
||||
ext_debug("index is empty, remove it, free block %llu\n", leaf);
|
||||
ext4_free_blocks(handle, inode, 0, leaf, 1,
|
||||
ext4_free_blocks(handle, inode, NULL, leaf, 1,
|
||||
EXT4_FREE_BLOCKS_METADATA | EXT4_FREE_BLOCKS_FORGET);
|
||||
return err;
|
||||
}
|
||||
@@ -2156,7 +2156,7 @@ static int ext4_remove_blocks(handle_t *handle, struct inode *inode,
|
||||
num = le32_to_cpu(ex->ee_block) + ee_len - from;
|
||||
start = ext4_ext_pblock(ex) + ee_len - num;
|
||||
ext_debug("free last %u blocks starting %llu\n", num, start);
|
||||
ext4_free_blocks(handle, inode, 0, start, num, flags);
|
||||
ext4_free_blocks(handle, inode, NULL, start, num, flags);
|
||||
} else if (from == le32_to_cpu(ex->ee_block)
|
||||
&& to <= le32_to_cpu(ex->ee_block) + ee_len - 1) {
|
||||
printk(KERN_INFO "strange request: removal %u-%u from %u:%u\n",
|
||||
@@ -3485,7 +3485,7 @@ int ext4_ext_map_blocks(handle_t *handle, struct inode *inode,
|
||||
/* not a good idea to call discard here directly,
|
||||
* but otherwise we'd need to call it every free() */
|
||||
ext4_discard_preallocations(inode);
|
||||
ext4_free_blocks(handle, inode, 0, ext4_ext_pblock(&newex),
|
||||
ext4_free_blocks(handle, inode, NULL, ext4_ext_pblock(&newex),
|
||||
ext4_ext_get_actual_len(&newex), 0);
|
||||
goto out2;
|
||||
}
|
||||
|
Reference in New Issue
Block a user