Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 83334
b: refs/heads/master
c: 399154b
h: refs/heads/master
v: v3
  • Loading branch information
Matthew Wilcox committed Dec 4, 2007
1 parent 6235ac7 commit 5e25974
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2cae367e4854ff055c4f5e8aacd56b0eeec9f6cb
refs/heads/master: 399154be2dcb6a58dbde9682162c38113cf3e40b
15 changes: 8 additions & 7 deletions trunk/mm/dmapool.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,17 +106,18 @@ struct dma_pool *dma_pool_create(const char *name, struct device *dev,
{
struct dma_pool *retval;

if (align == 0)
if (align == 0) {
align = 1;
if (size == 0)
} else if (align & (align - 1)) {
return NULL;
else if (size < align)
size = align;
else if ((size % align) != 0) {
size += align + 1;
size &= ~(align - 1);
}

if (size == 0)
return NULL;

if ((size % align) != 0)
size = ALIGN(size, align);

if (allocation == 0) {
if (PAGE_SIZE < size)
allocation = size;
Expand Down

0 comments on commit 5e25974

Please sign in to comment.