Skip to contentSkip to conversation

ext4/extents.c: quiet sparse noise about plain integer as NULL pointer

PATCH Applied H Hartley Sweeten 2 participants 2 messages Sep 23, 2011 – Oct 12, 2011 ext4 file system

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ext4/extents.c: quiet sparse noise about plain integer as NULL pointer

The third parameter to ext4_free_blocks is a struct buffer_head *. This parameter should be NULL not 0.

This quiets the sparse noise:

warning: Using plain integer as NULL pointer

Cc "Theodore Ts'o" <[email protected]>
Cc Andreas Dilger <[email protected]>

---

fs/ext4/extents.c +1 -1
index 57cf568..97e8d2b 100644
@@ -2238,7 +2238,7 @@ static int ext4_remove_blocks(handle_t *handle, struct inode *inode,
 		start = ext4_ext_pblock(ex);
 
 		ext_debug("free first %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 {
 		printk(KERN_INFO "strange request: removal(2) "