Skip to content

Commit

Permalink
ceph: fix warning PTR_ERR_OR_ZERO can be used
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-by: "Yan, Zheng" <[email protected]>
Signed-off-by: Ilya Dryomov <[email protected]>
  • Loading branch information
Hariprasad Kelam authored and idryomov committed Jul 8, 2019
1 parent d6e4781 commit 03af439
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/ceph/export.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 03af439

Please sign in to comment.