public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: Stefan Richter <stefanr@s5r6.in-berlin.de>
Cc: linux-scsi <linux-scsi@vger.kernel.org>
Subject: Re: [SCSI] scsi.h: add macro for enclosure bit of inquiry data
Date: Sun, 20 Jan 2008 17:29:04 -0600	[thread overview]
Message-ID: <1200871744.3105.33.camel@localhost.localdomain> (raw)
In-Reply-To: <4793886F.2070707@s5r6.in-berlin.de>


On Sun, 2008-01-20 at 18:44 +0100, Stefan Richter wrote:
> James Bottomley wrote:
> > The macro tells us whether the device is (or contains) an enclosure device.
> ...
> > +static inline int scsi_device_enclosure(struct scsi_device *sdev)
> > +{
> > +	return sdev->inquiry[6] & (1<<6);
> > +}
> 
> Perhaps call it scsi_device_is_enclosure() to better reflect the nature
> of this function.
> 
> Or if it is an accessor to inquiry data to you, maybe call it
> scsi_device_inquiry_encserv() or
> scsi_device_inquiry_enclosure_services() or
> sdev_to_inquiry_encserv() or
> sdev_to_inquiry_enclosure_services().
> 
> Alas neither of this fits with the existing similar functions in
> scsi_device.h which don't have expressive names.

Right .. that's the problem.  Being potentially clearer in naming but at
odds with what's currently in the file starts to add to the confusion
about the other names in there.  I chose the name primarily because it's
the same form as all the others.

James



      reply	other threads:[~2008-01-20 23:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-20 15:09 [SCSI] scsi.h: add macro for enclosure bit of inquiry data James Bottomley
2008-01-20 17:44 ` Stefan Richter
2008-01-20 23:29   ` James Bottomley [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=1200871744.3105.33.camel@localhost.localdomain \
    --to=james.bottomley@hansenpartnership.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=stefanr@s5r6.in-berlin.de \
    /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