mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Paul Turner <pjt@google.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Il Han <corone.il.han@gmail.com>, Ingo Molnar <mingo@elte.hu>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] sched: add the inline keyword to the prototype.
Date: Wed, 16 Nov 2011 10:40:17 -0800	[thread overview]
Message-ID: <4EC40391.7080508@google.com> (raw)
In-Reply-To: <1321434038.1421.73.camel@twins>

On 11/16/2011 01:00 AM, Peter Zijlstra wrote:
> On Tue, 2011-11-15 at 23:28 -0800, Paul Turner wrote:
>> On 11/15/2011 10:16 AM, Il Han wrote:
>>> The prototype has to agree with the definition.
>>> Add the inline keyword to the prototype also
>>>
>>
>> Hmm... this would then cause the prototypes to disagree in the
>> !CONFIG_CFS_BANDWIDTH case.
>
> I'm very sure I've compiled a lot of kernels yesterday with various
> permutations including FAIR_GROUP&&  !CFS_BANDWIDTH and I'm also very
> sure I haven't actually seen any complaints like this.
>
> It this some new fangled GCC 'feature'? I'm currently still on 4.5 which
> admittedly is somewhat stale.

gcc (even 4.6) won't give warnings either way about the inline attribute on a 
forward declaration not matching in either direction.  I would imagine this was 
found by code-inspection.

I was only pointing out with this we have:

#if CONFIG_CFS_BANDWIDTH
static __always_inline xxx() { stuff; } [1]
#else
static xxx() {} [2]
#endif

And that by only changing the pre-declaration to match [1] it now similarly 
(silently) would not match [2] in the !CONFIG case.

- Paul

  reply	other threads:[~2011-11-16 18:40 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-15 18:16 Il Han
2011-11-16  7:28 ` Paul Turner
2011-11-16  9:00   ` Peter Zijlstra
2011-11-16 18:40     ` Paul Turner [this message]
2011-11-16 12:45 Il Han
2011-11-16 13:06 ` Peter Zijlstra

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=4EC40391.7080508@google.com \
    --to=pjt@google.com \
    --cc=corone.il.han@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=peterz@infradead.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

Powered by JetHome