From: Martyn Welch <martyn.welch@ge.com>
To: Dan Carpenter <error27@gmail.com>,
Manohar Vanga <manohar.vanga@cern.ch>,
devel@driverdev.osuosl.org, cota@braap.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] Staging: vme: remove unreachable code
Date: Wed, 23 Feb 2011 15:09:56 +0000 [thread overview]
Message-ID: <4D652344.1020402@ge.com> (raw)
In-Reply-To: <20110223121726.GR1898@bicker>
On 23/02/11 12:17, Dan Carpenter wrote:
> On Wed, Feb 23, 2011 at 09:19:06AM +0000, Martyn Welch wrote:
>> On 22/02/11 19:36, Manohar Vanga wrote:
>>> Remove unreachable code from vme_register_bridge
>>>
>>> Signed-off-by: Manohar Vanga <manohar.vanga@cern.ch>
>
> Please always CC the list. It's going to be Greg to commit this
> code so CC Greg as well.
>
> ./scripts/get_maintainer.pl patch.diff
>
> (Although you should generally remove Tejun from the CC list.)
>
>>
>> Yeah - that's there from development. If the function needed to be extended,
>> that's the next part of the error path.
>
> Don't do that. Kernel style is austere. Anything that isn't needed
> here and now should be removed.
>
>>> --- a/drivers/staging/vme/vme.c
>>> +++ b/drivers/staging/vme/vme.c
>>> @@ -1363,7 +1363,6 @@ int vme_register_bridge(struct vme_bridge *bridge)
>>>
>>> return retval;
>>>
>>> - i = VME_SLOTS_MAX;
>>> err_reg:
>>> while (i > -1) {
>>> dev = &bridge->dev[i];
>
> There are two problems with this loop. 1) It unregisters the device
> which failed to register. 2) It is a forever loop.
>
Even if "i" is a signed int?
> It should be:
> while (--i >= 0) {
> dev = &bridge->dev[i];
>
> Can you fix that up as well and resend.
>
> regards,
> dan carpenter
--
Martyn Welch (Principal Software Engineer) | Registered in England and
GE Intelligent Platforms | Wales (3828642) at 100
T +44(0)127322748 | Barbirolli Square, Manchester,
E martyn.welch@ge.com | M2 3AB VAT:GB 927559189
next prev parent reply other threads:[~2011-02-23 15:10 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1298403376-28352-1-git-send-email-manohar.vanga@cern.ch>
[not found] ` <1298403376-28352-2-git-send-email-manohar.vanga@cern.ch>
2011-02-23 9:19 ` [PATCH 1/2] Staging: vme: remove unreachable code Martyn Welch
2011-02-23 12:17 ` Dan Carpenter
2011-02-23 15:09 ` Martyn Welch [this message]
2011-02-23 15:16 ` Manohar Vanga
2011-02-23 15:19 ` Martyn Welch
[not found] ` <1298403376-28352-3-git-send-email-manohar.vanga@cern.ch>
2011-02-23 9:24 ` [PATCH 2/2] Staging: vme: fix potential infinite loop Manohar Vanga
2011-02-23 13:25 [PATCH 0/2] staging: vme: fix issues in vme_register_bridge Manohar Vanga
2011-02-23 13:25 ` [PATCH 1/2] staging: vme: remove unreachable code Manohar Vanga
2011-02-23 13:56 ` Dan Carpenter
2011-02-23 17:00 ` Martyn Welch
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=4D652344.1020402@ge.com \
--to=martyn.welch@ge.com \
--cc=cota@braap.org \
--cc=devel@driverdev.osuosl.org \
--cc=error27@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=manohar.vanga@cern.ch \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.