Re: Maximum data size in a single transfer for MS driver

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

 



>>>>> "Alan" == Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> writes:

Alan> BTW, how come you didn't write it like this?

Alan> q->limits.max_hw_sectors = max_sectors;

Alan> 	if (max_sectors < BLK_DEF_MAX_SECTORS)
Alan>       q->limits.max_sectors = max_sectors;
Alan> 	else
Alan>       q->limits.max_sectors = BLK_DEF_MAX_SECTORS;

Alan> For me this is easier to understand.

No particular reason.  Once the test args were swapped the original code
was clear to me.

However, we could do:

	q->limits.max_hw_sectors = max_hw_sectors;
	q->limits.max_sectors = min(max_hw_sectors, BLK_DEF_MAX_SECTORS);

-- 
Martin K. Petersen	Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux