From: Doug Ledford <dledford@redhat.com>
To: Julia Lawall <Julia.Lawall@lip6.fr>,
Christian Benvenuti <benve@cisco.com>
Cc: kernel-janitors@vger.kernel.org,
Dave Goodell <dgoodell@cisco.com>,
Sean Hefty <sean.hefty@intel.com>,
Hal Rosenstock <hal.rosenstock@gmail.com>,
linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org,
Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Subject: Re: [PATCH] IB/usnic: simplify IS_ERR_OR_NULL to IS_ERR
Date: Wed, 14 Dec 2016 12:58:51 -0500 [thread overview]
Message-ID: <2c990f6c-d9a6-9887-c6df-bfc45c5ce6cc@redhat.com> (raw)
In-Reply-To: <1478891066-16093-1-git-send-email-Julia.Lawall@lip6.fr>
[-- Attachment #1.1: Type: text/plain, Size: 931 bytes --]
On 11/11/2016 2:04 PM, Julia Lawall wrote:
> The function usnic_ib_qp_grp_get_chunk only returns an ERR_PTR value or a
> valid pointer, never NULL. The same is true of get_qp_res_chunk, which
> just returns the result of calling usnic_ib_qp_grp_get_chunk. Simplify
> IS_ERR_OR_NULL to IS_ERR in both cases.
>
> The semantic patch that makes this change is as follows:
> (http://coccinelle.lip6.fr/)
>
> // <smpl>
> @@
> expression t,e;
> @@
>
> t = \(usnic_ib_qp_grp_get_chunk(...)\|get_qp_res_chunk(...)\)
> ... when != t=e
> - IS_ERR_OR_NULL(t)
> + IS_ERR(t)
>
> @@
> expression t,e,e1;
> @@
>
> t = \(usnic_ib_qp_grp_get_chunk(...)\|get_qp_res_chunk(...)\)
> ... when != t=e
> ?- t ? PTR_ERR(t) : e1
> + PTR_ERR(t)
> ... when any
> // </smpl>
>
> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Thanks, applied.
--
Doug Ledford <dledford@redhat.com>
GPG Key ID: 0E572FDD
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 884 bytes --]
prev parent reply other threads:[~2016-12-14 17:58 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-11 19:04 [PATCH] IB/usnic: simplify IS_ERR_OR_NULL to IS_ERR Julia Lawall
2016-11-14 6:00 ` Leon Romanovsky
2016-12-14 17:58 ` Doug Ledford [this message]
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=2c990f6c-d9a6-9887-c6df-bfc45c5ce6cc@redhat.com \
--to=dledford@redhat.com \
--cc=Julia.Lawall@lip6.fr \
--cc=benve@cisco.com \
--cc=christophe.jaillet@wanadoo.fr \
--cc=dgoodell@cisco.com \
--cc=hal.rosenstock@gmail.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=sean.hefty@intel.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;
as well as URLs for NNTP newsgroup(s).