lkml.org 
[lkml]   [2020]   [Jun]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH RESEND2] lib: fix bitmap_parse() on 64-bit big endian archs
On Mon, Jun 8, 2020 at 3:03 PM Andy Shevchenko
<andy.shevchenko@gmail.com> wrote:
> On Mon, Jun 8, 2020 at 1:26 PM Alexander Gordeev <agordeev@linux.ibm.com> wrote:

...

> Can't we simple do
>
> int chunk_index = 0;
> ...
> do {
> #if defined(CONFIG_64BIT) && defined(__BIG_ENDIAN)
> end = bitmap_get_x32_reverse(start, end,
> bitmap[chunk_index ^ 1]);
> #else
> end = bitmap_get_x32_reverse(start, end, bitmap[chunk_index]);
> #endif
> ...
> } while (++chunk_index);
>
> ?

And moreover, we simple can replace bitmap by maskp here, and drop it
from definition block.

--
With Best Regards,
Andy Shevchenko

\
 
 \ /
  Last update: 2020-06-08 14:09    [W:0.062 / U:0.292 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site