public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Kasper Dupont <kasperd@daimi.au.dk>
To: linux-kernel@vger.kernel.org
Subject: Re: [patch] 2.5.9 remove warnings
Date: Tue, 23 Apr 2002 23:08:08 +0200	[thread overview]
Message-ID: <3CC5CD38.DC57DFA3@daimi.au.dk> (raw)
In-Reply-To: <10704.1019533171@kao2.melbourne.sgi.com> <3CC5A8AF.432380E3@zip.com.au>

Andrew Morton wrote:
> 
> Is it not possible to fix it for all time?
> 
> --- linux-2.5.9/include/linux/compiler.h        Sun Apr 14 15:45:08 2002
> +++ 25/include/linux/compiler.h Tue Apr 23 11:27:37 2002
> @@ -10,8 +10,8 @@
>  #define __builtin_expect(x, expected_value) (x)
>  #endif
> 
> -#define likely(x)      __builtin_expect((x),1)
> -#define unlikely(x)    __builtin_expect((x),0)
> +#define likely(x)      __builtin_expect((x) != 0, 1)
> +#define unlikely(x)    __builtin_expect((x) != 0, 0)
> 
>  /* This macro obfuscates arithmetic on a variable address so that gcc
>     shouldn't recognize the original var, and make assumptions about it */

Wouldn't "!!(x)" make more sense here than "(x) != 0"?
(I don't like comparing pointers with integers.)

-- 
Kasper Dupont -- der bruger for meget tid på usenet.
For sending spam use mailto:razor-report@daimi.au.dk

  reply	other threads:[~2002-04-23 21:08 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-04-23  3:39 [patch] 2.5.9 remove warnings Keith Owens
2002-04-23  9:37 ` Daniel Phillips
2002-04-23 18:32 ` Andrew Morton
2002-04-23 21:08   ` Kasper Dupont [this message]
2002-04-24 18:56     ` Ingo Oeser

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=3CC5CD38.DC57DFA3@daimi.au.dk \
    --to=kasperd@daimi.au.dk \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox