All of lore.kernel.org
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Konstantin Khlebnikov <khlebnikov@openvz.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH 2/4] bug: completely remove code of disabled VM_BUG_ON()
Date: Wed, 25 Apr 2012 16:40:32 +0200	[thread overview]
Message-ID: <CAMuHMdW7eQh8eaNZrwRHqduPYCjNXv+LriZoH6-ERdkHH2qL8g@mail.gmail.com> (raw)
In-Reply-To: <20120425112629.26927.21609.stgit@zurg>

On Wed, Apr 25, 2012 at 13:26, Konstantin Khlebnikov
<khlebnikov@openvz.org> wrote:
> Even if CONFIG_DEBUG_VM=n gcc genereates code for some VM_BUG_ON()

That's because of the side effects of the expression

https://lkml.org/lkml/2012/4/25/146

But IRIC, we do want them here?

> bloat-o-meter: add/remove: 0/1 grow/shrink: 10/120 up/down: 185/-1889 (-1704)
>
> Signed-off-by: Konstantin Khlebnikov <khlebnikov@openvz.org>
> ---
>  include/linux/mmdebug.h |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/linux/mmdebug.h b/include/linux/mmdebug.h
> index c04ecfe..9c9a2a0 100644
> --- a/include/linux/mmdebug.h
> +++ b/include/linux/mmdebug.h
> @@ -4,7 +4,7 @@
>  #ifdef CONFIG_DEBUG_VM
>  #define VM_BUG_ON(cond) BUG_ON(cond)
>  #else
> -#define VM_BUG_ON(cond) do { (void)(cond); } while (0)
> +#define VM_BUG_ON(cond) unused_expression(cond)
>  #endif
>
>  #ifdef CONFIG_DEBUG_VIRTUAL

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

  reply	other threads:[~2012-04-25 14:40 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-25 11:26 [PATCH 1/4] compiler.h: introduce unused_expression() macro Konstantin Khlebnikov
2012-04-25 11:26 ` [PATCH 2/4] bug: completely remove code of disabled VM_BUG_ON() Konstantin Khlebnikov
2012-04-25 14:40   ` Geert Uytterhoeven [this message]
2012-04-26 22:32     ` Andrew Morton
2012-04-27  5:17       ` Geert Uytterhoeven
2012-04-27  7:07         ` Andrew Morton
2012-04-25 11:26 ` [PATCH 3/4] bug: completely remove code of disabled BUG_ON() Konstantin Khlebnikov
2012-04-25 11:26 ` [PATCH 4/4] bug: mark disabled BUG() as unreachable() code Konstantin Khlebnikov
2012-04-28  5:10   ` Konstantin Khlebnikov
2012-04-28  5:21     ` Linus Torvalds
2012-04-28  6:14     ` Andrew Morton
2012-04-25 11:51 ` [PATCH 1/4] compiler.h: introduce unused_expression() macro Cong Wang
2012-04-25 11:54   ` Konstantin Khlebnikov
2012-04-26 22:29 ` Andrew Morton
2012-04-27  9:55   ` Konstantin Khlebnikov
2012-04-27 21:53     ` Andrew Morton
2012-04-26 22:34 ` Andrew Morton
2012-04-27  7:54   ` Konstantin Khlebnikov
2012-04-27  8:16 ` H. Peter Anvin
2012-04-28  3:50   ` Konstantin Khlebnikov
2012-04-28  7:06 ` [PATCH v2 1/2] bug: introduce BUILD_BUG_ON_INVALID() macro Konstantin Khlebnikov
2012-04-28  7:06   ` Konstantin Khlebnikov
2012-04-28  7:06 ` [PATCH v2 2/2] bug: completely remove code of disabled VM_BUG_ON() Konstantin Khlebnikov
2012-04-28  7:06   ` Konstantin Khlebnikov

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=CAMuHMdW7eQh8eaNZrwRHqduPYCjNXv+LriZoH6-ERdkHH2qL8g@mail.gmail.com \
    --to=geert@linux-m68k.org \
    --cc=akpm@linux-foundation.org \
    --cc=khlebnikov@openvz.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@linux-foundation.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.