Skip to contentSkip to conversation

hwmon: (g760a) Make rpm_from_cnt static

PATCH In review Jean Delvare 2 participants 2 messages Feb 18, 2010 – Feb 19, 2010 Hardware monitoring

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hwmon: (g760a) Make rpm_from_cnt static

Function rpm_from_cnt is only used internally so it can be made static. Make it inline while we're here, for performance reasons (although hopefully gcc would figure out by itself...)

Cc Herbert Valerio Riedel <[email protected]>
Cc Martin Michlmayr <[email protected]>
---
 drivers/hwmon/g760a.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/hwmon/g760a.c +1 -1
@@ -68,7 +68,7 @@ struct g760a_data {
 #define PWM_FROM_CNT(cnt)	(0xff-(cnt))
 #define PWM_TO_CNT(pwm)		(0xff-(pwm))
 
-unsigned int rpm_from_cnt(u8 val, u32 clk, u16 div)
+static inline unsigned int rpm_from_cnt(u8 val, u32 clk, u16 div)
 {
 	return ((val = 0x00) ? 0 : ((clk*30)/(val*div)));
 }
Signature · 6 lines
Jean Delvare

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
#1 lore raw
Quoted 3 lines · Jean Delvare

Function rpm_from_cnt is only used internally so it can be made static. Make it inline while we're here, for performance reasons (although hopefully gcc would figure out by itself...)

Signature · 7 lines
Martin Michlmayr
http://www.cyrius.com/

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors