From: Rasmus Villemoes Date: Tue, 30 Oct 2018 22:05:10 +0000 (-0700) Subject: linux/bitmap.h: relax comment on compile-time constant nbits X-Git-Tag: v5.15~7679^2~78 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=41e7b1661ffbf562d3aa2b7ce4ad283db50b711a;p=platform%2Fkernel%2Flinux-starfive.git linux/bitmap.h: relax comment on compile-time constant nbits It's not clear what's so horrible about emitting a function call to handle a run-time sized bitmap. Moreover, gcc also emits a function call for a compile-time-constant-but-huge nbits, so the comment isn't even accurate. Link: http://lkml.kernel.org/r/20180818131623.8755-6-linux@rasmusvillemoes.dk Signed-off-by: Rasmus Villemoes Reviewed-by: Andy Shevchenko Cc: Yury Norov Cc: Rasmus Villemoes Cc: Sudeep Holla Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/include/linux/bitmap.h b/include/linux/bitmap.h index 4032680..f58e974 100644 --- a/include/linux/bitmap.h +++ b/include/linux/bitmap.h @@ -28,8 +28,8 @@ * The available bitmap operations and their rough meaning in the * case that the bitmap is a single unsigned long are thus: * - * Note that nbits should be always a compile time evaluable constant. - * Otherwise many inlines will generate horrible code. + * The generated code is more efficient when nbits is known at + * compile-time and at most BITS_PER_LONG. * * :: *