2008/5/17 Cyrill Gorcunov <gorcunov@gmail.com>:Hi, I've always wondered if it's cleaner to define variants of functions like this with the conditionals inside the function, as opposed to one big conditional encapsulating all these functions. IMO, it's cleaner to define the function with conditionals to define it's particular behaviour in the two different cases, because that way there is one definition of the function with both different behaviours inside, e.g.: static inline unsigned int get_nmi_count(int cpu) { #ifdef CONFIG_X86_64 return cpu_pda(cpu)->__nmi_count; #else return nmi_count(cpu); #endif } I know it introduces a lot of these conditionals, but at least there is one place to look for the get_nmi_count function, instead of searching for all variants of the function. Just a thought! -- Regards, Tom Spink --
| Arjan van de Ven | [Patch v2] Make PCI extended config space (MMCONFIG) a driver opt-in |
| Linus Torvalds | Linux 2.6.27-rc8 |
| Tilman Schmidt | git guidance |
| Greg KH | [GIT PATCH] driver core patches against 2.6.24 |
git: | |
| Martin Langhoff | Re: pack operation is thrashing my server |
| Alan Larkin | fatal: Out of memory, malloc failed |
| Mark Junker | git on MacOSX and files with decomposed utf-8 file names |
| Alex Riesen | Re: How do get a specific version of a particular file? |
| Leon Dippenaar | New tcp stack attack |
| Richard Stallman | Real men don't attack straw men |
| Pieter Verberne | Remove escape characters from file |
| Juan Miscaro | removing sendmail |
| Gerrit Renker | [PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side) |
| David Miller | [GIT]: Networking |
| Chuck Lever | Re: [bug?] tg3: Failed to load firmware "tigon/tg3_tso.bin" |
| David Miller | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
