[PATCH] fix ptr_ret.cocci warnings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: kbuild test robot <fengguang.wu@xxxxxxxxx>

fs/nfs/nfs4file.c:345:12-18: WARNING: PTR_ERR_OR_ZERO can be used


 Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR

Generated by: scripts/coccinelle/api/ptr_ret.cocci

Fixes: 53b276379386 ("NFS inter ssc open")
CC: Olga Kornievskaia <kolga@xxxxxxxxxx>
Signed-off-by: kbuild test robot <fengguang.wu@xxxxxxxxx>
---

url:    https://github.com/0day-ci/linux/commits/Olga-Kornievskaia/client-side-support-for-inter-SSC-copy/20181025-043859
base:   git://git.linux-nfs.org/projects/trondmy/linux-nfs.git linux-next

 nfs4file.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/fs/nfs/nfs4file.c
+++ b/fs/nfs/nfs4file.c
@@ -342,7 +342,7 @@ nfs42_ssc_open(struct vfsmount *ss_mnt,
 	res = filep;
 out:
 	dprintk("<-- %s error %ld filep %p r_ino %p\n",
-		__func__, IS_ERR(res) ? PTR_ERR(res) : 0, res, r_ino);
+		__func__, PTR_ERR_OR_ZERO(res), res, r_ino);
 
 	return res;
 out_stateowner:



[Index of Archives]     [Linux Filesystems Devel]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux