diff options
author | Julia Lawall <Julia.Lawall@lip6.fr> | 2016-11-11 20:04:26 +0100 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2016-12-14 12:57:54 -0500 |
commit | 5f4c7e4eb5f36974ed46a485290f5d01ace5fdba (patch) | |
tree | c795a84cd9b9cdd323f0c082f0f316bf05f933aa /Documentation | |
parent | 9315bc9a133011fdb084f2626b86db3ebb64661f (diff) |
IB/usnic: simplify IS_ERR_OR_NULL to IS_ERR
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>
Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'Documentation')
0 files changed, 0 insertions, 0 deletions