Re: [PATCH 3/5] drm/i915: Implement __for_each_sgt_daddr_next

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

 



[...]

> +/**
> + * __for_each_daddr_next - iterates over the device addresses with pre-initialized iterator.
> + * @__dp:	Device address (output)
> + * @__iter:	'struct sgt_iter' (iterator state, external)
> + * @__step:	step size
> + */
> +#define __for_each_daddr_next(__dp, __iter, __step)                  \

normally iter is the last parameter, but this is similar to other
for_each's...

nor r-b'eing this yet as there is a comment coming in the next
patch.

Andi

> +	for (; ((__dp) = (__iter).dma + (__iter).curr), (__iter).sgp;   \
> +	     (((__iter).curr += (__step)) >= (__iter).max) ?            \
> +	     (__iter) = __sgt_iter(__sg_next((__iter).sgp), true), 0 : 0)
>  
>  /**
>   * for_each_sgt_page - iterate over the pages of the given sg_table
> -- 
> 2.41.0



[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux