summaryrefslogtreecommitdiffstats
path: root/arch/ia64/kernel
diff options
context:
space:
mode:
authorPhil Carmody <ext-phil.2.carmody@nokia.com>2010-09-14 13:34:43 -0700
committerTony Luck <tony.luck@intel.com>2010-09-14 13:34:43 -0700
commit747584be04bb98a856bab5cd1bfe56d341881b83 (patch)
tree53852afaa1befe8e7fec2f220092ca00b8616d62 /arch/ia64/kernel
parentbfa88ea7ee9e6b4fd673e45a8cc0a8e0b7ef4761 (diff)
downloadop-kernel-dev-747584be04bb98a856bab5cd1bfe56d341881b83.zip
op-kernel-dev-747584be04bb98a856bab5cd1bfe56d341881b83.tar.gz
[IA64] unwind: remove preprocesser noise, and correct comment
The expression in the comment was mis-bracketted. There was also no need to introduce a coding-style breaking macro for a single use, so just made it a static const. Signed-off-by: Phil Carmody <ext-phil.2.carmody@nokia.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
Diffstat (limited to 'arch/ia64/kernel')
-rw-r--r--arch/ia64/kernel/unwind.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/ia64/kernel/unwind.c b/arch/ia64/kernel/unwind.c
index b6c0e63..f47217b 100644
--- a/arch/ia64/kernel/unwind.c
+++ b/arch/ia64/kernel/unwind.c
@@ -1204,10 +1204,10 @@ desc_spill_sprel_p (unsigned char qp, unw_word t, unsigned char abreg, unw_word
static inline unw_hash_index_t
hash (unsigned long ip)
{
-# define hashmagic 0x9e3779b97f4a7c16UL /* based on (sqrt(5)/2-1)*2^64 */
+ /* magic number = ((sqrt(5)-1)/2)*2^64 */
+ static const unsigned long hashmagic = 0x9e3779b97f4a7c16UL;
- return (ip >> 4)*hashmagic >> (64 - UNW_LOG_HASH_SIZE);
-#undef hashmagic
+ return (ip >> 4) * hashmagic >> (64 - UNW_LOG_HASH_SIZE);
}
static inline long
OpenPOWER on IntegriCloud