From: Kulikov Vasiliy <segooon@gmail.com>
To: dkirjanov@kernel.org
Cc: Greg Kroah-Hartman <gregkh@suse.de>,
Lior Dotan <liodot@gmail.com>,
charrer@alacritech.com, "David S. Miller" <davem@davemloft.net>,
Jiri Pirko <jpirko@redhat.com>,
devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/5] staging: slicoss: Change return codes to -EYYY.
Date: Wed, 30 Jun 2010 17:02:40 +0400 [thread overview]
Message-ID: <20100630130240.GA3068@shinshilla> (raw)
In-Reply-To: <AANLkTil3gkyn5vY9o0JYluRB4qUp1hdyfOHbX97OZfGJ@mail.gmail.com>
On Mon, Jun 28, 2010 at 14:12 +0400, Denis Kirjanov wrote:
> > diff --git a/drivers/staging/slicoss/slicoss.c b/drivers/staging/slicoss/slicoss.c
> > index bebf0fd..102d3ea 100644
> > --- a/drivers/staging/slicoss/slicoss.c
> > +++ b/drivers/staging/slicoss/slicoss.c
> > @@ -452,7 +452,7 @@ static int __devinit slic_entry_probe(struct pci_dev *pcidev,
> >
> > status = slic_card_init(card, adapter);
> >
> > - if (status != STATUS_SUCCESS) {
> > + if (status != 0) {
> > card->state = CARD_FAIL;
> > adapter->state = ADAPT_FAIL;
> > adapter->linkstate = LINK_DOWN;
>
> Can we really continue here?
>
It seems that we have to goto err_out_unmap, yes?
> > @@ -1206,7 +1206,7 @@ static void slic_link_event_handler(struct adapter *adapter)
> > #else
> > Stop compilation;
> > #endif
> > - ASSERT((status == STATUS_SUCCESS) || (status == STATUS_PENDING));
> > + ASSERT(status == 0);
> > }
> >
>
> Now that looks useless since slic_upr_request can return STATUS_PENDING
> or -ENOMEM. Same for slic_config_get
Anyway, this code is full of ASSERT()'s, grep see 71 calls to it.
It needs more considered patch than these cleanup patches.
prev parent reply other threads:[~2010-06-30 13:02 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-27 13:20 [PATCH 1/5] staging: slicoss: Change return codes to -EYYY Kulikov Vasiliy
2010-06-27 13:20 ` [PATCH 3/5] staging: slicoss: Move NULL pointer assertion to else branch Kulikov Vasiliy
2010-07-08 20:11 ` Greg KH
2010-06-27 13:20 ` [PATCH 4/5] staging: slicoss: error handling with goto Kulikov Vasiliy
2010-06-27 13:20 ` [PATCH 5/5] " Kulikov Vasiliy
2010-06-28 10:12 ` [PATCH 1/5] staging: slicoss: Change return codes to -EYYY Denis Kirjanov
2010-06-28 11:14 ` Kulikov Vasiliy
2010-06-28 14:12 ` Denis Kirjanov
2010-06-30 13:02 ` Kulikov Vasiliy
2010-06-30 13:02 ` Kulikov Vasiliy [this message]
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=20100630130240.GA3068@shinshilla \
--to=segooon@gmail.com \
--cc=charrer@alacritech.com \
--cc=davem@davemloft.net \
--cc=devel@driverdev.osuosl.org \
--cc=dkirjanov@kernel.org \
--cc=gregkh@suse.de \
--cc=jpirko@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=liodot@gmail.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