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
| ||
|
Date: Thu, 27 Jul 2006 13:46:40 -0700 From: "H. Peter Anvin" <hpa@...or.com> To: Arjan van de Ven <arjan@...radead.org> CC: Russell King <rmk+lkml@....linux.org.uk>, Linux Kernel List <linux-kernel@...r.kernel.org>, Ingo Molnar <mingo@...e.hu> Subject: Re: lockdep: results on ARM Arjan van de Ven wrote: > On Thu, 2006-07-27 at 15:24 +0100, Russell King wrote: >> +#ifdef __ARCH_WANT_INTERRUPTS_ON_CTXSW >> + p->hardirqs_enabled = 1; >> +#else >> p->hardirqs_enabled = 0; >> +#endif > > if __ARCH_WANT_INTERRUPTS_ON_CTXSW is set to 1 for arm you can turn this > into > > p->hardirqs_enabled = __ARCH_WANT_INTERRUPTS_ON_CTXSW + 0; > > and save the ifdef ;) > #ifdef is actually really evil. It's much cleaner to use #if and make sure everything defines either 0 or 1. Partially because it often makes you not have to add an #if at all, but also because it makes it immediately obvious if some definition was missed. -hpa - 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