Re: [SCSI] scsi.h: add macro for enclosure bit of inquiry data

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux