Re: [PATCH 2/4] dmapool: Validate parameters to dma_pool_create

2007-09-26 Thread David Miller
From: Matthew Wilcox <[EMAIL PROTECTED]> Date: Wed, 26 Sep 2007 15:01:17 -0400 > 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

Re: [PATCH 2/4] dmapool: Validate parameters to dma_pool_create

2007-09-26 Thread roel
Matthew Wilcox wrote: > On Wed, Sep 26, 2007 at 09:47:41PM +0200, roel wrote: >> The brackets in the first if/else are not required, and you could combine >> the two statements: > > You mean braces, not brackets. And I find this little fetish of yours > highly disturbing. I prefer to use

Re: [PATCH 2/4] dmapool: Validate parameters to dma_pool_create

2007-09-26 Thread roel
Matthew Wilcox wrote: > 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]> > --- > mm/dmapool.c | 15

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

2007-09-26 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]> --- mm/dmapool.c | 15 --- 1 files changed, 8 insertions(+),

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

2007-09-26 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] --- mm/dmapool.c | 15 --- 1 files changed, 8 insertions(+), 7

Re: [PATCH 2/4] dmapool: Validate parameters to dma_pool_create

2007-09-26 Thread roel
Matthew Wilcox wrote: 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] --- mm/dmapool.c | 15 --- 1

Re: [PATCH 2/4] dmapool: Validate parameters to dma_pool_create

2007-09-26 Thread roel
Matthew Wilcox wrote: On Wed, Sep 26, 2007 at 09:47:41PM +0200, roel wrote: The brackets in the first if/else are not required, and you could combine the two statements: You mean braces, not brackets. And I find this little fetish of yours highly disturbing. I prefer to use braces, and

Re: [PATCH 2/4] dmapool: Validate parameters to dma_pool_create

2007-09-26 Thread David Miller
From: Matthew Wilcox [EMAIL PROTECTED] Date: Wed, 26 Sep 2007 15:01:17 -0400 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