lkml.org 
[lkml]   [2021]   [Oct]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] bitmap: simplify GENMASK(size - 1, 0) lines
From
Date


On 10/26/21 3:21 PM, Andy Shevchenko wrote:
> Can you explain to me how it is supposed to work?
>
> For example,
>
> x = 0xaa55;
> size = 5;
>
> printf("%lu\n", find_first_bit(&x, size));
>
> In the resulting code we will always have 5 as the result,
> but is it correct one?

Sorry, my bad. GENMASK(size - 1, 0) would just become __GENMASK(size -
1, 0) instead of 0. Let me revisit it and run some tests first.

\
 
 \ /
  Last update: 2021-10-26 21:34    [W:0.077 / U:0.464 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site