lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sat, 1 May 2010 10:45:22 +0200 (CEST)
From:	Thomas Gleixner <tglx@...utronix.de>
To:	John Stultz <johnstul@...ibm.com>
cc:	lkml <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/3] Add clocksource_register_hz/khz interface

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@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ