Re: [PATCH ] scsi-misc-2.6: File System going into read-only mode

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

 



Stefan Richter wrote:
> Stefan Richter wrote:
>> Before:
>>
>> if (upsg->sg[i].count > (dev->adapter_info.options & AAC_OPT_NEW_COMM)
>>         ? (dev->scsi_host_ptr->max_sectors << 9) : 65536) {
> 
> Doesn't make sense.  dev->adapter_info.options is a __le32 bitfield.
> 
>> After:
>>
>> if (upsg->sg[i].count > (
>>           (dev->adapter_info.options & AAC_OPT_NEW_COMM)
>>                  ? (dev->scsi_host_ptr->max_sectors << 9) : 65536
>>     )) {
> 
> Makes sense.  Don't know if it's correct.

PS:  These things wouldn't happen if
  a) the coding wouldn't be as deeply nested,
  b) sparse with endianess check would be used for QA.
(OK, it's apparently a decade old code.)
-- 
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