Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756008Ab0ARTHQ (ORCPT ); Mon, 18 Jan 2010 14:07:16 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755985Ab0ARTHO (ORCPT ); Mon, 18 Jan 2010 14:07:14 -0500 Received: from gateway-1237.mvista.com ([206.112.117.35]:15570 "HELO imap.sh.mvista.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with SMTP id S1755902Ab0ARTHM (ORCPT ); Mon, 18 Jan 2010 14:07:12 -0500 Message-ID: <4B54B0F5.1040405@ru.mvista.com> Date: Mon, 18 Jan 2010 22:05:25 +0300 From: Sergei Shtylyov User-Agent: Thunderbird 2.0.0.21 (X11/20090320) MIME-Version: 1.0 To: Bartlomiej Zolnierkiewicz Cc: linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 14/64] pata_cypress: fix PIO timings underclocking References: <20100118171349.14623.90030.sendpatchset@localhost> <20100118171547.14623.54536.sendpatchset@localhost> In-Reply-To: <20100118171547.14623.54536.sendpatchset@localhost> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1194 Lines: 38 Hello. Bartlomiej Zolnierkiewicz wrote: > From: Bartlomiej Zolnierkiewicz > Subject: [PATCH] pata_cypress: fix PIO timings underclocking > > Timing registers should be programmed with the desired number of clocks > minus one clock. > > Signed-off-by: Bartlomiej Zolnierkiewicz > --- > drivers/ata/pata_cypress.c | 10 ++++++---- > 1 file changed, 6 insertions(+), 4 deletions(-) > > Index: b/drivers/ata/pata_cypress.c > =================================================================== > --- a/drivers/ata/pata_cypress.c > +++ b/drivers/ata/pata_cypress.c > [...] > @@ -79,7 +81,7 @@ static void cy82c693_set_piomode(struct > pci_read_config_dword(pdev, CY82_IDE_ADDRSETUP, &addr); > > addr &= ~0xF0; /* Mask bits */ > - addr |= (clamp_val(t.setup, 0, 15) << 4); > + addr |= (clamp_val(t.setup - 1, 0, 15) << 4); > You could drop the unneeded parens while at it... MBR, Sergei -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/