[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    Re: [PATCH] nanddump: correct rounding to next page
From:       Richard Genoud <richard.genoud () gmail ! com>
Date:       2014-06-19 15:55:28
Message-ID: CACQ1gAg43k6AMBjSzDf1C8Mage_uC-PUYNuUPL+XB6j0N_B1=w () mail ! gmail ! com
[Download RAW message or body]

2014-06-18 15:44 GMT+02:00 Richard Genoud <richard.genoud@gmail.com>:
> The rounding to next page formula was wrong:
> ex: (len | ~(meminfo->writesize - 1)) + 1;
> len=128K
> writesize=4K
> (len | ~(meminfo->writesize - 1)) + 1 => 4 294 963 201 ?!
>
> correct rounding formula:
> ((len - 1) | (meminfo->writesize - 1)) + 1 => 128K
> len = 130K
> ((len - 1) | (meminfo->writesize - 1)) + 1 => 132K
>
> Signed-off-by: Richard Genoud <richard.genoud@gmail.com>
> ---

I'll resend this patch in the nanddump serie.
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic