Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S269512AbTHJNzT (ORCPT ); Sun, 10 Aug 2003 09:55:19 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S269514AbTHJNzT (ORCPT ); Sun, 10 Aug 2003 09:55:19 -0400 Received: from caramon.arm.linux.org.uk ([212.18.232.186]:54536 "EHLO caramon.arm.linux.org.uk") by vger.kernel.org with ESMTP id S269512AbTHJNzP (ORCPT ); Sun, 10 Aug 2003 09:55:15 -0400 Date: Sun, 10 Aug 2003 14:55:11 +0100 From: Russell King To: Christoph Hellwig , "YOSHIFUJI Hideaki / ?$B5HF#1QL@?(B" , davem@redhat.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH 7/9] convert drivers/scsi to virt_to_pageoff() Message-ID: <20030810145511.B32508@flint.arm.linux.org.uk> Mail-Followup-To: Christoph Hellwig , "YOSHIFUJI Hideaki / ?$B5HF#1QL@?(B" , davem@redhat.com, linux-kernel@vger.kernel.org References: <20030810013041.679ddc4c.davem@redhat.com> <20030810090556.GY31810@waste.org> <20030810020444.48cb740b.davem@redhat.com> <20030810.201009.77128484.yoshfuji@linux-ipv6.org> <20030810123148.A10435@infradead.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <20030810123148.A10435@infradead.org>; from hch@infradead.org on Sun, Aug 10, 2003 at 12:31:48PM +0100 X-Message-Flag: Your copy of Microsoft Outlook is vulnerable to viruses. See www.mutt.org for more details. Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 984 Lines: 25 On Sun, Aug 10, 2003 at 12:31:48PM +0100, Christoph Hellwig wrote: > > --- linux-2.6/drivers/scsi/arm/scsi.h 19 May 2003 17:48:30 -0000 1.2 > > +++ linux-2.6/drivers/scsi/arm/scsi.h 10 Aug 2003 09:30:33 -0000 > > @@ -23,7 +23,7 @@ > > BUG_ON(bufs + 1 > max); > > > > sg->page = virt_to_page(SCp->ptr); > > - sg->offset = ((unsigned int)SCp->ptr) & ~PAGE_MASK; > > + sg->offset = virt_to_pageoff(SCp->ptr); > > sg->length = SCp->this_residual; > > Dito. Actually, I'd rather see Scsi_Pointer gain page + offset (or even better a single sg element) and get rid of these conversions. -- Russell King (rmk@arm.linux.org.uk) The developer of ARM Linux http://www.arm.linux.org.uk/personal/aboutme.html - 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/