public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Pete Zaitcev <zaitcev@redhat.com>
To: Jeff Garzik <jgarzik@pobox.com>
Cc: zaitcev@redhat.com, linux-kernel@vger.kernel.org,
	James.Smart@Emulex.com, linux-scsi@vger.kernel.org
Subject: Re: [Announce] Emulex LightPulse Device Driver
Date: Wed, 10 Mar 2004 09:59:08 -0800	[thread overview]
Message-ID: <20040310095908.33b2082f.zaitcev@redhat.com> (raw)
In-Reply-To: <mailman.1078908361.15239.linux-kernel2news@redhat.com>

On Wed, 10 Mar 2004 03:35:09 -0500
Jeff Garzik <jgarzik@pobox.com> wrote:

> I'm only part way through a review of the driver, but I felt there is a 
> rather large and important issue that needs addressing...  "wrappers."

Jeff, I agree completely that Emulex code is infested with wrappers
so much that it's harmful. However, the particular example you selected
you interpret wrong.

> void
> elx_sli_lock(elxHBA_t * phba, unsigned long *iflag)

Flag problem on sparc is fixed by Keith Wesolowsky for 2.6.3-rcX,
and it never existed on sparc64, which keeps CWP in a separate register.

Why it took years to resolve is that the expirience showed that
there is no legitimate reason to pass flags as arguments. Every damn
time it was done, the author was being stupid. Keith resolved it
primarily because it was an unorthogonality in sparc implementation.

> But this bug is only an example that serves to highlight the importance 
> of directly using Linux API functions throughout your code.  It may 
> sound redundant, but "Linux code should look like Linux code."  This 
> emphasis on style may sound trivial, but it's important for 
> review-ability, long term maintenance, and as we see here, bug prevention.

Yes yes yes. This is the way elx_sli_lock is harmful, not because
of its passing flags.

-- Pete

  parent reply	other threads:[~2004-03-10 17:59 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-09 22:45 [Announce] Emulex LightPulse Device Driver Smart, James
2004-03-10  0:09 ` Stefan Smietanowski
2004-03-10  7:21   ` vda
2004-03-10  8:35 ` Jeff Garzik
2004-03-10 15:21   ` James Bottomley
     [not found] ` <mailman.1078908361.15239.linux-kernel2news@redhat.com>
2004-03-10 17:59   ` Pete Zaitcev [this message]
2004-03-10 18:04     ` Jeff Garzik
  -- strict thread matches above, loose matches on Subject: below --
2004-03-10 22:47 Smart, James
2004-03-11  1:10 ` James Bottomley

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=20040310095908.33b2082f.zaitcev@redhat.com \
    --to=zaitcev@redhat.com \
    --cc=James.Smart@Emulex.com \
    --cc=jgarzik@pobox.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    /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