LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] ceph: fix warning PTR_ERR_OR_ZERO can be used
@ 2019-05-25 9:15 Hariprasad Kelam
2019-05-25 12:07 ` Yan, Zheng
0 siblings, 1 reply; 2+ messages in thread
From: Hariprasad Kelam @ 2019-05-25 9:15 UTC (permalink / raw)
To: Yan, Zheng, Sage Weil, Ilya Dryomov, ceph-devel, linux-kernel
change1: fix below warning reported by coccicheck
/fs/ceph/export.c:371:33-39: WARNING: PTR_ERR_OR_ZERO can be used
change2: typecasted PTR_ERR_OR_ZERO to long as dout expecting long
Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
---
fs/ceph/export.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/ceph/export.c b/fs/ceph/export.c
index d3ef7ee42..15ff1b0 100644
--- a/fs/ceph/export.c
+++ b/fs/ceph/export.c
@@ -368,7 +368,7 @@ static struct dentry *ceph_get_parent(struct dentry *child)
}
out:
dout("get_parent %p ino %llx.%llx err=%ld\n",
- child, ceph_vinop(inode), (IS_ERR(dn) ? PTR_ERR(dn) : 0));
+ child, ceph_vinop(inode), (long)PTR_ERR_OR_ZERO(dn));
return dn;
}
--
2.7.4
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] ceph: fix warning PTR_ERR_OR_ZERO can be used
2019-05-25 9:15 [PATCH] ceph: fix warning PTR_ERR_OR_ZERO can be used Hariprasad Kelam
@ 2019-05-25 12:07 ` Yan, Zheng
0 siblings, 0 replies; 2+ messages in thread
From: Yan, Zheng @ 2019-05-25 12:07 UTC (permalink / raw)
To: Hariprasad Kelam, Sage Weil, Ilya Dryomov, ceph-devel, linux-kernel
On 5/25/19 5:15 PM, Hariprasad Kelam wrote:
> change1: fix below warning reported by coccicheck
>
> /fs/ceph/export.c:371:33-39: WARNING: PTR_ERR_OR_ZERO can be used
>
> change2: typecasted PTR_ERR_OR_ZERO to long as dout expecting long
>
> Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
> ---
> fs/ceph/export.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/ceph/export.c b/fs/ceph/export.c
> index d3ef7ee42..15ff1b0 100644
> --- a/fs/ceph/export.c
> +++ b/fs/ceph/export.c
> @@ -368,7 +368,7 @@ static struct dentry *ceph_get_parent(struct dentry *child)
> }
> out:
> dout("get_parent %p ino %llx.%llx err=%ld\n",
> - child, ceph_vinop(inode), (IS_ERR(dn) ? PTR_ERR(dn) : 0));
> + child, ceph_vinop(inode), (long)PTR_ERR_OR_ZERO(dn));
> return dn;
> }
>
>
Applied.
Thanks
Yan, Zheng
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-05-25 12:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-25 9:15 [PATCH] ceph: fix warning PTR_ERR_OR_ZERO can be used Hariprasad Kelam
2019-05-25 12:07 ` Yan, Zheng
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).