diff mbox series

[1/1] thermal: hwmon: inline helpers when CONFIG_THERMAL_HWMON is not set

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

Commit Message

Eduardo Valentin Jan. 2, 2019, 12:54 a.m. UTC
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(-)

Comments

Geert Uytterhoeven Jan. 2, 2019, 10:59 a.m. UTC | #1
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 mbox series

Patch

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)
 {
 }