diff mbox

thermal: Fix compiler warning

Message ID 1363815487-7191-1-git-send-email-ezequiel.garcia@free-electrons.com (mailing list archive)
State Accepted, archived
Delegated to: Zhang Rui
Headers show

Commit Message

Ezequiel Garcia March 20, 2013, 9:38 p.m. UTC
The following warning is obtained when CONFIG_NET is not defined:

In file included from drivers/thermal/mvebu_thermal.c:27:0:
include/linux/thermal.h:254:12: warning: 'thermal_generate_netlink_event'
defined but not used [-Wunused-function]

This patch fixes the warning by properly inlining
thermal_generate_netlink_event().

Cc: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
---
 include/linux/thermal.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Comments

Zhang Rui March 25, 2013, 8:12 a.m. UTC | #1
On Wed, 2013-03-20 at 18:38 -0300, Ezequiel Garcia wrote:
> The following warning is obtained when CONFIG_NET is not defined:
> 
> In file included from drivers/thermal/mvebu_thermal.c:27:0:
> include/linux/thermal.h:254:12: warning: 'thermal_generate_netlink_event'
> defined but not used [-Wunused-function]
> 
> This patch fixes the warning by properly inlining
> thermal_generate_netlink_event().
> 
> Cc: Zhang Rui <rui.zhang@intel.com>
> Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>

applied to thermal -next.

thanks,
rui
> ---
>  include/linux/thermal.h |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/include/linux/thermal.h b/include/linux/thermal.h
> index f0bd7f9..fd7b8f3 100644
> --- a/include/linux/thermal.h
> +++ b/include/linux/thermal.h
> @@ -251,7 +251,7 @@ void thermal_unregister_governor(struct thermal_governor *);
>  extern int thermal_generate_netlink_event(struct thermal_zone_device *tz,
>  						enum events event);
>  #else
> -static int thermal_generate_netlink_event(struct thermal_zone_device *tz,
> +static inline int thermal_generate_netlink_event(struct thermal_zone_device *tz,
>  						enum events event)
>  {
>  	return 0;


--
To unsubscribe from this list: send the line "unsubscribe linux-pm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/include/linux/thermal.h b/include/linux/thermal.h
index f0bd7f9..fd7b8f3 100644
--- a/include/linux/thermal.h
+++ b/include/linux/thermal.h
@@ -251,7 +251,7 @@  void thermal_unregister_governor(struct thermal_governor *);
 extern int thermal_generate_netlink_event(struct thermal_zone_device *tz,
 						enum events event);
 #else
-static int thermal_generate_netlink_event(struct thermal_zone_device *tz,
+static inline int thermal_generate_netlink_event(struct thermal_zone_device *tz,
 						enum events event)
 {
 	return 0;