Message ID | 1546390449-32181-1-git-send-email-edubezval@gmail.com (mailing list archive) |
---|---|
State | Accepted, archived |
Delegated to: | Eduardo Valentin |
Headers | show |
Series | [1/1] thermal: hwmon: inline helpers when CONFIG_THERMAL_HWMON is not set | expand |
On Wed, Jan 2, 2019 at 2:07 AM Eduardo Valentin <edubezval@gmail.com> wrote: > Avoid warnings like this: > thermal_hwmon.h:29:1: warning: ‘thermal_remove_hwmon_sysfs’ defined but not used [-Wunused-function] > thermal_remove_hwmon_sysfs(struct thermal_zone_device *tz) > Fixes: 0dd88793aacd7c91 ("thermal: hwmon: move hwmon support to single file") > Signed-off-by: Eduardo Valentin <edubezval@gmail.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Gr{oetje,eeting}s, Geert
diff --git a/drivers/thermal/thermal_hwmon.h b/drivers/thermal/thermal_hwmon.h index 019f6f8..a160b9d 100644 --- a/drivers/thermal/thermal_hwmon.h +++ b/drivers/thermal/thermal_hwmon.h @@ -19,13 +19,13 @@ int thermal_add_hwmon_sysfs(struct thermal_zone_device *tz); void thermal_remove_hwmon_sysfs(struct thermal_zone_device *tz); #else -static int +static inline int thermal_add_hwmon_sysfs(struct thermal_zone_device *tz) { return 0; } -static void +static inline void thermal_remove_hwmon_sysfs(struct thermal_zone_device *tz) { }
Avoid warnings like this: thermal_hwmon.h:29:1: warning: ‘thermal_remove_hwmon_sysfs’ defined but not used [-Wunused-function] thermal_remove_hwmon_sysfs(struct thermal_zone_device *tz) Signed-off-by: Eduardo Valentin <edubezval@gmail.com> --- I will be simply applying this as it is a silly missing inline's. drivers/thermal/thermal_hwmon.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)