Re: [PATCH 1/2] libata: allow sata_sil24 to opt-out of tag ordered submission

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

 



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 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