From: Alexey Dobriyan <adobriyan@gmail.com>
To: Al Viro <viro@ZenIV.linux.org.uk>
Cc: Eric Dumazet <eric.dumazet@gmail.com>,
Jesper Juhl <jj@chaosbits.net>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>,
Michel Lespinasse <walken@google.com>,
Hugh Dickins <hughd@google.com>,
Andrea Arcangeli <aarcange@redhat.com>,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Subject: Re: [PATCH] Put braces around potentially empty 'if' body in handle_pte_fault()
Date: Sun, 18 Dec 2011 04:18:28 +0300 [thread overview]
Message-ID: <20111218011828.GA4445@p183.telecom.by> (raw)
In-Reply-To: <20111218003419.GE2203@ZenIV.linux.org.uk>
On Sun, Dec 18, 2011 at 12:34:19AM +0000, Al Viro wrote:
> On Sun, Dec 18, 2011 at 01:18:55AM +0100, Eric Dumazet wrote:
> > Thats should be fixed in the reverse way :
> >
> > #define flush_tlb_fix_spurious_fault(vma, address) do { } while (0)
>
> There's a better way to do that -
> #define f(a) do { } while(0)
> does not work as a function returning void -
> f(1), g();
> won't work. OTOH
> #define f(a) ((void)0)
> works just fine.
Two words: static inline.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
WARNING: multiple messages have this Message-ID (diff)
From: Alexey Dobriyan <adobriyan@gmail.com>
To: Al Viro <viro@ZenIV.linux.org.uk>
Cc: Eric Dumazet <eric.dumazet@gmail.com>,
Jesper Juhl <jj@chaosbits.net>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>,
Michel Lespinasse <walken@google.com>,
Hugh Dickins <hughd@google.com>,
Andrea Arcangeli <aarcange@redhat.com>,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Subject: Re: [PATCH] Put braces around potentially empty 'if' body in handle_pte_fault()
Date: Sun, 18 Dec 2011 04:18:28 +0300 [thread overview]
Message-ID: <20111218011828.GA4445@p183.telecom.by> (raw)
In-Reply-To: <20111218003419.GE2203@ZenIV.linux.org.uk>
On Sun, Dec 18, 2011 at 12:34:19AM +0000, Al Viro wrote:
> On Sun, Dec 18, 2011 at 01:18:55AM +0100, Eric Dumazet wrote:
> > Thats should be fixed in the reverse way :
> >
> > #define flush_tlb_fix_spurious_fault(vma, address) do { } while (0)
>
> There's a better way to do that -
> #define f(a) do { } while(0)
> does not work as a function returning void -
> f(1), g();
> won't work. OTOH
> #define f(a) ((void)0)
> works just fine.
Two words: static inline.
next prev parent reply other threads:[~2011-12-18 1:18 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-18 0:03 [PATCH] Put braces around potentially empty 'if' body in handle_pte_fault() Jesper Juhl
2011-12-18 0:03 ` Jesper Juhl
2011-12-18 0:18 ` Eric Dumazet
2011-12-18 0:18 ` Eric Dumazet
2011-12-18 0:26 ` Jesper Juhl
2011-12-18 0:26 ` Jesper Juhl
2011-12-18 0:34 ` Al Viro
2011-12-18 0:34 ` Al Viro
2011-12-18 1:18 ` Alexey Dobriyan [this message]
2011-12-18 1:18 ` Alexey Dobriyan
2011-12-19 22:03 ` Andrew Morton
2011-12-19 22:03 ` Andrew Morton
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=20111218011828.GA4445@p183.telecom.by \
--to=adobriyan@gmail.com \
--cc=aarcange@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=eric.dumazet@gmail.com \
--cc=hughd@google.com \
--cc=jj@chaosbits.net \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=viro@ZenIV.linux.org.uk \
--cc=walken@google.com \
/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.