All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff Garzik <jeff@garzik.org>
To: James Bottomley <James.Bottomley@SteelEye.com>
Cc: Eric Moore <eric.moore@lsi.com>, linux-scsi@vger.kernel.org
Subject: Re: [PATCH] - export scsilun_to_int
Date: Thu, 01 Feb 2007 03:35:42 -0500	[thread overview]
Message-ID: <45C1A65E.8000708@garzik.org> (raw)
In-Reply-To: <1170294717.3402.92.camel@mulgrave.il.steeleye.com>

James Bottomley wrote:
> On Wed, 2007-01-31 at 15:54 -0700, Eric Moore wrote:
>> static int
>> +mptscsih_cmp_scsilun(struct scsi_lun * lun1, struct scsi_lun * lun2)
>> +{
>> +       int i;
>> +
>> +       for (i = 0; i < 8 ; i++)
>> +               if (lun1->scsi_lun[i] != lun2->scsi_lun[i])
>> +                       return 1;
>> +
>> +       return 0;
>> +}
> 
> what's wrong with
> 
> memcmp(lun1->scsi_lun, lun2->scsi_lun, 8)
> 
> rather than introducing a wrapper?  The compiler can even optimise
> memcmp for a fixed size nicely.

I would rather introduce a wrapper that calls memcmp()

That's why I have done in my scsilun tree (jgarzik/scsilun-2.6.git, 
branches submit1, submit1 and hacking)

	Jeff



  reply	other threads:[~2007-02-01  8:35 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-31 22:54 [PATCH] - export scsilun_to_int Eric Moore
2007-02-01  1:51 ` James Bottomley
2007-02-01  8:35   ` Jeff Garzik [this message]
  -- strict thread matches above, loose matches on Subject: below --
2007-02-01 17:24 Eric Moore
2007-02-01 17:35 ` Jeff Garzik
2007-01-31 19:44 Moore, Eric
2007-01-31 20:48 ` James Bottomley
2007-01-29 16:40 Eric Moore
2007-01-31 17:01 ` 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=45C1A65E.8000708@garzik.org \
    --to=jeff@garzik.org \
    --cc=James.Bottomley@SteelEye.com \
    --cc=eric.moore@lsi.com \
    --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 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.