Commit fdb59507 authored by Marco Stornelli's avatar Marco Stornelli Committed by Linus Torvalds

ramoops: fix use of rounddown_pow_of_two()

The return value of rounddown_pow_of_two wasn't evaluated, so the
operation was a no-op.
Signed-off-by: default avatarMarco Stornelli <marco.stornelli@gmail.com>
Reported-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Reviewed-by: default avatarWANG Cong <xiyou.wangcong@gmail.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 028ee4be
...@@ -125,8 +125,8 @@ static int __init ramoops_probe(struct platform_device *pdev) ...@@ -125,8 +125,8 @@ static int __init ramoops_probe(struct platform_device *pdev)
goto fail3; goto fail3;
} }
rounddown_pow_of_two(pdata->mem_size); pdata->mem_size = rounddown_pow_of_two(pdata->mem_size);
rounddown_pow_of_two(pdata->record_size); pdata->record_size = rounddown_pow_of_two(pdata->record_size);
/* Check for the minimum memory size */ /* Check for the minimum memory size */
if (pdata->mem_size < MIN_MEM_SIZE && if (pdata->mem_size < MIN_MEM_SIZE &&
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment