From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tejun Heo Subject: Re: [PATCH 1/2] libata: allow sata_sil24 to opt-out of tag ordered submission Date: Mon, 19 Jan 2015 09:12:49 -0500 Message-ID: <20150119141249.GA8140@htj.dyndns.org> References: <20150116231225.18771.75061.stgit@viggo.jf.intel.com> <20150116231302.18771.62862.stgit@viggo.jf.intel.com> <54BA409E.4040901@cogentembedded.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <54BA409E.4040901@cogentembedded.com> Sender: stable-owner@vger.kernel.org To: Sergei Shtylyov Cc: Dan Williams , linux-ide@vger.kernel.org, Ronny Hegewald , stable@vger.kernel.org List-Id: linux-ide@vger.kernel.org On Sat, Jan 17, 2015 at 01:59:42PM +0300, Sergei Shtylyov 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. Thanks. -- tejun