Re: [PATCH 1/19] add data buffer accessors

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Benny Halevy <bhalevy@xxxxxxxxxxx>
Subject: Re: [PATCH 1/19] add data buffer accessors
Date: Mon, 14 May 2007 10:57:08 +0300

> FUJITA Tomonori wrote:
> > +#define scsi_for_each_sg(cmd, sg, nseg, __i)			\
> > +	for (__i = 0, sg = scsi_sglist(cmd); __i < (nseg); __i++, (sg)++)
> > +
> 
> This feels like a layering violation, why not use for_each_sg()?
> 
> +#define scsi_for_each_sg(cmd, sg, nseg, __i)			\
> 	for_each_sg(scsi_sglist(cmd), (sg), (nseg), (__i))	\

As I said before, when for_each_sg is ready, we'll convert
scsi_for_each_sg to use for_each_sg.


> That said, I'm not sure that scsi_for_each_sg() is worth abstracting
> since the caller can just as well do for_each_sg() directly
> as sketched above...

I'm not sure why you think it's a layering violation.

With scsi_for_each_sg(), many drivers don't need scsi_sglist().
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux