Skip to content

Commit

Permalink
ramoops: fix use of rounddown_pow_of_two()
Browse files Browse the repository at this point in the history
commit fdb5950 upstream.

The return value of rounddown_pow_of_two wasn't evaluated, so the
operation was a no-op.

Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com>
Reported-by: Andrew Morton <akpm@linux-foundation.org>
Reviewed-by: WANG Cong <xiyou.wangcong@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
  • Loading branch information
Marco Stornelli authored and Ben Hutchings committed Jan 3, 2013
1 parent 48c70de commit 1df57e4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/char/ramoops.c
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,8 @@ static int __init ramoops_probe(struct platform_device *pdev)
goto fail3;
}

rounddown_pow_of_two(pdata->mem_size);
rounddown_pow_of_two(pdata->record_size);
pdata->mem_size = rounddown_pow_of_two(pdata->mem_size);
pdata->record_size = rounddown_pow_of_two(pdata->record_size);

/* Check for the minimum memory size */
if (pdata->mem_size < MIN_MEM_SIZE &&
Expand Down

0 comments on commit 1df57e4

Please sign in to comment.