Re: [PATCH 2/5] iov_iter: introduce type for preregistered dma tags

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

 



On Wed, Jul 27, 2022 at 12:10:33AM +0100, Al Viro wrote:
> On Tue, Jul 26, 2022 at 10:38:11AM -0700, Keith Busch wrote:
> 
> > +void iov_iter_dma_tag(struct iov_iter *i, unsigned int direction,
> > +			void *dma_tag, unsigned int dma_offset,
> > +			unsigned long nr_segs, size_t count)
> > +{
> > +	WARN_ON(direction & ~(READ | WRITE));
> > +	*i = (struct iov_iter){
> > +		.iter_type = ITER_DMA_TAG,
> > +		.data_source = direction,
> > +		.nr_segs = nr_segs,
> 
> Could you can that cargo-culting?  Just what the hell is nr_segs
> here?

Thanks for the catch. Setting nr_segs here is useless carry-over from an
earlier version when I thought it would be used to build the request. Turns out
it's not used at all.



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux