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 11:10 AM, Andy Shevchenko wrote:
> On Tue, Oct 26, 2021 at 10:41:08AM -0400, Qian Cai wrote:
>> Since "size" is an "unsigned int", the rvalue "size - 1" will still be
>> "unsigned int" according to the C standard (3.2.1.5 Usual arithmetic
>> conversions). Therefore, GENMASK(size - 1, 0) will always return 0UL.
>
> Huh?!
>
> Have you run test_bitmap et al., btw?

Not yet. I'll setup a VM to run it soon.

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