public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Douglas Gilbert <dougg@torque.net>
To: Randy Dunlap <rdunlap@xenotime.net>
Cc: James Bottomley <James.Bottomley@SteelEye.com>,
	Horms <horms@verge.net.au>,
	mpt_linux_developer@lsi.com, linux-scsi@vger.kernel.org,
	Eric Moore <Eric.Moore@lsi.com>
Subject: Re: [PATCH 2/2] fusion - honour return value of pci_enable_device() in mpt_resume()
Date: Fri, 16 Mar 2007 13:18:40 -0400	[thread overview]
Message-ID: <45FAD170.50003@torque.net> (raw)
In-Reply-To: <20070316082015.e7183c0e.rdunlap@xenotime.net>

Randy Dunlap wrote:
> On Fri, 16 Mar 2007 11:14:51 -0500 James Bottomley wrote:
> 
>> On Fri, 2007-03-16 at 08:06 -0700, Randy Dunlap wrote:
>>> On Fri, 16 Mar 2007 09:27:26 -0500 James Bottomley wrote:
>>>
>>>> On Fri, 2007-03-16 at 16:05 +0900, Horms wrote:
>>>>> +       err = pci_enable_device(pdev);
>>>>> +       if (err < 0)
>>>>> +               return err;
>>>> Traditionally, this should be 
>>>>
>>>> if (err)
>>>> 	return err;
>>>>
>>>> The reason is that <0 is a signed comparison which can be slightly more
>>>> expensive on some architectures and it's unnecessary if zero is the only
>>>> successful return.
>>> Tradition vs. Linus, eh?  Linus wrote (2007-Mar-06, on lkml,
>>> Message-ID: <Pine.LNX.4.64.0703060817060.5963@woody.linux-foundation.org>):
>> Sure ... we can all maintain our own traditions .. what was the subject
>> of this email?
> 
> The subject was coding style and return/error codes.
> The Subject: line was: Re: [5/6] 2.6.21-rc2: known regressions

Randy,
While on the subject of traditions, how about the
C90 and C99 ones?

C identifiers starting with "__" are reserved!
Reference: ISO/IEC 9899:1999 (C99) section 7.1.3 "All
identifiers that start with an underscore and either
an upper case letter or another underscore are always
reserved for any use". It was the same in C90.

Now we might start getting rid of __u32 and its
friends first :-)

Doug Gilbert


  reply	other threads:[~2007-03-16 17:18 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-16  7:05 [PATCH 1/2] fusion - removed unnecessary code in mptscsih_resume() Horms
2007-03-16  7:05 ` [PATCH 2/2] fusion - honour return value of pci_enable_device() in mpt_resume() Horms
2007-03-16 14:27   ` James Bottomley
2007-03-16 15:06     ` Randy Dunlap
2007-03-16 16:14       ` James Bottomley
2007-03-16 15:20         ` Randy Dunlap
2007-03-16 17:18           ` Douglas Gilbert [this message]
2007-03-19  6:06     ` Horms
2007-03-17  0:00   ` Moore, Eric

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=45FAD170.50003@torque.net \
    --to=dougg@torque.net \
    --cc=Eric.Moore@lsi.com \
    --cc=James.Bottomley@SteelEye.com \
    --cc=horms@verge.net.au \
    --cc=linux-scsi@vger.kernel.org \
    --cc=mpt_linux_developer@lsi.com \
    --cc=rdunlap@xenotime.net \
    /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