On 13 August 2016 at 05:37, Martin K. Petersen <martin.petersen@xxxxxxxxxx> wrote: > > It would be pretty unusual for a device that is smart enough to report a > transfer length limit to be constrained to 1 MB and change. > Well, it is done pretty much for libata's SATL. Also since opt_xfer_blocks is checked against dev_max, I think it makes sense in logic that we do the equivalence for BLK_DEF_MAX_SECTORS. Not to mention that since we check rw_max against the controller limit, no reason not to make sure we check it against the device limit in both cases. > > If you want to fix this please drop the braces and do: > > rw_max = min(BLK_DEF_MAX_SECTORS, q->limits.max_dev_sectors); That won't really work. min_t() would, though the line is gonna be a bit long; not sure if I can/should simply cast the type (unsigned int) to BLK_DEF_MAX_SECTORS. And which braces are you referring to? > > -- > Martin K. Petersen Oracle Linux Engineering -- To unsubscribe from this list: send the line "unsubscribe linux-block" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html