From: Ingo Molnar <mingo@elte.hu>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: "linux-mm@kvack.org" <linux-mm@kvack.org>,
Thomas Gleixner <tglx@linutronix.de>,
linuxppc-dev <linuxppc-dev@lists.ozlabs.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/2] powerpc/mm: Fix memory_block_size_bytes() for non-pseries
Date: Sat, 2 Jul 2011 12:23:33 +0200 [thread overview]
Message-ID: <20110702102333.GC17482@elte.hu> (raw)
In-Reply-To: <1309562112.14501.257.camel@pasglop>
* Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:
> On Fri, 2011-07-01 at 14:15 +0200, Ingo Molnar wrote:
>
> > > +/* WARNING: This is going to override the generic definition whenever
> > > + * pseries is built-in regardless of what platform is active at boot
> > > + * time. This is fine for now as this is the only "option" and it
> > > + * should work everywhere. If not, we'll have to turn this into a
> > > + * ppc_md. callback
> > > + */
> >
> > Just a small nit, please use the customary (multi-line) comment
> > style:
> >
> > /*
> > * Comment .....
> > * ...... goes here.
> > */
> >
> > specified in Documentation/CodingStyle.
>
> Ah ! Here goes my sneak attempts at violating coding style while
> nobody notices :-)
>
> No seriously, that sort of stuff shouldn't be such a hard rule...
> In some cases the "official" way looks nicer, on some cases it's
> just a waste of space, and I've grown to prefer my slightly more
> compact form, at least depending on how the surrounding code looks
> like.
>
> Since that's all powerpc arch code, I believe I'm entitled to that
> little bit of flexibility in how the code looks like :-) It's not
> like I'm GoingToPlayWithCaps() or switching to 3-char tabs :-)
It's certainly not a hard rule - but note that the file in question
(arch/powerpc/platforms/pseries/hotplug-memory.c) has a rather
inconsistent comment style, sometimes even within the same function:
/*
* Remove htab bolted mappings for this section of memory
*/
...
/* Ensure all vmalloc mappings are flushed in case they also
* hit that section of memory
*/
That kind of inconsistency within the same .c file and within the
same function is not defensible with a "style is a matter of taste"
argument.
As i said, it's just a small nit.
Thanks,
Ingo
WARNING: multiple messages have this Message-ID (diff)
From: Ingo Molnar <mingo@elte.hu>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Thomas Gleixner <tglx@linutronix.de>,
"linux-mm@kvack.org" <linux-mm@kvack.org>,
linuxppc-dev <linuxppc-dev@lists.ozlabs.org>
Subject: Re: [PATCH 2/2] powerpc/mm: Fix memory_block_size_bytes() for non-pseries
Date: Sat, 2 Jul 2011 12:23:33 +0200 [thread overview]
Message-ID: <20110702102333.GC17482@elte.hu> (raw)
In-Reply-To: <1309562112.14501.257.camel@pasglop>
* Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:
> On Fri, 2011-07-01 at 14:15 +0200, Ingo Molnar wrote:
>
> > > +/* WARNING: This is going to override the generic definition whenever
> > > + * pseries is built-in regardless of what platform is active at boot
> > > + * time. This is fine for now as this is the only "option" and it
> > > + * should work everywhere. If not, we'll have to turn this into a
> > > + * ppc_md. callback
> > > + */
> >
> > Just a small nit, please use the customary (multi-line) comment
> > style:
> >
> > /*
> > * Comment .....
> > * ...... goes here.
> > */
> >
> > specified in Documentation/CodingStyle.
>
> Ah ! Here goes my sneak attempts at violating coding style while
> nobody notices :-)
>
> No seriously, that sort of stuff shouldn't be such a hard rule...
> In some cases the "official" way looks nicer, on some cases it's
> just a waste of space, and I've grown to prefer my slightly more
> compact form, at least depending on how the surrounding code looks
> like.
>
> Since that's all powerpc arch code, I believe I'm entitled to that
> little bit of flexibility in how the code looks like :-) It's not
> like I'm GoingToPlayWithCaps() or switching to 3-char tabs :-)
It's certainly not a hard rule - but note that the file in question
(arch/powerpc/platforms/pseries/hotplug-memory.c) has a rather
inconsistent comment style, sometimes even within the same function:
/*
* Remove htab bolted mappings for this section of memory
*/
...
/* Ensure all vmalloc mappings are flushed in case they also
* hit that section of memory
*/
That kind of inconsistency within the same .c file and within the
same function is not defensible with a "style is a matter of taste"
argument.
As i said, it's just a small nit.
Thanks,
Ingo
WARNING: multiple messages have this Message-ID (diff)
From: Ingo Molnar <mingo@elte.hu>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Thomas Gleixner <tglx@linutronix.de>,
"linux-mm@kvack.org" <linux-mm@kvack.org>,
linuxppc-dev <linuxppc-dev@lists.ozlabs.org>
Subject: Re: [PATCH 2/2] powerpc/mm: Fix memory_block_size_bytes() for non-pseries
Date: Sat, 2 Jul 2011 12:23:33 +0200 [thread overview]
Message-ID: <20110702102333.GC17482@elte.hu> (raw)
In-Reply-To: <1309562112.14501.257.camel@pasglop>
* Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:
> On Fri, 2011-07-01 at 14:15 +0200, Ingo Molnar wrote:
>
> > > +/* WARNING: This is going to override the generic definition whenever
> > > + * pseries is built-in regardless of what platform is active at boot
> > > + * time. This is fine for now as this is the only "option" and it
> > > + * should work everywhere. If not, we'll have to turn this into a
> > > + * ppc_md. callback
> > > + */
> >
> > Just a small nit, please use the customary (multi-line) comment
> > style:
> >
> > /*
> > * Comment .....
> > * ...... goes here.
> > */
> >
> > specified in Documentation/CodingStyle.
>
> Ah ! Here goes my sneak attempts at violating coding style while
> nobody notices :-)
>
> No seriously, that sort of stuff shouldn't be such a hard rule...
> In some cases the "official" way looks nicer, on some cases it's
> just a waste of space, and I've grown to prefer my slightly more
> compact form, at least depending on how the surrounding code looks
> like.
>
> Since that's all powerpc arch code, I believe I'm entitled to that
> little bit of flexibility in how the code looks like :-) It's not
> like I'm GoingToPlayWithCaps() or switching to 3-char tabs :-)
It's certainly not a hard rule - but note that the file in question
(arch/powerpc/platforms/pseries/hotplug-memory.c) has a rather
inconsistent comment style, sometimes even within the same function:
/*
* Remove htab bolted mappings for this section of memory
*/
...
/* Ensure all vmalloc mappings are flushed in case they also
* hit that section of memory
*/
That kind of inconsistency within the same .c file and within the
same function is not defensible with a "style is a matter of taste"
argument.
As i said, it's just a small nit.
Thanks,
Ingo
--
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>
next prev parent reply other threads:[~2011-07-02 10:23 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-14 0:57 [PATCH 2/2] powerpc/mm: Fix memory_block_size_bytes() for non-pseries Benjamin Herrenschmidt
2011-06-14 0:57 ` Benjamin Herrenschmidt
2011-06-14 0:57 ` Benjamin Herrenschmidt
2011-07-01 12:15 ` Ingo Molnar
2011-07-01 12:15 ` Ingo Molnar
2011-07-01 12:15 ` Ingo Molnar
2011-07-01 23:15 ` Benjamin Herrenschmidt
2011-07-01 23:15 ` Benjamin Herrenschmidt
2011-07-01 23:15 ` Benjamin Herrenschmidt
2011-07-02 10:23 ` Ingo Molnar [this message]
2011-07-02 10:23 ` Ingo Molnar
2011-07-02 10:23 ` Ingo Molnar
2011-07-02 14:15 ` Benjamin Herrenschmidt
2011-07-02 14:15 ` Benjamin Herrenschmidt
2011-07-02 14:15 ` Benjamin Herrenschmidt
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=20110702102333.GC17482@elte.hu \
--to=mingo@elte.hu \
--cc=benh@kernel.crashing.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=tglx@linutronix.de \
/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.