Skip to contentSkip to conversation

hwmon: (pwm-fan) Declare pwm_fan_of_get_cooling_data static

PATCH In review Guenter Roeck 2 participants 2 messages Mar 4, 2015 – Mar 5, 2015 Hardware monitoring

lore
Share & tools
lore

Guenter Roeck

author maintainer
#0 lore raw

PATCH 1/1 hwmon: (pwm-fan) Declare pwm_fan_of_get_cooling_data static

Address the following sparse warnings.

drivers/hwmon/pwm-fan.c:176:5: warning:
symbol 'pwm_fan_of_get_cooling_data' was not declared. Should it be static?
drivers/hwmon/pwm-fan.c:176:5: warning:
no previous prototype for 'pwm_fan_of_get_cooling_data'

pwm_fan_of_get_cooling_data is only used in the pwm-fan driver and thus should be declared static.

Cc Lukasz Majewski <[email protected]>
---
 drivers/hwmon/pwm-fan.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/hwmon/pwm-fan.c +2 -1
index 7c83dc4..4170728 100644
@@ -173,7 +173,8 @@ static const struct thermal_cooling_device_ops pwm_fan_cooling_ops = {
 	.set_cur_state = pwm_fan_set_cur_state,
 };
 
-int pwm_fan_of_get_cooling_data(struct device *dev, struct pwm_fan_ctx *ctx)
+static int pwm_fan_of_get_cooling_data(struct device *dev,
+				       struct pwm_fan_ctx *ctx)
 {
 	struct device_node *np = dev->of_node;
 	int num, i, ret;
Signature · 7 lines
2.1.0


_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Acked-by on v1 1/1
#1 lore raw

Hi Guenter,

Quoted 27 lines

Address the following sparse warnings.

drivers/hwmon/pwm-fan.c:176:5: warning:
symbol 'pwm_fan_of_get_cooling_data' was not declared. Should
it be static? drivers/hwmon/pwm-fan.c:176:5: warning:
no previous prototype for 'pwm_fan_of_get_cooling_data'

pwm_fan_of_get_cooling_data is only used in the pwm-fan driver and thus should be declared static.

Cc Lukasz Majewski <[email protected]>
---
 drivers/hwmon/pwm-fan.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/hwmon/pwm-fan.c +0 -1
index 7c83dc4..4170728 100644
@@ -173,7 +173,8 @@ static const struct thermal_cooling_device_ops
 pwm_fan_cooling_ops = { .set_cur_state = pwm_fan_set_cur_state,
 };
 
-int pwm_fan_of_get_cooling_data(struct device *dev, struct

pwm_fan_ctx *ctx) +static int pwm_fan_of_get_cooling_data(struct device *dev,

drivers/hwmon/pwm-fan.c static const struct thermal_cooling_device_ops pwm_fan_cooling_ops = { · line 180

Quoted 4 lines
drivers/hwmon/pwm-fan.c +1 -0
+				       struct pwm_fan_ctx *ctx)
 {
 	struct device_node *np = dev->of_node;
 	int num, i, ret;

Thanks for spotting. Of course,

Signature · 10 lines
Best regards,

Lukasz Majewski

Samsung R&D Institute Poland (SRPOL) | Linux Platform Group

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