public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: "Pekka Enberg" <penberg@cs.helsinki.fi>
Cc: "Steve French" <smfrench@gmail.com>, lkml <linux-kernel@vger.kernel.org>
Subject: Re: optimizing out inline functions
Date: Thu, 29 May 2008 01:40:33 -0700	[thread overview]
Message-ID: <20080529014033.90b0566b.akpm@linux-foundation.org> (raw)
In-Reply-To: <84144f020805281254o16c903b6p2c14e5874d5ad67f@mail.gmail.com>

On Wed, 28 May 2008 22:54:47 +0300 "Pekka Enberg" <penberg@cs.helsinki.fi> wrote:

> On Wed, May 28, 2008 at 10:51 PM, Steve French <smfrench@gmail.com> wrote:
> > Is one or the other style (with or without #define of empty function)
> > preferred?  Does the compiler optimize both #else clauses out
> > properly?  sparse and checkpatch seem to take either
> 
> Both are optimized out but empty function is preferred for type checking.

Plus the inlined function can help suppress unused-var warnings because
it counts as a "use".

Sometimes this works the other way and the argument to the macro/inline
just doesn't exist, in which case we're forced to use a macro for the stub.




  reply	other threads:[~2008-05-29  8:40 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-28 19:51 optimizing out inline functions Steve French
2008-05-28 19:54 ` Pekka Enberg
2008-05-29  8:40   ` Andrew Morton [this message]
2008-05-28 20:00 ` Sam Ravnborg
2008-05-29 16:39   ` Steve French
2008-05-29 17:20     ` Sam Ravnborg
2008-06-02  9:38     ` Vegard Nossum
     [not found] <ayzYV-7mv-5@gated-at.bofh.it>
     [not found] ` <ayA8E-89e-29@gated-at.bofh.it>
2008-05-28 20:37   ` James Kosin
2008-05-29  3:27     ` Johannes Weiner
2008-05-29  3:04       ` Joe Perches
2008-05-29 13:11       ` James Kosin
2008-05-29 13:13       ` James Kosin

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=20080529014033.90b0566b.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=penberg@cs.helsinki.fi \
    --cc=smfrench@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox