Skip to content

Commit 747584b

Browse files
Phil Carmodyaegl
authored andcommitted
[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 <[email protected]> Signed-off-by: Tony Luck <[email protected]>
1 parent bfa88ea commit 747584b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

arch/ia64/kernel/unwind.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1204,10 +1204,10 @@ desc_spill_sprel_p (unsigned char qp, unw_word t, unsigned char abreg, unw_word
12041204
static inline unw_hash_index_t
12051205
hash (unsigned long ip)
12061206
{
1207-
# define hashmagic 0x9e3779b97f4a7c16UL /* based on (sqrt(5)/2-1)*2^64 */
1207+
/* magic number = ((sqrt(5)-1)/2)*2^64 */
1208+
static const unsigned long hashmagic = 0x9e3779b97f4a7c16UL;
12081209

1209-
return (ip >> 4)*hashmagic >> (64 - UNW_LOG_HASH_SIZE);
1210-
#undef hashmagic
1210+
return (ip >> 4) * hashmagic >> (64 - UNW_LOG_HASH_SIZE);
12111211
}
12121212

12131213
static inline long

0 commit comments

Comments
 (0)