]> git.baikalelectronics.ru Git - kernel.git/commit
bitmap: Fix return values to be unsigned
authorKees Cook <keescook@chromium.org>
Wed, 18 May 2022 20:52:22 +0000 (13:52 -0700)
committerYury Norov <yury.norov@gmail.com>
Fri, 3 Jun 2022 13:52:58 +0000 (06:52 -0700)
commit82ec096bfe242e1586af6562394fc6b21115b673
tree96a1096bc13d7c9d54cede10e5f4b005db5b3b16
parentda0edda5880f4fe77d6ea4e87c89e72ef86ae67b
bitmap: Fix return values to be unsigned

Both nodemask and bitmap routines had mixed return values that provided
potentially signed return values that could never happen. This was
leading to the compiler getting confusing about the range of possible
return values (it was thinking things could be negative where they could
not be). In preparation for fixing nodemask, fix all the bitmap routines
that should be returning unsigned (or bool) values.

Cc: Yury Norov <yury.norov@gmail.com>
Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Cc: Christophe de Dinechin <dinechin@redhat.com>
Cc: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Zhen Lei <thunder.leizhen@huawei.com>
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Yury Norov <yury.norov@gmail.com>
include/linux/bitmap.h
lib/bitmap.c
tools/include/linux/bitmap.h
tools/lib/bitmap.c