Re: [PATCH 7/9] convert drivers/scsi to virt_to_pageoff()

Russell King
2003-08-10T13:55:19Z

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