Re: [PATCH v3] libata: support the ata host which implements a queue depth less than 32

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

 



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;

I don't really mind it and the explicit if block isn't more readable
in any way.

Thanks.

-- 
tejun
--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux