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
@@ -263,7 +263,7 @@ static int free_dind_blocks(handle_t *handle,
|
||||
for (i = 0; i < max_entries; i++) {
|
||||
if (tmp_idata[i]) {
|
||||
extend_credit_for_blkdel(handle, inode);
|
||||
ext4_free_blocks(handle, inode, 0,
|
||||
ext4_free_blocks(handle, inode, NULL,
|
||||
le32_to_cpu(tmp_idata[i]), 1,
|
||||
EXT4_FREE_BLOCKS_METADATA |
|
||||
EXT4_FREE_BLOCKS_FORGET);
|
||||
@@ -271,7 +271,7 @@ static int free_dind_blocks(handle_t *handle,
|
||||
}
|
||||
put_bh(bh);
|
||||
extend_credit_for_blkdel(handle, inode);
|
||||
ext4_free_blocks(handle, inode, 0, le32_to_cpu(i_data), 1,
|
||||
ext4_free_blocks(handle, inode, NULL, le32_to_cpu(i_data), 1,
|
||||
EXT4_FREE_BLOCKS_METADATA |
|
||||
EXT4_FREE_BLOCKS_FORGET);
|
||||
return 0;
|
||||
@@ -302,7 +302,7 @@ static int free_tind_blocks(handle_t *handle,
|
||||
}
|
||||
put_bh(bh);
|
||||
extend_credit_for_blkdel(handle, inode);
|
||||
ext4_free_blocks(handle, inode, 0, le32_to_cpu(i_data), 1,
|
||||
ext4_free_blocks(handle, inode, NULL, le32_to_cpu(i_data), 1,
|
||||
EXT4_FREE_BLOCKS_METADATA |
|
||||
EXT4_FREE_BLOCKS_FORGET);
|
||||
return 0;
|
||||
@@ -315,7 +315,7 @@ static int free_ind_block(handle_t *handle, struct inode *inode, __le32 *i_data)
|
||||
/* ei->i_data[EXT4_IND_BLOCK] */
|
||||
if (i_data[0]) {
|
||||
extend_credit_for_blkdel(handle, inode);
|
||||
ext4_free_blocks(handle, inode, 0,
|
||||
ext4_free_blocks(handle, inode, NULL,
|
||||
le32_to_cpu(i_data[0]), 1,
|
||||
EXT4_FREE_BLOCKS_METADATA |
|
||||
EXT4_FREE_BLOCKS_FORGET);
|
||||
@@ -428,7 +428,7 @@ static int free_ext_idx(handle_t *handle, struct inode *inode,
|
||||
}
|
||||
put_bh(bh);
|
||||
extend_credit_for_blkdel(handle, inode);
|
||||
ext4_free_blocks(handle, inode, 0, block, 1,
|
||||
ext4_free_blocks(handle, inode, NULL, block, 1,
|
||||
EXT4_FREE_BLOCKS_METADATA | EXT4_FREE_BLOCKS_FORGET);
|
||||
return retval;
|
||||
}
|
||||
|
Reference in New Issue
Block a user