Re: [PATCH 1/3] Add clocksource_register_hz/khz interface

From: Thomas Gleixner
Date: Sat May 01 2010 - 04:45:37 EST


On Fri, 30 Apr 2010, John Stultz wrote:
> +/**
> + * clocksource_register - Used to install new clocksources
> + * @t: clocksource to be registered

Can you fix the kernel doc please ?

> + *
> + * Returns -EBUSY if registration fails, zero otherwise.
> + */
> +int clocksource_register_hz(struct clocksource *cs, u32 hz)
> +{
> +
> + /* Ideally we want to use some of the limits used in
> + * clocksource_max_deferment, to provide a more informed
> + * MAX_UPDATE_LENGTH. But for now this just gets the
> + * regiseter interface working properly.
> + */
> + clocks_calc_mult_shift(&cs->mult, &cs->shift, hz,
> + NSEC_PER_SEC, MAX_UPDATE_LENGTH);
> + cs->max_idle_ns = clocksource_max_deferment(cs);
> +
> + mutex_lock(&clocksource_mutex);
> + clocksource_enqueue(cs);
> + clocksource_select();
> + clocksource_enqueue_watchdog(cs);
> + mutex_unlock(&clocksource_mutex);
> + return 0;
> +}
> +EXPORT_SYMBOL(clocksource_register_hz);

EXPORT_SYMBOL_GPL please

> +
> +/**
> + * clocksource_register - Used to install new clocksources
> + * @t: clocksource to be registered
> + *
> + * Returns -EBUSY if registration fails, zero otherwise.
> + */
> +int clocksource_register_khz(struct clocksource *cs, u32 khz)
> +{

shouldn't that be a simple inline wrapper which does

return clocksource_register_hz(cs, khz * 1000);

Thanks,

tglx
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/