Re: [patch][3/9] ide: add ide_sg_init() helper

From: Jens Axboe
Date: Thu Sep 09 2004 - 10:49:02 EST


On Thu, Sep 09 2004, Bartlomiej Zolnierkiewicz wrote:
> On Thursday 09 September 2004 16:47, Jens Axboe wrote:
> > On Thu, Sep 09 2004, Bartlomiej Zolnierkiewicz wrote:
> > >
> > > On Thursday 09 September 2004 05:17, Jeff Garzik wrote:
> > > > Bartlomiej Zolnierkiewicz wrote:
> > > > > +static inline void ide_sg_init(struct scatterlist *sg, u8 *buf, unsigned int buflen)
> > > > > +{
> > > > > + memset(sg, 0, sizeof(*sg));
> > > > > +
> > > > > + sg->page = virt_to_page(buf);
> > > > > + sg->offset = offset_in_page(buf);
> > > > > + sg->length = buflen;
> > > > > +}
> > > > > +
> > > >
> > > >
> > > > Surely this should be more generic?
> > >
> > > Any idea where to put it? linux/blkdev.h?
> >
> > How about asm/scatterlist.h?
>
> I would like to avoid duplicating it for every arch
> as it is not arch specific.

Maybe add linux/scatterlist.h then? It should not be in blkdev.h at
least, as it really has nothing to do with block devices.

--
Jens Axboe

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/