[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <506D575F.4040402@pengutronix.de>
Date: Thu, 04 Oct 2012 11:31:11 +0200
From: Marc Kleine-Budde <mkl@...gutronix.de>
To: Peter Senna Tschudin <peter.senna@...il.com>
CC: wg@...ndegger.com, kernel-janitors@...r.kernel.org,
davem@...emloft.net, jj@...osbits.net, linux-can@...r.kernel.org,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 3/20] drivers/net/can/sja1000/peak_pci.c: fix error return
code
On 10/03/2012 06:17 PM, Peter Senna Tschudin wrote:
> From: Peter Senna Tschudin <peter.senna@...il.com>
>
> Convert a nonnegative error return code to a negative one, as returned
> elsewhere in the function.
>
> A simplified version of the semantic match that finds this problem is as
> follows: (http://coccinelle.lip6.fr/)
>
> // <smpl>
> (
> if@p1 (\(ret < 0\|ret != 0\))
> { ... return ret; }
> |
> ret@p1 = 0
> )
> ... when != ret = e1
> when != &ret
> *if(...)
> {
> ... when != ret = e2
> when forall
> return ret;
> }
> // </smpl>
>
> Signed-off-by: Peter Senna Tschudin <peter.senna@...il.com>
Applied to can.
Tnx, Marc
--
Pengutronix e.K. | Marc Kleine-Budde |
Industrial Linux Solutions | Phone: +49-231-2826-924 |
Vertretung West/Dortmund | Fax: +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de |
Download attachment "signature.asc" of type "application/pgp-signature" (260 bytes)
Powered by blists - more mailing lists