linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] fsnotify: Use NULL instead of 0 for pointer
@ 2019-10-29 13:39 Tiezhu Yang
  2019-10-30 12:21 ` Jan Kara
  0 siblings, 1 reply; 4+ messages in thread
From: Tiezhu Yang @ 2019-10-29 13:39 UTC (permalink / raw)
  To: Jan Kara, Amir Goldstein; +Cc: linux-fsdevel, linux-kernel

Fix the following sparse warning:

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

Fixes: be77196b809c ("fs, notify: add procfs fdinfo helper")
Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
---
 fs/notify/fdinfo.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/fs/notify/fdinfo.c b/fs/notify/fdinfo.c
index 1e2bfd2..cd2846e 100644
--- a/fs/notify/fdinfo.c
+++ b/fs/notify/fdinfo.c
@@ -50,7 +50,8 @@ 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.1.0



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] fsnotify: Use NULL instead of 0 for pointer
  2019-10-29 13:39 [PATCH] fsnotify: Use NULL instead of 0 for pointer Tiezhu Yang
@ 2019-10-30 12:21 ` Jan Kara
  2019-10-30 13:12   ` Tiezhu Yang
  0 siblings, 1 reply; 4+ messages in thread
From: Jan Kara @ 2019-10-30 12:21 UTC (permalink / raw)
  To: Tiezhu Yang; +Cc: Jan Kara, Amir Goldstein, linux-fsdevel, linux-kernel

On Tue 29-10-19 21:39:02, Tiezhu Yang wrote:
> Fix the following sparse warning:
> 
> fs/notify/fdinfo.c:53:87: warning: Using plain integer as NULL pointer
> 
> Fixes: be77196b809c ("fs, notify: add procfs fdinfo helper")
> Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>

Thanks for the patch but similar patch already sits in my tree as commit
ddd06c36bdb "fsnotify/fdinfo: exportfs_encode_inode_fh() takes pointer as
4th argument". I'll send it to Linus in the next merge window.

								Honza

> ---
>  fs/notify/fdinfo.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/fs/notify/fdinfo.c b/fs/notify/fdinfo.c
> index 1e2bfd2..cd2846e 100644
> --- a/fs/notify/fdinfo.c
> +++ b/fs/notify/fdinfo.c
> @@ -50,7 +50,8 @@ 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.1.0
> 
> 
-- 
Jan Kara <jack@suse.com>
SUSE Labs, CR

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] fsnotify: Use NULL instead of 0 for pointer
  2019-10-30 12:21 ` Jan Kara
@ 2019-10-30 13:12   ` Tiezhu Yang
  2019-10-30 14:10     ` Jan Kara
  0 siblings, 1 reply; 4+ messages in thread
From: Tiezhu Yang @ 2019-10-30 13:12 UTC (permalink / raw)
  To: Jan Kara; +Cc: Amir Goldstein, linux-fsdevel, linux-kernel

On 10/30/2019 08:21 PM, Jan Kara wrote:
> On Tue 29-10-19 21:39:02, Tiezhu Yang wrote:
>> Fix the following sparse warning:
>>
>> fs/notify/fdinfo.c:53:87: warning: Using plain integer as NULL pointer
>>
>> Fixes: be77196b809c ("fs, notify: add procfs fdinfo helper")
>> Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
> Thanks for the patch but similar patch already sits in my tree as commit
> ddd06c36bdb "fsnotify/fdinfo: exportfs_encode_inode_fh() takes pointer as
> 4th argument". I'll send it to Linus in the next merge window.
>
> 								Honza

Thanks for your reply. I can not find your tree about fs/notify
in the MAINTAINERS file, so this patch is based on Linus's tree.
Sorry for the noise, you can ignore it.

By the way, could you add your tree in the MAINTAINERS file?

Thanks,

Tiezhu Yang

>
>> ---
>>   fs/notify/fdinfo.c | 3 ++-
>>   1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/fs/notify/fdinfo.c b/fs/notify/fdinfo.c
>> index 1e2bfd2..cd2846e 100644
>> --- a/fs/notify/fdinfo.c
>> +++ b/fs/notify/fdinfo.c
>> @@ -50,7 +50,8 @@ 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.1.0
>>
>>


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] fsnotify: Use NULL instead of 0 for pointer
  2019-10-30 13:12   ` Tiezhu Yang
@ 2019-10-30 14:10     ` Jan Kara
  0 siblings, 0 replies; 4+ messages in thread
From: Jan Kara @ 2019-10-30 14:10 UTC (permalink / raw)
  To: Tiezhu Yang; +Cc: Jan Kara, Amir Goldstein, linux-fsdevel, linux-kernel

On Wed 30-10-19 21:12:37, Tiezhu Yang wrote:
> On 10/30/2019 08:21 PM, Jan Kara wrote:
> > On Tue 29-10-19 21:39:02, Tiezhu Yang wrote:
> > > Fix the following sparse warning:
> > > 
> > > fs/notify/fdinfo.c:53:87: warning: Using plain integer as NULL pointer
> > > 
> > > Fixes: be77196b809c ("fs, notify: add procfs fdinfo helper")
> > > Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
> > Thanks for the patch but similar patch already sits in my tree as commit
> > ddd06c36bdb "fsnotify/fdinfo: exportfs_encode_inode_fh() takes pointer as
> > 4th argument". I'll send it to Linus in the next merge window.
> > 
> > 								Honza
> 
> Thanks for your reply. I can not find your tree about fs/notify
> in the MAINTAINERS file, so this patch is based on Linus's tree.
> Sorry for the noise, you can ignore it.
> 
> By the way, could you add your tree in the MAINTAINERS file?

Good idea! Added. Thanks!

								Honza

> > > ---
> > >   fs/notify/fdinfo.c | 3 ++-
> > >   1 file changed, 2 insertions(+), 1 deletion(-)
> > > 
> > > diff --git a/fs/notify/fdinfo.c b/fs/notify/fdinfo.c
> > > index 1e2bfd2..cd2846e 100644
> > > --- a/fs/notify/fdinfo.c
> > > +++ b/fs/notify/fdinfo.c
> > > @@ -50,7 +50,8 @@ 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.1.0
> > > 
> > > 
> 
-- 
Jan Kara <jack@suse.com>
SUSE Labs, CR

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-10-30 14:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-29 13:39 [PATCH] fsnotify: Use NULL instead of 0 for pointer Tiezhu Yang
2019-10-30 12:21 ` Jan Kara
2019-10-30 13:12   ` Tiezhu Yang
2019-10-30 14:10     ` 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).