Re: [PATCH v2] thermal: thermal_sys: Fix build warning

From: Guenter Roeck
Date: Sun Jan 22 2012 - 13:14:04 EST


On Sun, Jan 22, 2012 at 11:46:01AM -0500, Fabio Estevam wrote:
> Fix the following build warning:
>
> drivers/thermal/thermal_sys.c:63: warning: 'thermal_event_seqnum' defined but not used
>
> ,which happens when CONFIG_NET is not set.
>
> Move 'thermal_event_seqnum' definition inside the '#ifdef CONFIG_NET'
>
> Signed-off-by: Fabio Estevam <fabio.estevam@xxxxxxxxxxxxx>

Acked-by: Guenter Roeck <guenter.roeck@xxxxxxxxxxxx>

> ---
> Change since v1:
> - Sent corrupted patch in v1, and fixed now
> drivers/thermal/thermal_sys.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/thermal/thermal_sys.c b/drivers/thermal/thermal_sys.c
> index dd9a574..11f5955 100644
> --- a/drivers/thermal/thermal_sys.c
> +++ b/drivers/thermal/thermal_sys.c
> @@ -60,8 +60,6 @@ static LIST_HEAD(thermal_tz_list);
> static LIST_HEAD(thermal_cdev_list);
> static DEFINE_MUTEX(thermal_list_lock);
>
> -static unsigned int thermal_event_seqnum;
> -
> static int get_idr(struct idr *idr, struct mutex *lock, int *id)
> {
> int err;
> @@ -1304,6 +1302,8 @@ static struct genl_multicast_group thermal_event_mcgrp = {
> .name = THERMAL_GENL_MCAST_GROUP_NAME,
> };
>
> +static unsigned int thermal_event_seqnum;
> +
> int generate_netlink_event(u32 orig, enum events event)
> {
> struct sk_buff *skb;
> --
> 1.7.1
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/