From: Thomas Gleixner <tglx@linutronix.de>
To: Daniel Walker <dwalker@mvista.com>
Cc: john stultz <johnstul@us.ibm.com>,
akpm@osdl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 04/10] -mm clocksource: add some new API calls
Date: Fri, 04 Aug 2006 23:05:02 +0200 [thread overview]
Message-ID: <1154725503.5932.251.camel@localhost.localdomain> (raw)
In-Reply-To: <1154719720.12936.50.camel@c-67-188-28-158.hsd1.ca.comcast.net>
On Fri, 2006-08-04 at 12:28 -0700, Daniel Walker wrote:
> > > int clocksource_register(struct clocksource *c)
> > > {
> > > int ret = 0;
> > > unsigned long flags;
> > >
> > > + if (unlikely(!c))
> > > + return -EINVAL;
> > > +
> >
> > I'm not sure I understand the need for this. Is it really likely someone
> > would pass NULL to clocksource_register()?
>
> Not likely, I was just covering all possibilities.. It might be better
> as a BUG_ON() actually.
BUG_ON is the only thing, which can be correct here. Registering a NULL
clocksource simply is a bug, but even the BUG_ON is overkill here.
tglx
next prev parent reply other threads:[~2006-08-04 21:04 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-04 3:24 [PATCH 00/10] -mm generic clocksoure API dwalker
2006-08-04 3:24 ` [PATCH 01/10] -mm clocksource: increase initcall priority dwalker
2006-08-04 18:39 ` john stultz
2006-08-04 3:24 ` [PATCH 02/10] -mm clocksource: small cleanup dwalker
2006-08-04 18:40 ` john stultz
2006-08-04 3:24 ` [PATCH 03/10] -mm clocksource: enable plist dwalker
2006-08-04 3:24 ` [PATCH 04/10] -mm clocksource: add some new API calls dwalker
2006-08-04 19:06 ` john stultz
2006-08-04 19:28 ` Daniel Walker
2006-08-04 21:05 ` Thomas Gleixner [this message]
2006-08-04 3:24 ` [PATCH 05/10] -mm clocksource: convert generic timeofday dwalker
2006-08-04 3:24 ` [PATCH 06/10] -mm clocksource: add block notifier dwalker
2006-08-04 3:24 ` [PATCH 07/10] -mm clocksource: remove update_callback dwalker
2006-08-04 19:28 ` john stultz
2006-08-04 3:24 ` [PATCH 08/10] -mm clocksource: cleanup on -mm dwalker
2006-08-04 19:53 ` john stultz
2006-08-04 21:11 ` Daniel Walker
2006-08-04 22:16 ` john stultz
2006-08-04 23:16 ` Daniel Walker
2006-08-04 3:24 ` [PATCH 09/10] -mm clocksource: initialize list value dwalker
2006-08-04 3:24 ` [PATCH 10/10] -mm clocksource: add generic sched_clock() dwalker
-- strict thread matches above, loose matches on Subject: below --
2006-10-06 18:54 [PATCH 00/10] -mm: generic clocksource API -v2 Daniel Walker
2006-10-06 18:54 ` [PATCH 04/10] -mm: clocksource: add some new API calls Daniel Walker
2006-10-09 19:01 ` 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=1154725503.5932.251.camel@localhost.localdomain \
--to=tglx@linutronix.de \
--cc=akpm@osdl.org \
--cc=dwalker@mvista.com \
--cc=johnstul@us.ibm.com \
--cc=linux-kernel@vger.kernel.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