public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Martin Schwidefsky <schwidefsky@de.ibm.com>
To: Will Newton <will.newton@gmail.com>
Cc: dwalker@fifo99.com, linux-kernel@vger.kernel.org,
	Ingo Molnar <mingo@elte.hu>, Thomas Gleixner <tglx@linutronix.de>,
	john stultz <johnstul@us.ibm.com>
Subject: Re: [RFC][patch 02/12] remove clocksource inline functions
Date: Wed, 29 Jul 2009 18:44:44 +0200	[thread overview]
Message-ID: <20090729184444.3937807a@skybase> (raw)
In-Reply-To: <20090729182754.2361631b@skybase>

On Wed, 29 Jul 2009 18:27:54 +0200
Martin Schwidefsky <schwidefsky@de.ibm.com> wrote:

> On Wed, 29 Jul 2009 16:36:46 +0100
> Will Newton <will.newton@gmail.com> wrote:
> 
> > On Wed, Jul 29, 2009 at 4:32 PM, Martin
> > Schwidefsky<schwidefsky@de.ibm.com> wrote:
> > 
> > > Hmm, you have an object of type struct clocksource and you do
> > > cs->read(cs). If that is not clear enough then I don't know what is. We
> > > do that all over the place in the linux kernel. And I personally find
> > > these useless wrappers rather annoying. I don't like to have to jump to
> > > another place to find out that it just calls the read function of the
> > > object.
> > 
> > An argument for the helper is that it eases grepability. Sure you can
> > search for "->read" but that's going to turn up all kinds of
> > non-clocksource code as well. grep clocksource_read will get you
> > exactly what you want.
> 
> That would make sense if the clocksource_read calls are littered all
> over the kernel source. But they are not, the only user is
> timekeeping.c
 
And What I find odd as well is e.g. this:

offset = (clocksource_read(clock) - clock->cycle_last) & clock->mask

A mixture of a wrapper to get something out of the clock and a direct
access to other fields of the clocksource. Either it is wrapped or it
isn't, no? A proper wrapper would do all of the above and not just the
call over the read function pointer.


-- 
blue skies,
   Martin.

"Reality continues to ruin my life." - Calvin.


  reply	other threads:[~2009-07-29 16:44 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200907291457.n6TEvDAt003701@d06av06.portsmouth.uk.ibm.com>
2009-07-29 15:32 ` [RFC][patch 02/12] remove clocksource inline functions Martin Schwidefsky
2009-07-29 15:36   ` Will Newton
2009-07-29 16:27     ` Martin Schwidefsky
2009-07-29 16:44       ` Martin Schwidefsky [this message]
2009-07-30 12:21       ` Valdis.Kletnieks
2009-07-30 21:48         ` Christoph Hellwig
2009-07-31 11:50           ` Valdis.Kletnieks
2009-08-03  8:10             ` Martin Schwidefsky
2009-07-29 15:52   ` Daniel Walker
2009-07-29 16:37     ` Martin Schwidefsky
     [not found] <200907291415.n6TEFJkA019086@d06av05.portsmouth.uk.ibm.com>
2009-07-29 14:44 ` Martin Schwidefsky
2009-07-29 14:57   ` Daniel Walker
2009-07-29 13:41 [RFC][patch 00/12] clocksource / timekeeping rework V2 Martin Schwidefsky
2009-07-29 13:41 ` [RFC][patch 02/12] remove clocksource inline functions Martin Schwidefsky
2009-07-29 14:15   ` Daniel Walker
2009-07-30 21:46     ` Christoph Hellwig
2009-07-30 21:05   ` john stultz

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=20090729184444.3937807a@skybase \
    --to=schwidefsky@de.ibm.com \
    --cc=dwalker@fifo99.com \
    --cc=johnstul@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=tglx@linutronix.de \
    --cc=will.newton@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