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

2015-08-25 Thread David Miller
From: Julia Lawall julia.law...@lip6.fr Date: Sun, 23 Aug 2015 02:11:16 +0200 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/) ... Signed-off-by: Julia Lawall julia.law...@lip6.fr

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

2015-08-23 Thread Jiri Pirko
Sun, Aug 23, 2015 at 02:11:16AM CEST, julia.law...@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\)) {

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

2015-08-22 Thread Julia Lawall
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 !=