* [patch 2/6] drivers/cpuidle/: make code static
@ 2007-03-06 10:29 akpm
2007-03-07 8:02 ` Len Brown
0 siblings, 1 reply; 2+ messages in thread
From: akpm @ 2007-03-06 10:29 UTC (permalink / raw)
To: lenb; +Cc: linux-acpi, akpm, bunk, abelay, shaohua.li, venkatesh.pallipadi
From: Adrian Bunk <bunk@stusta.de>
This patch makes the following needlessly global code static:
- driver.c: __cpuidle_find_driver()
- governor.c: __cpuidle_find_governor()
- ladder.c: struct ladder_governor
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Cc: Len Brown <lenb@kernel.org>
Cc: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Cc: Adam Belay <abelay@novell.com>
Cc: Shaohua Li <shaohua.li@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
drivers/cpuidle/cpuidle.h | 2 --
drivers/cpuidle/driver.c | 2 +-
drivers/cpuidle/governor.c | 2 +-
drivers/cpuidle/governors/ladder.c | 2 +-
4 files changed, 3 insertions(+), 5 deletions(-)
diff -puN drivers/cpuidle/cpuidle.h~drivers-cpuidle-make-code-static drivers/cpuidle/cpuidle.h
--- a/drivers/cpuidle/cpuidle.h~drivers-cpuidle-make-code-static
+++ a/drivers/cpuidle/cpuidle.h
@@ -23,13 +23,11 @@ extern void cpuidle_rescan_device(struct
/* drivers */
extern int cpuidle_attach_driver(struct cpuidle_device *dev);
extern void cpuidle_detach_driver(struct cpuidle_device *dev);
-extern struct cpuidle_driver * __cpuidle_find_driver(const char *str);
extern int cpuidle_switch_driver(struct cpuidle_driver *drv);
/* governors */
extern int cpuidle_attach_governor(struct cpuidle_device *dev);
extern void cpuidle_detach_governor(struct cpuidle_device *dev);
-extern struct cpuidle_governor * __cpuidle_find_governor(const char *str);
extern int cpuidle_switch_governor(struct cpuidle_governor *gov);
/* sysfs */
diff -puN drivers/cpuidle/driver.c~drivers-cpuidle-make-code-static drivers/cpuidle/driver.c
--- a/drivers/cpuidle/driver.c~drivers-cpuidle-make-code-static
+++ a/drivers/cpuidle/driver.c
@@ -73,7 +73,7 @@ void cpuidle_detach_driver(struct cpuidl
*
* Must be called with cpuidle_lock aquired.
*/
-struct cpuidle_driver * __cpuidle_find_driver(const char *str)
+static struct cpuidle_driver * __cpuidle_find_driver(const char *str)
{
struct cpuidle_driver *drv;
diff -puN drivers/cpuidle/governor.c~drivers-cpuidle-make-code-static drivers/cpuidle/governor.c
--- a/drivers/cpuidle/governor.c~drivers-cpuidle-make-code-static
+++ a/drivers/cpuidle/governor.c
@@ -72,7 +72,7 @@ void cpuidle_detach_governor(struct cpui
*
* Must be called with cpuidle_lock aquired.
*/
-struct cpuidle_governor * __cpuidle_find_governor(const char *str)
+static struct cpuidle_governor * __cpuidle_find_governor(const char *str)
{
struct cpuidle_governor *gov;
diff -puN drivers/cpuidle/governors/ladder.c~drivers-cpuidle-make-code-static drivers/cpuidle/governors/ladder.c
--- a/drivers/cpuidle/governors/ladder.c~drivers-cpuidle-make-code-static
+++ a/drivers/cpuidle/governors/ladder.c
@@ -199,7 +199,7 @@ static void ladder_exit_device(struct cp
kfree(dev->governor_data);
}
-struct cpuidle_governor ladder_governor = {
+static struct cpuidle_governor ladder_governor = {
.name = "ladder",
.init = ladder_init_device,
.exit = ladder_exit_device,
_
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [patch 2/6] drivers/cpuidle/: make code static
2007-03-06 10:29 [patch 2/6] drivers/cpuidle/: make code static akpm
@ 2007-03-07 8:02 ` Len Brown
0 siblings, 0 replies; 2+ messages in thread
From: Len Brown @ 2007-03-07 8:02 UTC (permalink / raw)
To: akpm; +Cc: linux-acpi, bunk, abelay, shaohua.li, venkatesh.pallipadi
Applied.
thanks,
-Len
On Tuesday 06 March 2007 05:29, akpm@linux-foundation.org wrote:
> From: Adrian Bunk <bunk@stusta.de>
>
> This patch makes the following needlessly global code static:
> - driver.c: __cpuidle_find_driver()
> - governor.c: __cpuidle_find_governor()
> - ladder.c: struct ladder_governor
>
> Signed-off-by: Adrian Bunk <bunk@stusta.de>
> Cc: Len Brown <lenb@kernel.org>
> Cc: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
> Cc: Adam Belay <abelay@novell.com>
> Cc: Shaohua Li <shaohua.li@intel.com>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> ---
>
> drivers/cpuidle/cpuidle.h | 2 --
> drivers/cpuidle/driver.c | 2 +-
> drivers/cpuidle/governor.c | 2 +-
> drivers/cpuidle/governors/ladder.c | 2 +-
> 4 files changed, 3 insertions(+), 5 deletions(-)
>
> diff -puN drivers/cpuidle/cpuidle.h~drivers-cpuidle-make-code-static drivers/cpuidle/cpuidle.h
> --- a/drivers/cpuidle/cpuidle.h~drivers-cpuidle-make-code-static
> +++ a/drivers/cpuidle/cpuidle.h
> @@ -23,13 +23,11 @@ extern void cpuidle_rescan_device(struct
> /* drivers */
> extern int cpuidle_attach_driver(struct cpuidle_device *dev);
> extern void cpuidle_detach_driver(struct cpuidle_device *dev);
> -extern struct cpuidle_driver * __cpuidle_find_driver(const char *str);
> extern int cpuidle_switch_driver(struct cpuidle_driver *drv);
>
> /* governors */
> extern int cpuidle_attach_governor(struct cpuidle_device *dev);
> extern void cpuidle_detach_governor(struct cpuidle_device *dev);
> -extern struct cpuidle_governor * __cpuidle_find_governor(const char *str);
> extern int cpuidle_switch_governor(struct cpuidle_governor *gov);
>
> /* sysfs */
> diff -puN drivers/cpuidle/driver.c~drivers-cpuidle-make-code-static drivers/cpuidle/driver.c
> --- a/drivers/cpuidle/driver.c~drivers-cpuidle-make-code-static
> +++ a/drivers/cpuidle/driver.c
> @@ -73,7 +73,7 @@ void cpuidle_detach_driver(struct cpuidl
> *
> * Must be called with cpuidle_lock aquired.
> */
> -struct cpuidle_driver * __cpuidle_find_driver(const char *str)
> +static struct cpuidle_driver * __cpuidle_find_driver(const char *str)
> {
> struct cpuidle_driver *drv;
>
> diff -puN drivers/cpuidle/governor.c~drivers-cpuidle-make-code-static drivers/cpuidle/governor.c
> --- a/drivers/cpuidle/governor.c~drivers-cpuidle-make-code-static
> +++ a/drivers/cpuidle/governor.c
> @@ -72,7 +72,7 @@ void cpuidle_detach_governor(struct cpui
> *
> * Must be called with cpuidle_lock aquired.
> */
> -struct cpuidle_governor * __cpuidle_find_governor(const char *str)
> +static struct cpuidle_governor * __cpuidle_find_governor(const char *str)
> {
> struct cpuidle_governor *gov;
>
> diff -puN drivers/cpuidle/governors/ladder.c~drivers-cpuidle-make-code-static drivers/cpuidle/governors/ladder.c
> --- a/drivers/cpuidle/governors/ladder.c~drivers-cpuidle-make-code-static
> +++ a/drivers/cpuidle/governors/ladder.c
> @@ -199,7 +199,7 @@ static void ladder_exit_device(struct cp
> kfree(dev->governor_data);
> }
>
> -struct cpuidle_governor ladder_governor = {
> +static struct cpuidle_governor ladder_governor = {
> .name = "ladder",
> .init = ladder_init_device,
> .exit = ladder_exit_device,
> _
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-03-07 8:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-06 10:29 [patch 2/6] drivers/cpuidle/: make code static akpm
2007-03-07 8:02 ` Len Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).