Commit 927b9ea4 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] gcc-3.5: drivers/i2c/chips/it87.c

drivers/i2c/chips/it87.c:130: warning: conflicting types for built-in function 'log2'
parent 6c113729
...@@ -126,14 +126,13 @@ static inline u8 FAN_TO_REG(long rpm, int div) ...@@ -126,14 +126,13 @@ static inline u8 FAN_TO_REG(long rpm, int div)
205-(val)*5) 205-(val)*5)
#define ALARMS_FROM_REG(val) (val) #define ALARMS_FROM_REG(val) (val)
static int log2(int val) static int DIV_TO_REG(int val)
{ {
int answer = 0; int answer = 0;
while ((val >>= 1)) while ((val >>= 1))
answer++; answer++;
return answer; return answer;
} }
#define DIV_TO_REG(val) log2(val)
#define DIV_FROM_REG(val) (1 << (val)) #define DIV_FROM_REG(val) (1 << (val))
/* Initial limits. Use the config file to set better limits. */ /* Initial limits. Use the config file to set better limits. */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment