linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Yury Norov <ynorov@caviumnetworks.com>
To: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 5/7] linux/bitmap.h: relax comment on compile-time constant nbits
Date: Tue, 4 Sep 2018 14:08:59 +0300	[thread overview]
Message-ID: <20180904110859.GA4992@yury-thinkpad> (raw)
In-Reply-To: <20180818131623.8755-6-linux@rasmusvillemoes.dk>

On Sat, Aug 18, 2018 at 03:16:21PM +0200, Rasmus Villemoes wrote:
> 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.
> 
> Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>

Hi Rasmus,

Maybe too late, but 

Acked-by: Yury Norov <ynorov@caviumnetworks.com>
> ---
>  include/linux/bitmap.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/include/linux/bitmap.h b/include/linux/bitmap.h
> index e34c361f4a92..3f0cac3aedca 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.
>   *
>   * ::
>   *
> --
> 2.16.4

  reply	other threads:[~2018-09-04 11:09 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-18 13:16 [PATCH 0/7] assorted minor bitmap patches Rasmus Villemoes
2018-08-18 13:16 ` [PATCH 1/7] lib/bitmap.c: remove wrong documentation Rasmus Villemoes
2018-08-18 13:16 ` [PATCH 2/7] linux/bitmap.h: handle constant zero-size bitmaps correctly Rasmus Villemoes
2018-08-18 13:16 ` [PATCH 3/7] linux/bitmap.h: remove redundant uses of small_const_nbits() Rasmus Villemoes
2018-08-18 13:16 ` [PATCH 4/7] linux/bitmap.h: fix type of nbits in bitmap_shift_right() Rasmus Villemoes
2018-08-18 13:16 ` [PATCH 5/7] linux/bitmap.h: relax comment on compile-time constant nbits Rasmus Villemoes
2018-09-04 11:08   ` Yury Norov [this message]
2018-09-04 11:30     ` Andy Shevchenko
2018-09-04 11:45       ` Rasmus Villemoes
2018-08-18 13:16 ` [PATCH 6/7] lib/bitmap.c: fix remaining space computation in bitmap_print_to_pagebuf Rasmus Villemoes
2018-08-19 12:37   ` Andy Shevchenko
2018-08-20  7:36     ` Rasmus Villemoes
2018-08-18 13:16 ` [PATCH 7/7] lib/bitmap.c: simplify bitmap_print_to_pagebuf Rasmus Villemoes
2018-08-19 12:39 ` [PATCH 0/7] assorted minor bitmap patches Andy Shevchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180904110859.GA4992@yury-thinkpad \
    --to=ynorov@caviumnetworks.com \
    --cc=akpm@linux-foundation.org \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@rasmusvillemoes.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).