linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ocfs2: fix a static checker warning
@ 2017-05-22  4:54 Gang He
  2017-05-22  9:14 ` [Ocfs2-devel] " Joseph Qi
  2017-05-22 21:20 ` Andrew Morton
  0 siblings, 2 replies; 3+ messages in thread
From: Gang He @ 2017-05-22  4:54 UTC (permalink / raw)
  To: mfasheh, jlbec; +Cc: Gang He, linux-kernel, ocfs2-devel, akpm

This patch will fix a static checker warning, this warning was
caused by commit d56a8f32e4c662509ce50a37e78fa66c777977d3. after
apply this patch, the error return value will not be NULL(zero).

Signed-off-by: Gang He <ghe@suse.com>
---
 fs/ocfs2/inode.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/ocfs2/inode.c b/fs/ocfs2/inode.c
index 382401d..1a1e007 100644
--- a/fs/ocfs2/inode.c
+++ b/fs/ocfs2/inode.c
@@ -136,7 +136,7 @@ struct inode *ocfs2_ilookup(struct super_block *sb, u64 blkno)
 struct inode *ocfs2_iget(struct ocfs2_super *osb, u64 blkno, unsigned flags,
 			 int sysfile_type)
 {
-	int rc = 0;
+	int rc = -ESTALE;
 	struct inode *inode = NULL;
 	struct super_block *sb = osb->sb;
 	struct ocfs2_find_inode_args args;
-- 
1.8.5.6

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

* Re: [Ocfs2-devel] [PATCH] ocfs2: fix a static checker warning
  2017-05-22  4:54 [PATCH] ocfs2: fix a static checker warning Gang He
@ 2017-05-22  9:14 ` Joseph Qi
  2017-05-22 21:20 ` Andrew Morton
  1 sibling, 0 replies; 3+ messages in thread
From: Joseph Qi @ 2017-05-22  9:14 UTC (permalink / raw)
  To: Gang He, mfasheh, jlbec; +Cc: linux-kernel, ocfs2-devel



On 17/5/22 12:54, Gang He wrote:
> This patch will fix a static checker warning, this warning was
> caused by commit d56a8f32e4c662509ce50a37e78fa66c777977d3. after
> apply this patch, the error return value will not be NULL(zero).
> 
> Signed-off-by: Gang He <ghe@suse.com>
Reviewed-by: Joseph Qi <jiangqi903@gmail.com>

Thanks,
Joseph
> ---
>  fs/ocfs2/inode.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/ocfs2/inode.c b/fs/ocfs2/inode.c
> index 382401d..1a1e007 100644
> --- a/fs/ocfs2/inode.c
> +++ b/fs/ocfs2/inode.c
> @@ -136,7 +136,7 @@ struct inode *ocfs2_ilookup(struct super_block *sb, u64 blkno)
>  struct inode *ocfs2_iget(struct ocfs2_super *osb, u64 blkno, unsigned flags,
>  			 int sysfile_type)
>  {
> -	int rc = 0;
> +	int rc = -ESTALE;
>  	struct inode *inode = NULL;
>  	struct super_block *sb = osb->sb;
>  	struct ocfs2_find_inode_args args;
> 

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

* Re: [PATCH] ocfs2: fix a static checker warning
  2017-05-22  4:54 [PATCH] ocfs2: fix a static checker warning Gang He
  2017-05-22  9:14 ` [Ocfs2-devel] " Joseph Qi
@ 2017-05-22 21:20 ` Andrew Morton
  1 sibling, 0 replies; 3+ messages in thread
From: Andrew Morton @ 2017-05-22 21:20 UTC (permalink / raw)
  To: Gang He; +Cc: mfasheh, jlbec, linux-kernel, ocfs2-devel

On Mon, 22 May 2017 12:54:37 +0800 Gang He <ghe@suse.com> wrote:

> This patch will fix a static checker warning, this warning was
> caused by commit d56a8f32e4c662509ce50a37e78fa66c777977d3. after
> apply this patch, the error return value will not be NULL(zero).

When identifying another commit, please use the form

d56a8f32e4c6 ("ocfs2: check/fix inode block for online file check")


And when fixing warnings such as this, please quote the warning in full
and identify which checker tool generated that warning.

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

end of thread, other threads:[~2017-05-22 21:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-22  4:54 [PATCH] ocfs2: fix a static checker warning Gang He
2017-05-22  9:14 ` [Ocfs2-devel] " Joseph Qi
2017-05-22 21:20 ` Andrew Morton

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).