From: Andrew Morton <akpm@linux-foundation.org>
To: "Américo Wang" <xiyou.wangcong@gmail.com>
Cc: rakib.mullick@gmail.com, xiyou.wangcong@gmail.com,
adobriyan@gmail.com, linux-kernel@vger.kernel.org, mingo@elte.hu
Subject: Re: [PATCH] init: Properly placing noinline keyword.
Date: Mon, 20 Oct 2008 15:12:45 -0700 [thread overview]
Message-ID: <20081020151245.64101fbb.akpm@linux-foundation.org> (raw)
In-Reply-To: <20081017173123.GC19832@hack.voiplan.pt>
On Fri, 17 Oct 2008 18:31:23 +0100
Am__rico Wang <xiyou.wangcong@gmail.com> wrote:
> On Fri, Oct 17, 2008 at 09:10:07PM +0600, Rakib Mullick wrote:
> >On 10/17/08, Am__rico Wang <xiyou.wangcong@gmail.com> wrote:
> >> On Fri, Oct 17, 2008 at 08:17:33PM +0600, Rakib Mullick wrote:
> >> >On 10/17/08, Alexey Dobriyan <adobriyan@gmail.com> wrote:
> >> >> On Fri, Oct 17, 2008 at 07:05:32PM +0600, Rakib Mullick wrote:
> >> >> > Here, noinline keyword should be placed between storage class and type.
> >> >>
> >> >>
> >> >> Why?
> >> >Because, scripts/checkpatch.pl warned with following warning:
> >> > ERROR: inline keyword should sit between storage class and type
> >>
> >>
> >> Well, 'noinline' is different from 'inline'.
> >>
> >> 'noinline' is defined as:
> >>
> >> #define noinline __attribute__((noinline))
> >>
> >> in include/linux/compiler-gcc.h. But 'inline' is a _keyword_ defined
> >> by C standard. If checkpatch.pl complains about 'noinline', you should
> >> fix checkpatch.pl. :)
> >Thanks, for explanation. But isn't it nice to place it between storage
> >class and type ?
>
> I don't think so, I don't know why checkpatch.pl prefers that style.
> I think probably only because that is more readable?
>
I think it's good for consistency reasons. Yes, we _could_ have a
random sprinkling of different keyword orderings, but what benefit is
there in that? In the great majority of places the kernel uses `static
inline void' and `static noinline void' ordering, and that's a good
thing, no?
So I merged the patch and I'd support retaining the checkpatch warning.
My one concern is that the patch is too small. Probably there are
other codesites which get the keywords in a non-standard order, and I'd
rather fix them up in a single big pass rather than in a long series of
little patches.
prev parent reply other threads:[~2008-10-20 22:13 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-17 13:05 [PATCH] init: Properly placing noinline keyword Rakib Mullick
2008-10-17 14:13 ` Alexey Dobriyan
2008-10-17 14:17 ` Rakib Mullick
2008-10-17 14:26 ` Américo Wang
2008-10-17 15:10 ` Rakib Mullick
2008-10-17 17:31 ` Américo Wang
2008-10-20 22:12 ` Andrew Morton [this message]
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=20081020151245.64101fbb.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=adobriyan@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=rakib.mullick@gmail.com \
--cc=xiyou.wangcong@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 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.