public inbox for linux-nfs@vger.kernel.org
 help / color / mirror / Atom feed
From: kbuild test robot <fengguang.wu@intel.com>
To: Trond Myklebust <trond.myklebust@primarydata.com>
Cc: kbuild-all@01.org, Jeff Layton <jeff.layton@primarydata.com>,
	Peng Tao <tao.peng@primarydata.com>,
	linux-nfs@vger.kernel.org
Subject: [PATCH] fix ptr_ret.cocci warnings
Date: Wed, 24 Jun 2015 23:00:49 +0800	[thread overview]
Message-ID: <20150624150049.GA60090@xian> (raw)
In-Reply-To: <201506242346.OCI4AVtF%fengguang.wu@intel.com>

fs/nfs/nfs42proc.c:191:1-3: 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

Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---

 nfs42proc.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

--- a/fs/nfs/nfs42proc.c
+++ b/fs/nfs/nfs42proc.c
@@ -188,7 +188,5 @@ int nfs42_proc_layoutstats_generic(struc
 
 	nfs4_init_sequence(&data->args.seq_args, &data->res.seq_res, 0);
 	task = rpc_run_task(&task_setup);
-	if (IS_ERR(task))
-		return PTR_ERR(task);
-	return 0;
+	return PTR_ERR_OR_ZERO(task);
 }

  reply	other threads:[~2015-06-24 15:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-24 15:00 [nfs:testing 41/50] fs/nfs/nfs42proc.c:191:1-3: WARNING: PTR_ERR_OR_ZERO can be used kbuild test robot
2015-06-24 15:00 ` kbuild test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2018-10-24 19:58 [PATCH v2 10/13] NFS inter ssc open Olga Kornievskaia
2018-10-25  1:31 ` [PATCH] fix ptr_ret.cocci warnings kbuild test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150624150049.GA60090@xian \
    --to=fengguang.wu@intel.com \
    --cc=jeff.layton@primarydata.com \
    --cc=kbuild-all@01.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=tao.peng@primarydata.com \
    --cc=trond.myklebust@primarydata.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox