Re: [PATCH] include/log2.h: Fix rounddown_pow_of_two(1)
From: Andrei Warkentin
Date: Fri Nov 18 2011 - 13:46:34 EST
Hi,
----- Original Message -----
> From: "Andrew Morton" <akpm@xxxxxxxxxxxxxxxxxxxx>
> To: "Andrei Warkentin" <andreiw@xxxxxxxxxx>
> Cc: linux-kernel@xxxxxxxxxxxxxxx, "Rolf Eike Beer" <eike-kernel@xxxxxxxxx>, opensuse-kernel@xxxxxxxxxxxx, "Sergiu
> Iordache" <sergiu@xxxxxxxxxxxx>, "Marco Stornelli" <marco.stornelli@xxxxxxxxx>, "Eddie Wai"
> <eddie.wai@xxxxxxxxxxxx>, "Jayamohan Kallickal" <jayamohan.kallickal@xxxxxxxxxx>, "Guennadi Liakhovetski"
> <g.liakhovetski@xxxxxx>
> Sent: Thursday, November 17, 2011 6:05:49 PM
> Subject: Re: [PATCH] include/log2.h: Fix rounddown_pow_of_two(1)
>
>
> I assume that nobody has gone off and checked whether all current
> callers will survive this change. If they had, they'd have looked in
> drivers/char/ramoops.c and seen:
>
> rounddown_pow_of_two(pdata->mem_size);
> rounddown_pow_of_two(pdata->record_size);
>
> These operations are no-ops. It should be
>
> pdata->mem_size = rounddown_pow_of_two(pdata->mem_size);
> pdata->record_size = rounddown_pow_of_two(pdata->record_size);
>
> Marco or Sergio: please fix, test and send it over sometime?
I did quickly look through for code that expected rounddown_pow_of_two(1) to give 0,
but I didn't apparently look close enough for other issues.
A
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/