[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <adcdf79d-e50c-2fb0-e105-67b384189999@quicinc.com>
Date: Tue, 26 Oct 2021 11:26:14 -0400
From: Qian Cai <quic_qiancai@...cinc.com>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
CC: Yury Norov <yury.norov@...il.com>,
Rasmus Villemoes <linux@...musvillemoes.dk>,
<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] bitmap: simplify GENMASK(size - 1, 0) lines
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.
Powered by blists - more mailing lists