Hello. On 1/19/2015 5:12 PM, Tejun Heo wrote:
for (i = 0, tag = ap->last_tag + 1; i < max_queue; i++, tag++) { - tag = tag < max_queue ? tag : 0; + if (ap->flags & ATA_FLAG_LOWTAG) + tag = i; + else + tag = tag < max_queue ? tag : 0;
Ugh, this is clear abuse of the ?: operator... Why not simply:
else if (tag >= max_queue) tag = 0;
Why is that a clear abuse? Seems like a pretty typical use to me.
This is my first reaction to statements like 'x = x < M ? x : 0'. I really prefer two-liners with *if* to them.
Thanks.
MBR, Sergei -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html