* [PATCH][TRIVIAL] [thermal] fix unused variable warning
@ 2011-10-10 10:05 Daniel Walter
2011-10-17 11:23 ` Rakib Mullick
0 siblings, 1 reply; 2+ messages in thread
From: Daniel Walter @ 2011-10-10 10:05 UTC (permalink / raw)
To: rui.zhang; +Cc: linux-kernel
[thermal] fix unused variable warning
thermal_event_seqnum is only used if CONFIG_NET is defined.
Signed-off-by: Daniel Walter <d.walter@0x90.at>
---
drivers/thermal/thermal_sys.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/drivers/thermal/thermal_sys.c b/drivers/thermal/thermal_sys.c
index 708f8e9..def02da 100644
--- a/drivers/thermal/thermal_sys.c
+++ b/drivers/thermal/thermal_sys.c
@@ -60,7 +60,9 @@ static LIST_HEAD(thermal_tz_list);
static LIST_HEAD(thermal_cdev_list);
static DEFINE_MUTEX(thermal_list_lock);
+#ifdef CONFIG_NET
static unsigned int thermal_event_seqnum;
+#endif /* CONFIG_NET */
static int get_idr(struct idr *idr, struct mutex *lock, int *id)
{
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH][TRIVIAL] [thermal] fix unused variable warning
2011-10-10 10:05 [PATCH][TRIVIAL] [thermal] fix unused variable warning Daniel Walter
@ 2011-10-17 11:23 ` Rakib Mullick
0 siblings, 0 replies; 2+ messages in thread
From: Rakib Mullick @ 2011-10-17 11:23 UTC (permalink / raw)
To: Daniel Walter; +Cc: rui.zhang, linux-kernel, Andrew Morton
Hi Daniel,
On Mon, Oct 10, 2011 at 4:05 PM, Daniel Walter <d.walter@0x90.at> wrote:
> [thermal] fix unused variable warning
>
> thermal_event_seqnum is only used if CONFIG_NET is defined.
>
> Signed-off-by: Daniel Walter <d.walter@0x90.at>
> ---
> drivers/thermal/thermal_sys.c | 2 ++
> 1 files changed, 2 insertions(+), 0 deletions(-)
> ---
> diff --git a/drivers/thermal/thermal_sys.c b/drivers/thermal/thermal_sys.c
> index 708f8e9..def02da 100644
> --- a/drivers/thermal/thermal_sys.c
> +++ b/drivers/thermal/thermal_sys.c
> @@ -60,7 +60,9 @@ static LIST_HEAD(thermal_tz_list);
> static LIST_HEAD(thermal_cdev_list);
> static DEFINE_MUTEX(thermal_list_lock);
>
> +#ifdef CONFIG_NET
> static unsigned int thermal_event_seqnum;
> +#endif /* CONFIG_NET */
>
I think, it would be nice to move thermal_event_seqnum under
CONFIG_NET defined section, instead of wrapping with CONFIG_NET.
Although your fix is okay but moving under CONFIG_NET would be nicer.
Something like below:
---
diff --git a/drivers/thermal/thermal_sys.c b/drivers/thermal/thermal_sys.c
index 708f8e9..b88c6ba 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;
@@ -1293,6 +1291,8 @@ void thermal_zone_device_unregister(struct
thermal_zone_device *tz)
EXPORT_SYMBOL(thermal_zone_device_unregister);
#ifdef CONFIG_NET
+static unsigned int thermal_event_seqnum;
+
static struct genl_family thermal_event_genl_family = {
.id = GENL_ID_GENERATE,
.name = THERMAL_GENL_FAMILY_NAME,
Thanks,
Rakib
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-10-17 11:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-10 10:05 [PATCH][TRIVIAL] [thermal] fix unused variable warning Daniel Walter
2011-10-17 11:23 ` Rakib Mullick
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox