[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAHp75VegLeoKgSOEhny9fj0VHeJTRiA3DVanztuL5QOgWTZCpQ@mail.gmail.com>
Date: Tue, 14 Aug 2018 15:46:04 +0300
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: Wei Wang <wei.w.wang@...el.com>
Cc: Rasmus Villemoes <linux@...musvillemoes.dk>,
Yury Norov <ynorov@...iumnetworks.com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Jonathan Corbet <corbet@....net>, dgilbert@...hat.com
Subject: Re: [PATCH] linux/bitmap.h: fix BITMAP_LAST_WORD_MASK
On Tue, Aug 7, 2018 at 2:22 PM, Wei Wang <wei.w.wang@...el.com> wrote:
> On 08/07/2018 06:26 PM, Andy Shevchenko wrote:
> "there", I meant that user-space port, not in the kernel.
> e.g.
> Line 225 at https://github.com/qemu/qemu/blob/master/include/qemu/bitmap.h
> (there are a couple of other places)
So, means no problems in Linux kernel project.
Thus -> NAK.
>>> nbits=64, means all the 64 bits need to mask
>>>
>>> The two are different cases, I'm not sure why we let the macro to return
>>> the
>>> same value.
>>
>> The point is macro mustn't be called when nbits==0.
> Yes, I fully agree with that point, but it seems Rasmus NAK-ed that point.
No, we are talking about different things. Rasmus pretty much right
that the caller should have already known nbits and avoid calling this
macro if it's zero.
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists