* [PATCH] fsnotify/fdinfo: exportfs_encode_inode_fh() takes pointer as 4th argument
@ 2019-10-16 9:59 Ben Dooks (Codethink)
2019-10-17 8:33 ` Jan Kara
0 siblings, 1 reply; 2+ messages in thread
From: Ben Dooks (Codethink) @ 2019-10-16 9:59 UTC (permalink / raw)
To: linux-kernel
Cc: Ben Dooks (Codethink),
Jan Kara, Amir Goldstein, linux-fsdevel, linux-kernel
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
Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
---
Cc: Jan Kara <jack@suse.cz>
Cc: Amir Goldstein <amir73il@gmail.com>
Cc: linux-fsdevel@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
fs/notify/fdinfo.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/notify/fdinfo.c b/fs/notify/fdinfo.c
index 1e2bfd26b352..ef83f4020554 100644
--- a/fs/notify/fdinfo.c
+++ b/fs/notify/fdinfo.c
@@ -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;
--
2.23.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] fsnotify/fdinfo: exportfs_encode_inode_fh() takes pointer as 4th argument
2019-10-16 9:59 [PATCH] fsnotify/fdinfo: exportfs_encode_inode_fh() takes pointer as 4th argument Ben Dooks (Codethink)
@ 2019-10-17 8:33 ` Jan Kara
0 siblings, 0 replies; 2+ messages in thread
From: Jan Kara @ 2019-10-17 8:33 UTC (permalink / raw)
To: Ben Dooks (Codethink)
Cc: linux-kernel, Jan Kara, Amir Goldstein, linux-fsdevel, linux-kernel
On Wed 16-10-19 10:59:55, Ben Dooks (Codethink) wrote:
> 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
>
> Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
Thanks for the cleanup! Applied.
Honza
> ---
> Cc: Jan Kara <jack@suse.cz>
> Cc: Amir Goldstein <amir73il@gmail.com>
> Cc: linux-fsdevel@vger.kernel.org
> Cc: linux-kernel@vger.kernel.org
> ---
> fs/notify/fdinfo.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/notify/fdinfo.c b/fs/notify/fdinfo.c
> index 1e2bfd26b352..ef83f4020554 100644
> --- a/fs/notify/fdinfo.c
> +++ b/fs/notify/fdinfo.c
> @@ -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;
> --
> 2.23.0
>
--
Jan Kara <jack@suse.com>
SUSE Labs, CR
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-10-17 8:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-16 9:59 [PATCH] fsnotify/fdinfo: exportfs_encode_inode_fh() takes pointer as 4th argument Ben Dooks (Codethink)
2019-10-17 8:33 ` Jan Kara
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).