* [2.6 patch] drivers/base/cpu.c: make code static
@ 2008-04-23 11:05 Mike Travis
0 siblings, 0 replies; 3+ messages in thread
From: Mike Travis @ 2008-04-23 11:05 UTC (permalink / raw)
To: Adrian Bunk, Ingo Molnar; +Cc: linux-kernel
Thanks for catching this!
Acked-by: Mike Travis <travis@sgi.com>
This patch makes the following needlessly global code static:
- attr_online_map
- attr_possible_map
- attr_present_map
Signed-off-by: Adrian Bunk <bunk@kernel.org>
---
8ab09fe4313384faa5e3577d99845cedccb245bc diff --git a/drivers/base/cpu.c b/drivers/base/cpu.c
index 6fe4174..da6f4ae 100644
--- a/drivers/base/cpu.c
+++ b/drivers/base/cpu.c
@@ -119,7 +119,7 @@ static ssize_t print_cpus_##type(struct sysdev_class *class, char *buf) \
{ \
return print_cpus_map(buf, &cpu_##type##_map); \
} \
-struct sysdev_class_attribute attr_##type##_map = \
+static struct sysdev_class_attribute attr_##type##_map = \
_SYSDEV_CLASS_ATTR(type, 0444, print_cpus_##type, NULL)
print_cpus_func(online);
^ permalink raw reply related [flat|nested] 3+ messages in thread* [2.6 patch] drivers/base/cpu.c: make code static
@ 2008-04-23 9:52 Adrian Bunk
2008-04-23 12:58 ` Bert Wesarg
0 siblings, 1 reply; 3+ messages in thread
From: Adrian Bunk @ 2008-04-23 9:52 UTC (permalink / raw)
To: Mike Travis; +Cc: linux-kernel
This patch makes the following needlessly global code static:
- attr_online_map
- attr_possible_map
- attr_present_map
Signed-off-by: Adrian Bunk <bunk@kernel.org>
---
8ab09fe4313384faa5e3577d99845cedccb245bc diff --git a/drivers/base/cpu.c b/drivers/base/cpu.c
index 6fe4174..da6f4ae 100644
--- a/drivers/base/cpu.c
+++ b/drivers/base/cpu.c
@@ -119,7 +119,7 @@ static ssize_t print_cpus_##type(struct sysdev_class *class, char *buf) \
{ \
return print_cpus_map(buf, &cpu_##type##_map); \
} \
-struct sysdev_class_attribute attr_##type##_map = \
+static struct sysdev_class_attribute attr_##type##_map = \
_SYSDEV_CLASS_ATTR(type, 0444, print_cpus_##type, NULL)
print_cpus_func(online);
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [2.6 patch] drivers/base/cpu.c: make code static
2008-04-23 9:52 Adrian Bunk
@ 2008-04-23 12:58 ` Bert Wesarg
0 siblings, 0 replies; 3+ messages in thread
From: Bert Wesarg @ 2008-04-23 12:58 UTC (permalink / raw)
To: Adrian Bunk; +Cc: Mike Travis, linux-kernel
On Wed, Apr 23, 2008 at 11:52 AM, Adrian Bunk <bunk@kernel.org> wrote:
> This patch makes the following needlessly global code static:
> - attr_online_map
> - attr_possible_map
> - attr_present_map
>
> Signed-off-by: Adrian Bunk <bunk@kernel.org>
>
> ---
> 8ab09fe4313384faa5e3577d99845cedccb245bc diff --git a/drivers/base/cpu.c b/drivers/base/cpu.c
> index 6fe4174..da6f4ae 100644
> --- a/drivers/base/cpu.c
> +++ b/drivers/base/cpu.c
> @@ -119,7 +119,7 @@ static ssize_t print_cpus_##type(struct sysdev_class *class, char *buf) \
> { \
> return print_cpus_map(buf, &cpu_##type##_map); \
> } \
> -struct sysdev_class_attribute attr_##type##_map = \
> +static struct sysdev_class_attribute attr_##type##_map = \
> _SYSDEV_CLASS_ATTR(type, 0444, print_cpus_##type, NULL)
>
> print_cpus_func(online);
I think the cpu_state_attr array a few lines down should be static too.
Bert
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-04-23 12:58 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-23 11:05 [2.6 patch] drivers/base/cpu.c: make code static Mike Travis
-- strict thread matches above, loose matches on Subject: below --
2008-04-23 9:52 Adrian Bunk
2008-04-23 12:58 ` Bert Wesarg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox