2012-06-06 05:54:52

by Sachin Kamat

[permalink] [raw]
Subject: [PATCH 1/1] PM: devfreq: Add missing static storage class specifier in devfreq.c file

Fixes the following sparse warning:
drivers/devfreq/devfreq.c:30:14: warning: symbol 'devfreq_class' was not declared. Should it be static?

Signed-off-by: Sachin Kamat <[email protected]>
---
drivers/devfreq/devfreq.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c
index 70c31d4..9eb6805 100644
--- a/drivers/devfreq/devfreq.c
+++ b/drivers/devfreq/devfreq.c
@@ -27,7 +27,7 @@
#include <linux/hrtimer.h>
#include "governor.h"

-struct class *devfreq_class;
+static struct class *devfreq_class;

/*
* devfreq_work periodically monitors every registered device.
--
1.7.4.1


2012-06-06 06:01:44

by Rahul Bedarkar

[permalink] [raw]
Subject: Re: [PATCH 1/1] PM: devfreq: Add missing static storage class specifier in devfreq.c file

It could be static.

On Wed, Jun 6, 2012 at 11:13 AM, Sachin Kamat <[email protected]> wrote:
> Fixes the following sparse warning:
> drivers/devfreq/devfreq.c:30:14: warning: symbol 'devfreq_class' was not declared. Should it be static?
>
> Signed-off-by: Sachin Kamat <[email protected]>
> ---
> ?drivers/devfreq/devfreq.c | ? ?2 +-
> ?1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c
> index 70c31d4..9eb6805 100644
> --- a/drivers/devfreq/devfreq.c
> +++ b/drivers/devfreq/devfreq.c
> @@ -27,7 +27,7 @@
> ?#include <linux/hrtimer.h>
> ?#include "governor.h"
>
> -struct class *devfreq_class;
> +static struct class *devfreq_class;
>
> ?/*
> ?* devfreq_work periodically monitors every registered device.
> --
> 1.7.4.1
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to [email protected]
> More majordomo info at ?http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at ?http://www.tux.org/lkml/

2012-06-11 05:37:57

by MyungJoo Ham

[permalink] [raw]
Subject: Re: [PATCH 1/1] PM: devfreq: Add missing static storage class specifier in devfreq.c file

> Fixes the following sparse warning:
> drivers/devfreq/devfreq.c:30:14: warning: symbol 'devfreq_class' was not declared. Should it be static?
>
> Signed-off-by: Sachin Kamat <[email protected]>

Signed-off-by: MyungJoo Ham <[email protected]>

Merged in the devfreq-for-next tree. I'll later send pull a request along with other patches.


Cheers!
MyungJoo.

> ---
> drivers/devfreq/devfreq.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c
> index 70c31d4..9eb6805 100644
> --- a/drivers/devfreq/devfreq.c
> +++ b/drivers/devfreq/devfreq.c
> @@ -27,7 +27,7 @@
> #include <linux/hrtimer.h>
> #include "governor.h"
>
> -struct class *devfreq_class;
> +static struct class *devfreq_class;
>
> /*
> * devfreq_work periodically monitors every registered device.
> --
> 1.7.4.1
????{.n?+???????+%?????ݶ??w??{.n?+????{??G?????{ay?ʇڙ?,j??f???h?????????z_??(?階?ݢj"???m??????G????????????&???~???iO???z??v?^?m???? ????????I?