Thread (9 messages) 9 messages, 4 authors, 2015-08-25

Re: [PATCH 05/11] mlxsw: fix error return code

From: Jiri Pirko <jiri@resnulli.us>
Date: 2015-08-23 18:52:31
Also in: kernel-janitors, lkml

Sun, Aug 23, 2015 at 02:11:16AM CEST, Julia.Lawall@lip6.fr wrote:
Return a negative error code on failure.

A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@@
identifier ret; expression e1,e2;
@@
(
if (\(ret < 0\|ret != 0\))
{ ... return ret; }
|
ret = 0
)
... when != ret = e1
   when != &ret
*if(...)
{
 ... when != ret = e2
     when forall
return ret;
}
// </smpl>

Signed-off-by: Julia Lawall <redacted>
Acked-by: Jiri Pirko <redacted>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help