From: Julia Lawall <julia.lawall@lip6.fr>
To: Joe Perches <joe@perches.com>
Cc: Julia Lawall <julia.lawall@lip6.fr>,
David Miller <davem@davemloft.net>,
peter.senna@gmail.com, shemminger@vyatta.com,
mlindner@marvell.com, kernel-janitors@vger.kernel.org,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 19/20] drivers/net/ethernet/marvell/skge.c: fix error return code
Date: Fri, 5 Oct 2012 10:08:47 +0200 (CEST) [thread overview]
Message-ID: <alpine.DEB.2.02.1210051003120.1958@localhost6.localdomain6> (raw)
In-Reply-To: <1349422595.2008.55.camel@joe-AO722>
On Fri, 5 Oct 2012, Joe Perches wrote:
> On Fri, 2012-10-05 at 07:22 +0200, Julia Lawall wrote:
>> A tool was used to find a potential problem, and then Peter
>> studied the code to see what fix was appropriate.
>
> Hi Julia.
>
> Was it true that a static analysis tool found the original
> potential issue? If so, what tool was it?
In the very beginning, I think that I found the problem in a patch when
looking at patches that contain oopses.
>From that I wrote a Coccinelle rule. As Peter showed, the rule just
produces a list of line numbers. The fix cannot easily be automated,
because there are many cases where 0 is a valid error value. Some
functions, for example, have their error value as a nonpositive integer.
> But wasn't the scripted fix applied to the rest of the tree
> robotically?
No. Peter studied each case and considered what should be done, and then
did that. I guess a potentially bad fix could have been applied
automatically and then cleaned up manually, but considering the number of
cases where the fix would be wrong, that seem like a bad idea. Also one
might want to adapt a bit to local conventions about where the
initialization should be added.
julia
next prev parent reply other threads:[~2012-10-05 8:08 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-03 16:18 [PATCH 19/20] drivers/net/ethernet/marvell/skge.c: fix error return code Peter Senna Tschudin
2012-10-03 16:25 ` Stephen Hemminger
2012-10-03 18:48 ` David Miller
2012-10-04 9:05 ` Peter Senna Tschudin
2012-10-04 14:44 ` Stephen Hemminger
2012-10-04 17:32 ` Peter Senna Tschudin
2012-10-04 17:40 ` Stephen Hemminger
2012-10-04 18:13 ` Peter Senna Tschudin
2012-10-04 18:23 ` David Miller
2012-10-04 18:49 ` Peter Senna Tschudin
2012-10-04 18:54 ` David Miller
2012-10-05 0:09 ` Joe Perches
2012-10-05 5:22 ` Julia Lawall
2012-10-05 7:36 ` Joe Perches
2012-10-05 8:02 ` Dan Carpenter
2012-10-05 8:08 ` Julia Lawall [this message]
2012-10-10 17:08 ` Peter Senna Tschudin
2012-10-10 17:40 ` Ezequiel Garcia
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.DEB.2.02.1210051003120.1958@localhost6.localdomain6 \
--to=julia.lawall@lip6.fr \
--cc=davem@davemloft.net \
--cc=joe@perches.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mlindner@marvell.com \
--cc=netdev@vger.kernel.org \
--cc=peter.senna@gmail.com \
--cc=shemminger@vyatta.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox