On Fri, Jul 11, 2014 at 03:57:01PM +0400, Sergei Shtylyov wrote: > >- for (i = 0; i < ATA_MAX_QUEUE; i++) { > >- tag = (i + ap->last_tag + 1) % ATA_MAX_QUEUE; > >+ for (i = 0, tag = ap->last_tag + 1; i < max_queue; i++, tag++) { > >+ tag = tag < max_queue ? tag : 0; > > Assigning 'tag' back to 'tag' is quite stupid, don't you think? Why not: > > if (tag >= max_queue) > tag = 0; Since I am an idiot, it is very possible for me to write stupid code. But I don't believe this is one. I don't think the above code is more readable. Thanks, Kevin
Attachment:
pgphXBp8PpgFi.pgp
Description: PGP signature