Skip to contentSkip to conversation

fsnotify/fdinfo: exportfs_encode_inode_fh() takes pointer as 4th argument

PATCH In review Ben Dooks (Codethink) 2 participants 2 messages Oct 16, 2019 – Oct 17, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fsnotify/fdinfo: exportfs_encode_inode_fh() takes pointer as 4th argument

The call to exportfs_encode_inode_fh() takes an pointer as the 4th argument, so replace the integer 0 with the NULL pointer.

This fixes the following sparse warning:

fs/notify/fdinfo.c:53:87: warning: Using plain integer as NULL pointer

---
Cc: Jan Kara <[email protected]>
Cc: Amir Goldstein <[email protected]>
Cc: [email protected]
Cc: [email protected]

---
 fs/notify/fdinfo.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/notify/fdinfo.c +1 -1
index 1e2bfd26b352..ef83f4020554 100644
@@ -50,7 +50,7 @@ static void show_mark_fhandle(struct seq_file *m, struct inode *inode)
 	f.handle.handle_bytes = sizeof(f.pad);
 	size = f.handle.handle_bytes >> 2;
 
-	ret = exportfs_encode_inode_fh(inode, (struct fid *)f.handle.f_handle, &size, 0);
+	ret = exportfs_encode_inode_fh(inode, (struct fid *)f.handle.f_handle, &size, NULL);
 	if ((ret == FILEID_INVALID) || (ret < 0)) {
 		WARN_ONCE(1, "Can't encode file handler for inotify: %d\n", ret);
 		return;
Signature · 1 line
2.23.0
maintainer
#1 lore raw
Quoted 9 lines · Ben Dooks (Codethink)

The call to exportfs_encode_inode_fh() takes an pointer as the 4th argument, so replace the integer 0 with the NULL pointer.

This fixes the following sparse warning:

fs/notify/fdinfo.c:53:87: warning: Using plain integer as NULL pointer

Thanks for the cleanup! Applied.

Honza

Quoted 25 lines

---
Cc: Jan Kara <[email protected]>
Cc: Amir Goldstein <[email protected]>
Cc: [email protected]
Cc: [email protected]

---
 fs/notify/fdinfo.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/notify/fdinfo.c +1 -1
index 1e2bfd26b352..ef83f4020554 100644
@@ -50,7 +50,7 @@ static void show_mark_fhandle(struct seq_file *m, struct inode *inode)
 	f.handle.handle_bytes = sizeof(f.pad);
 	size = f.handle.handle_bytes >> 2;
 
-	ret = exportfs_encode_inode_fh(inode, (struct fid *)f.handle.f_handle, &size, 0);
+	ret = exportfs_encode_inode_fh(inode, (struct fid *)f.handle.f_handle, &size, NULL);
 	if ((ret == FILEID_INVALID) || (ret < 0)) {
 		WARN_ONCE(1, "Can't encode file handler for inotify: %d\n", ret);
 		return;
Signature · 1 line
2.23.0
Signature · 2 lines
Jan Kara <[email protected]>
SUSE Labs, CR