* [PATCH] Fixed use of rounddown_pow_of_two in ramoops
@ 2011-11-19 13:32 Marco Stornelli
2011-11-20 9:30 ` Cong Wang
2011-11-22 0:06 ` Andrew Morton
0 siblings, 2 replies; 3+ messages in thread
From: Marco Stornelli @ 2011-11-19 13:32 UTC (permalink / raw)
To: Linux Kernel, torvalds; +Cc: Andrew Morton
From: Marco Stornelli <marco.stornelli@gmail.com>
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>
---
drivers/char/ramoops.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/char/ramoops.c b/drivers/char/ramoops.c
index 7c7f42a1f8..9658116 100644
--- a/drivers/char/ramoops.c
+++ b/drivers/char/ramoops.c
@@ -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 &&
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] Fixed use of rounddown_pow_of_two in ramoops
2011-11-19 13:32 [PATCH] Fixed use of rounddown_pow_of_two in ramoops Marco Stornelli
@ 2011-11-20 9:30 ` Cong Wang
2011-11-22 0:06 ` Andrew Morton
1 sibling, 0 replies; 3+ messages in thread
From: Cong Wang @ 2011-11-20 9:30 UTC (permalink / raw)
To: Marco Stornelli; +Cc: Linux Kernel, torvalds, Andrew Morton
On Sat, Nov 19, 2011 at 9:32 PM, Marco Stornelli
<marco.stornelli@gmail.com> wrote:
> From: Marco Stornelli <marco.stornelli@gmail.com>
>
> 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>
Reviewed-by: WANG Cong <xiyou.wangcong@gmail.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Fixed use of rounddown_pow_of_two in ramoops
2011-11-19 13:32 [PATCH] Fixed use of rounddown_pow_of_two in ramoops Marco Stornelli
2011-11-20 9:30 ` Cong Wang
@ 2011-11-22 0:06 ` Andrew Morton
1 sibling, 0 replies; 3+ messages in thread
From: Andrew Morton @ 2011-11-22 0:06 UTC (permalink / raw)
To: Marco Stornelli; +Cc: Linux Kernel, torvalds
On Sat, 19 Nov 2011 14:32:15 +0100
Marco Stornelli <marco.stornelli@gmail.com> wrote:
> From: Marco Stornelli <marco.stornelli@gmail.com>
>
> 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>
> ---
> drivers/char/ramoops.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/char/ramoops.c b/drivers/char/ramoops.c
> index 7c7f42a1f8..9658116 100644
> --- a/drivers/char/ramoops.c
> +++ b/drivers/char/ramoops.c
> @@ -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 &&
waah.
Reported-by: Andrew Morton <akpm@linux-foundation.org>
There goes my chance to get my name in the kernel tree :(
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-11-22 0:06 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-19 13:32 [PATCH] Fixed use of rounddown_pow_of_two in ramoops Marco Stornelli
2011-11-20 9:30 ` Cong Wang
2011-11-22 0:06 ` Andrew Morton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox