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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 12 Dec 2007 03:33:25 -0800
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Jesper Nilsson <jesper.nilsson@...s.com>
Cc:	Mikael Starvik <mikael.starvik@...s.com>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 46/47] Update and improve CRISv32 kernel/time.c

On Tue, 4 Dec 2007 17:25:45 +0100 Jesper Nilsson <jesper.nilsson@...s.com> wrote:

> +#ifdef CONFIG_CPU_FREQ
> +	cpufreq_register_notifier(&cris_time_freq_notifier_block,
> +		CPUFREQ_TRANSITION_NOTIFIER);
>  #endif

include/linux/cpufreq.h has

#ifdef CONFIG_CPU_FREQ
...
#else		/* CONFIG_CPU_FREQ */
static inline int cpufreq_register_notifier(struct notifier_block *nb,
						unsigned int list)
{
	return 0;
}


the idea is that you remove the above ifdefs and also the ifdefs around
cris_time_freq_notifier_block and then gcc magically removes
cris_time_freq_notifier_block from your generated code.

Advantages: no ifdefs, and full typechecking even when CONFIG_CPU_FREQ=n.


cpufreq_register_notifier() can fail but this code pretends otherwise...
--
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