Re: [PATCH update 3/3] firewire: fw-sbp2: add support for multiple logical units per target

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

 



Kristian Høgsberg wrote:
> On 7/28/07, Stefan Richter <stefanr@xxxxxxxxxxxxxxxxx> wrote:
>>  struct sbp2_logical_unit {
>>         struct sbp2_target *tgt;
>> +       struct list_head tgt_list;
> 
> I would call this link. I've consistently named all instances of
> struct list_head that are used as a list link either 'link'
> 'something_link'.  I find that it's a helpful convention for figuring
> out/remembering whether the field is a list head or the link part of
> an element in a list.

Yes, it's a good convention.  I somehow missed the pattern.

>> +               case SBP2_CSR_LOGICAL_UNIT_DIRECTORY:
>> +                       subdir = ci.p + value;
>> +                       if (subdir <= dev->config_rom + 5 ||
>> +                           subdir >= dev->config_rom + dev->config_rom_length)
>> +                               fw_error("logical unit dir out of bounds\n");
> 
> This check isn't necessary, read_bus_info_block ensures that all
> blocks read are within the config rom area.

Right, fw_device_init fetched the directory for us, so we have it. #-)
-- 
Stefan Richter
-=====-=-=== -=== =====
http://arcgraph.de/sr/
-
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