Re: [PATCH V8 1/5] dma-mapping: Rework dma_get_cache_alignment()

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

 



On Wed, Oct 18, 2017 at 10:23:36AM -0700, Mark Greer wrote:
> >  #define	MPSC_RXR_ENTRIES	32
> > -#define	MPSC_RXRE_SIZE		dma_get_cache_alignment()
> > +#define	MPSC_RXRE_SIZE		dma_get_cache_alignment(dma_dev)
> 
> I would much prefer that you add a parameter to the macro to avoid forcing
> a non-flexible and non-obvious variable definition wherever it is used.
> What I mean is something like:
> 
> #define MPSC_RXRE_SIZE(d)		dma_get_cache_alignment(d)
> 
> Similarly for all of the other macros and where they're used.

Agreed.  Except for that the patch looks fine to me, though.



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]