From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sergei Shtylyov Subject: Re: [PATCH] libata: add TRIM support Date: Mon, 16 Nov 2009 19:19:39 +0300 Message-ID: <4B017B9B.6090702@ru.mvista.com> References: <20091116154343.GA6672@infradead.org> <20091116160748.3c58218e@lxorguk.ukuu.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from gateway-1237.mvista.com ([206.112.117.35]:42555 "HELO imap.sh.mvista.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with SMTP id S1752632AbZKPQTx (ORCPT ); Mon, 16 Nov 2009 11:19:53 -0500 In-Reply-To: <20091116160748.3c58218e@lxorguk.ukuu.org.uk> Sender: linux-ide-owner@vger.kernel.org List-Id: linux-ide@vger.kernel.org To: Alan Cox Cc: Christoph Hellwig , Jeff Garzik , linux-ide@vger.kernel.org, linux-scsi@vger.kernel.org, "Martin K. Petersen" , Matthew Wilcox Hello. Alan Cox wrote: >> + min_io_sectors = 1; >> + if ((args->id[106] & 0xc000) == 0x4000 && (args->id[106] & (1 << 13))) >> + min_io_sectors *= args->id[106] & 0xf; >> > > That magic probably wants to be an ata_id_foo helper of some sort but > otherwise all looks sensible enough for ATA. I'm assuming gcc is smart > enough to collapse that into > > id[106] & 0xE000 != 0x6000 > You probably meant ==, not !=. Not sure if gcc is that smart... WBR, Sergei