[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YsAyv66xOYoNSoga@smile.fi.intel.com>
Date: Sat, 2 Jul 2022 14:57:51 +0300
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Yury Norov <yury.norov@...il.com>
Cc: linux-kernel@...r.kernel.org,
Andrew Morton <akpm@...ux-foundation.org>,
David Howells <dhowells@...hat.com>,
Geert Uytterhoeven <geert@...ux-m68k.org>,
Jonathan Corbet <corbet@....net>,
"Kirill A . Shutemov" <kirill.shutemov@...ux.intel.com>,
Matthew Wilcox <willy@...radead.org>,
NeilBrown <neilb@...e.de>,
Rasmus Villemoes <linux@...musvillemoes.dk>,
Russell King <linux@...linux.org.uk>,
Vlastimil Babka <vbabka@...e.cz>,
William Kucharski <william.kucharski@...cle.com>,
linux-doc@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-mm@...ck.org
Subject: Re: [PATCH 3/8] lib/bitmap: change type of bitmap_weight to unsigned
int
On Fri, Jul 01, 2022 at 05:54:25AM -0700, Yury Norov wrote:
> bitmap_weight() doesn't return negative values, so change it's type
> to unsigned int.
Patch (the code) suggests something else.
> It may help compiler to generate better code and
> catch bugs.
...
> -int __bitmap_weight(const unsigned long *bitmap, unsigned int nbits);
> +unsigned long __bitmap_weight(const unsigned long *bitmap, unsigned int nbits);
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists