lkml.org 
[lkml]   [2011]   [Dec]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Put braces around potentially empty 'if' body in handle_pte_fault()
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.


\
 
 \ /
  Last update: 2011-12-18 02:21    [W:0.194 / U:0.200 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site