Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1521342 > unrolled thread
| Started by | Leon Romanovsky <leon@kernel.org> |
|---|---|
| First post | 2016-11-14 07:10 +0100 |
| Last post | 2016-11-14 07:10 +0100 |
| Articles | 1 — 1 participant |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH] IB/usnic: simplify IS_ERR_OR_NULL to IS_ERR Leon Romanovsky <leon@kernel.org> - 2016-11-14 07:10 +0100
| From | Leon Romanovsky <leon@kernel.org> |
|---|---|
| Date | 2016-11-14 07:10 +0100 |
| Subject | Re: [PATCH] IB/usnic: simplify IS_ERR_OR_NULL to IS_ERR |
| Message-ID | <sDiCS-37w-19@gated-at.bofh.it> |
[Multipart message — attachments visible in raw view] — view raw
On Fri, Nov 11, 2016 at 08:04:26PM +0100, 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, Julia. Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
Back to top | Article view | linux.kernel
csiph-web