All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andi Kleen <ak@muc.de>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: seperator error in __mask_snprintf_len
Date: Fri, 16 Jan 2004 09:25:30 +0100	[thread overview]
Message-ID: <m3n08o1erp.fsf@averell.firstfloor.org> (raw)
In-Reply-To: <1euSb-U8-3@gated-at.bofh.it> (Andrew Morton's message of "Fri, 16 Jan 2004 06:40:07 +0100")

Andrew Morton <akpm@osdl.org> writes:

> +void bitmap_complement(unsigned long *bitmap, int bits)
> +{
> +	int k;
> +
> +	for (k = 0; k < BITS_TO_LONGS(bits); ++k)
> +		bitmap[k] = ~bitmap[k];
> +}
> +EXPORT_SYMBOL(bitmap_complement);

I actually had to change that one in my NUMA API patchkit (which uses
bitmap functions for its node maps), because gcc 3.2 miscompiled the
loop.

Please add something like that (looks silly, but makes a big 
difference):

 static inline void bitmap_complement(unsigned long *bitmap, int bits)
 {
        int k;
+       int max = BITS_TO_LONGS(bits);
 
-       for (k = 0; k < BITS_TO_LONGS(bits); ++k)
+       for (k = 0; k < max; ++k)
                bitmap[k] = ~bitmap[k];

-Andi

       reply	other threads:[~2004-01-16  8:25 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1bpdu-5jP-35@gated-at.bofh.it>
     [not found] ` <1brIi-Y0-57@gated-at.bofh.it>
     [not found]   ` <1bIf6-fh-21@gated-at.bofh.it>
     [not found]     ` <1bRiA-4PD-19@gated-at.bofh.it>
     [not found]       ` <1bRrZ-58C-9@gated-at.bofh.it>
     [not found]         ` <1bSHD-Xz-21@gated-at.bofh.it>
     [not found]           ` <1e2sZ-rG-19@gated-at.bofh.it>
     [not found]             ` <1e3Ih-1V0-1@gated-at.bofh.it>
     [not found]               ` <1e7Cd-4qD-5@gated-at.bofh.it>
     [not found]                 ` <1einZ-64E-11@gated-at.bofh.it>
     [not found]                   ` <1ekpM-87C-1@gated-at.bofh.it>
     [not found]                     ` <1euyS-Eb-19@gated-at.bofh.it>
     [not found]                       ` <1euSb-U8-3@gated-at.bofh.it>
2004-01-16  8:25                         ` Andi Kleen [this message]
2004-01-16  8:35                           ` seperator error in __mask_snprintf_len Andrew Morton
2004-01-16 10:16                             ` Andi Kleen
2004-01-07 16:56 Joe Korty
2004-01-07 19:32 ` Andrew Morton
2004-01-08 13:11   ` Paul Jackson
2004-01-08 22:50     ` Paul Mackerras
2004-01-08 22:59       ` Joe Korty
2004-01-09  0:07         ` Paul Mackerras
2004-01-09  1:11           ` Paul Jackson
2004-01-14 23:03           ` Paul Jackson
2004-01-15  0:27             ` Joe Korty
2004-01-15  0:37               ` Paul Jackson
2004-01-15  4:40               ` Paul Jackson
2004-01-15 16:15                 ` Andrew Morton
2004-01-15 18:15                   ` Joe Korty
2004-01-16  0:17                     ` Paul Jackson
2004-01-16  0:48                       ` Joe Korty
2004-01-16  1:48                         ` Paul Jackson
2004-01-16 23:29                       ` Matthew Dobson
2004-01-17  9:12                         ` Paul Jackson
2004-01-16  5:14                     ` Paul Jackson
2004-01-16  5:26                       ` Andrew Morton
2004-01-16  5:52                         ` William Lee Irwin III
2004-01-16 14:23                       ` Joe Korty
2004-01-17 10:07                         ` Paul Jackson
2004-01-15 22:53                   ` Paul Jackson
2004-01-16  1:06                     ` Andrew Morton
2004-01-16  2:54                       ` Paul Jackson
2004-01-09 14:28         ` Paul Jackson
2004-01-09 14:46       ` Paul Jackson
2004-01-09 15:14         ` Andreas Schwab
2004-01-09 15:25           ` Christoph Hellwig
2004-01-09 17:23             ` Paul Jackson
2004-01-12  0:09               ` Joe Korty
2004-01-12 21:41                 ` Paul Jackson
2004-01-12 22:00                   ` Joe Korty
2004-01-12 22:28                     ` Paul Jackson
2004-01-12 22:39                       ` Joe Korty
2004-01-09 14:57       ` Paul Jackson
2004-01-08  1:06 ` Paul Jackson
2004-01-08  3:32   ` Joe Korty
2004-01-08 10:39     ` Paul Jackson

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=m3n08o1erp.fsf@averell.firstfloor.org \
    --to=ak@muc.de \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.