From: Julia Lawall <julia.lawall@lip6.fr>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Saurav Kashyap <saurav.kashyap@qlogic.com>,
Dept-Eng QLA2xxx Upstream <qla2xxx-upstream@qlogic.com>,
"kernel-janitors@vger.kernel.org"
<kernel-janitors@vger.kernel.org>,
"James E.J. Bottomley" <JBottomley@parallels.com>,
linux-scsi <linux-scsi@vger.kernel.org>,
linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/13 v2] [SCSI] qla2xxx: make return of 0 explicit
Date: Mon, 19 May 2014 23:36:48 +0000 [thread overview]
Message-ID: <alpine.DEB.2.10.1405200735210.3003@hadrien> (raw)
In-Reply-To: <20140519201202.GA15585@mwanda>
On Mon, 19 May 2014, Dan Carpenter wrote:
> On Mon, May 19, 2014 at 04:07:52PM +0000, Saurav Kashyap wrote:
> > Hi Julia,
> >
> > Status is already set to 0 at the beginning of the function, I think
> > we should just "return status" here to be consistent with the rest of
> > the function.
>
> "return 0;" is more clear than "return status;".
>
> Consistency is great so long as it makes the code easier to read. Don't
> lose track of the real goal.
If status were an informative word, there might be a reason for it. But
integer typed functions almost always return their status, so there is no
real information.
julia
WARNING: multiple messages have this Message-ID (diff)
From: Julia Lawall <julia.lawall@lip6.fr>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Saurav Kashyap <saurav.kashyap@qlogic.com>,
Dept-Eng QLA2xxx Upstream <qla2xxx-upstream@qlogic.com>,
"kernel-janitors@vger.kernel.org"
<kernel-janitors@vger.kernel.org>,
"James E.J. Bottomley" <JBottomley@parallels.com>,
linux-scsi <linux-scsi@vger.kernel.org>,
linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/13 v2] [SCSI] qla2xxx: make return of 0 explicit
Date: Tue, 20 May 2014 07:36:48 +0800 (SGT) [thread overview]
Message-ID: <alpine.DEB.2.10.1405200735210.3003@hadrien> (raw)
In-Reply-To: <20140519201202.GA15585@mwanda>
On Mon, 19 May 2014, Dan Carpenter wrote:
> On Mon, May 19, 2014 at 04:07:52PM +0000, Saurav Kashyap wrote:
> > Hi Julia,
> >
> > Status is already set to 0 at the beginning of the function, I think
> > we should just "return status" here to be consistent with the rest of
> > the function.
>
> "return 0;" is more clear than "return status;".
>
> Consistency is great so long as it makes the code easier to read. Don't
> lose track of the real goal.
If status were an informative word, there might be a reason for it. But
integer typed functions almost always return their status, so there is no
real information.
julia
next prev parent reply other threads:[~2014-05-19 23:36 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-19 4:47 [PATCH 2/13 v2] [SCSI] qla2xxx: make return of 0 explicit Julia Lawall
2014-05-19 4:47 ` Julia Lawall
2014-05-19 16:07 ` Saurav Kashyap
2014-05-19 16:07 ` Saurav Kashyap
2014-05-19 16:07 ` Saurav Kashyap
2014-05-19 20:12 ` Dan Carpenter
2014-05-19 20:12 ` Dan Carpenter
2014-05-19 23:36 ` Julia Lawall [this message]
2014-05-19 23:36 ` Julia Lawall
2014-05-19 23:46 ` Dan Carpenter
2014-05-19 23:46 ` Dan Carpenter
2014-05-20 15:07 ` Saurav Kashyap
2014-05-20 15:07 ` Saurav Kashyap
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.10.1405200735210.3003@hadrien \
--to=julia.lawall@lip6.fr \
--cc=JBottomley@parallels.com \
--cc=dan.carpenter@oracle.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=qla2xxx-upstream@qlogic.com \
--cc=saurav.kashyap@qlogic.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 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.