[PATCH 4/7] dmapool: Validate parameters to dma_pool_create

2007-12-04 Thread Matthew Wilcox
Check that 'align' is a power of two, like the API specifies. Align 'size' to 'align' correctly -- the current code has an off-by-one. The ALIGN macro in kernel.h doesn't. Signed-off-by: Matthew Wilcox <[EMAIL PROTECTED]> Acked-by: David S. Miller <[EMAIL PROTECTED]> --- mm/dmapool.c | 15

[PATCH 4/7] dmapool: Validate parameters to dma_pool_create

2007-12-04 Thread Matthew Wilcox
Check that 'align' is a power of two, like the API specifies. Align 'size' to 'align' correctly -- the current code has an off-by-one. The ALIGN macro in kernel.h doesn't. Signed-off-by: Matthew Wilcox [EMAIL PROTECTED] Acked-by: David S. Miller [EMAIL PROTECTED] --- mm/dmapool.c | 15