LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH 0/6] [MIPS] make some functions and variables static
@ 2008-03-31 22:03 Dmitri Vorobiev
2008-03-31 22:03 ` [PATCH 1/6] [MIPS] make mips_nmi_setup() static Dmitri Vorobiev
` (6 more replies)
0 siblings, 7 replies; 9+ messages in thread
From: Dmitri Vorobiev @ 2008-03-31 22:03 UTC (permalink / raw)
To: linux-mips, ralf, linux-kernel
Hi Ralf,
I noticed that a few functions and variables in the MIPS-specific
code can become static, and this series of patches cleans up the
kernel global name space a little bit.
Please consider.
Thanks,
Dmitri Vorobiev
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 1/6] [MIPS] make mips_nmi_setup() static
2008-03-31 22:03 [PATCH 0/6] [MIPS] make some functions and variables static Dmitri Vorobiev
@ 2008-03-31 22:03 ` Dmitri Vorobiev
2008-03-31 22:03 ` [PATCH 2/6] [MIPS] make mips_ejtag_setup() static Dmitri Vorobiev
` (5 subsequent siblings)
6 siblings, 0 replies; 9+ messages in thread
From: Dmitri Vorobiev @ 2008-03-31 22:03 UTC (permalink / raw)
To: linux-mips, ralf, linux-kernel
This change makes the needlessly global function mips_nmi_setup() static.
Successfully build-tested using default configs for Malta, Atlas
and SEAD boards.
Runtime test successfully performed by booting the Malta 4Kc board
up to the shell prompt.
Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@gmail.com>
---
arch/mips/mips-boards/generic/init.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/mips/mips-boards/generic/init.c b/arch/mips/mips-boards/generic/init.c
index 1695dca..70dd9f4 100644
--- a/arch/mips/mips-boards/generic/init.c
+++ b/arch/mips/mips-boards/generic/init.c
@@ -226,7 +226,7 @@ void __init kgdb_config(void)
}
#endif
-void __init mips_nmi_setup(void)
+static void __init mips_nmi_setup(void)
{
void *base;
extern char except_vec_nmi;
--
1.5.3
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 2/6] [MIPS] make mips_ejtag_setup() static
2008-03-31 22:03 [PATCH 0/6] [MIPS] make some functions and variables static Dmitri Vorobiev
2008-03-31 22:03 ` [PATCH 1/6] [MIPS] make mips_nmi_setup() static Dmitri Vorobiev
@ 2008-03-31 22:03 ` Dmitri Vorobiev
2008-03-31 22:03 ` [PATCH 3/6] [MIPS] make mdesc and prom_getmdesc() static Dmitri Vorobiev
` (4 subsequent siblings)
6 siblings, 0 replies; 9+ messages in thread
From: Dmitri Vorobiev @ 2008-03-31 22:03 UTC (permalink / raw)
To: linux-mips, ralf, linux-kernel
This change makes the needlessly global function mips_ejtag_setup() static.
Successfully build-tested using default configs for Malta, Atlas
and SEAD boards.
Runtime test successfully performed by booting the Malta 4Kc board
up to the shell prompt.
Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@gmail.com>
---
arch/mips/mips-boards/generic/init.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/mips/mips-boards/generic/init.c b/arch/mips/mips-boards/generic/init.c
index 70dd9f4..80e5504 100644
--- a/arch/mips/mips-boards/generic/init.c
+++ b/arch/mips/mips-boards/generic/init.c
@@ -238,7 +238,7 @@ static void __init mips_nmi_setup(void)
flush_icache_range((unsigned long)base, (unsigned long)base + 0x80);
}
-void __init mips_ejtag_setup(void)
+static void __init mips_ejtag_setup(void)
{
void *base;
extern char except_vec_ejtag_debug;
--
1.5.3
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 3/6] [MIPS] make mdesc and prom_getmdesc() static
2008-03-31 22:03 [PATCH 0/6] [MIPS] make some functions and variables static Dmitri Vorobiev
2008-03-31 22:03 ` [PATCH 1/6] [MIPS] make mips_nmi_setup() static Dmitri Vorobiev
2008-03-31 22:03 ` [PATCH 2/6] [MIPS] make mips_ejtag_setup() static Dmitri Vorobiev
@ 2008-03-31 22:03 ` Dmitri Vorobiev
2008-03-31 22:03 ` [PATCH 4/6] [MIPS] make plat_perf_setup() static Dmitri Vorobiev
` (3 subsequent siblings)
6 siblings, 0 replies; 9+ messages in thread
From: Dmitri Vorobiev @ 2008-03-31 22:03 UTC (permalink / raw)
To: linux-mips, ralf, linux-kernel
Neither the mdesc[] array nor the prom_getmdesc() function need to
be global. This patch makes them static.
Successfully build-tested using default configs for Malta, Atlas
and SEAD boards.
Runtime test successfully performed by booting the Malta 4Kc board
up to the shell prompt.
Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@gmail.com>
---
arch/mips/mips-boards/generic/memory.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/mips/mips-boards/generic/memory.c b/arch/mips/mips-boards/generic/memory.c
index dc272c1..5e443bb 100644
--- a/arch/mips/mips-boards/generic/memory.c
+++ b/arch/mips/mips-boards/generic/memory.c
@@ -37,7 +37,7 @@ enum yamon_memtypes {
yamon_prom,
yamon_free,
};
-struct prom_pmemblock mdesc[PROM_MAX_PMEMBLOCKS];
+static struct prom_pmemblock mdesc[PROM_MAX_PMEMBLOCKS];
#ifdef DEBUG
static char *mtypes[3] = {
@@ -50,7 +50,7 @@ static char *mtypes[3] = {
/* determined physical memory size, not overridden by command line args */
unsigned long physical_memsize = 0L;
-struct prom_pmemblock * __init prom_getmdesc(void)
+static struct prom_pmemblock * __init prom_getmdesc(void)
{
char *memsize_str;
unsigned int memsize;
--
1.5.3
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 4/6] [MIPS] make plat_perf_setup() static
2008-03-31 22:03 [PATCH 0/6] [MIPS] make some functions and variables static Dmitri Vorobiev
` (2 preceding siblings ...)
2008-03-31 22:03 ` [PATCH 3/6] [MIPS] make mdesc and prom_getmdesc() static Dmitri Vorobiev
@ 2008-03-31 22:03 ` Dmitri Vorobiev
2008-03-31 22:03 ` [PATCH 5/6] [MIPS] make standard_io_resources[] static Dmitri Vorobiev
` (2 subsequent siblings)
6 siblings, 0 replies; 9+ messages in thread
From: Dmitri Vorobiev @ 2008-03-31 22:03 UTC (permalink / raw)
To: linux-mips, ralf, linux-kernel
There is no need for the plat_perf_setup() function to be global,
so make it static.
Successfully build-tested using default configs for Malta, Atlas
and SEAD boards.
Runtime test successfully performed by booting the Malta 4Kc board
up to the shell prompt.
Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@gmail.com>
---
arch/mips/mips-boards/generic/time.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/mips/mips-boards/generic/time.c b/arch/mips/mips-boards/generic/time.c
index b50e0fc..a6eece7 100644
--- a/arch/mips/mips-boards/generic/time.c
+++ b/arch/mips/mips-boards/generic/time.c
@@ -127,7 +127,7 @@ unsigned long read_persistent_clock(void)
return mc146818_get_cmos_time();
}
-void __init plat_perf_setup(void)
+static void __init plat_perf_setup(void)
{
cp0_perfcount_irq = -1;
--
1.5.3
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 5/6] [MIPS] make standard_io_resources[] static
2008-03-31 22:03 [PATCH 0/6] [MIPS] make some functions and variables static Dmitri Vorobiev
` (3 preceding siblings ...)
2008-03-31 22:03 ` [PATCH 4/6] [MIPS] make plat_perf_setup() static Dmitri Vorobiev
@ 2008-03-31 22:03 ` Dmitri Vorobiev
2008-03-31 22:03 ` [PATCH 6/6] [MIPS] malta_int.c: make 4 variables static Dmitri Vorobiev
2008-03-31 22:41 ` [PATCH 0/6] [MIPS] make some functions and " Ralf Baechle
6 siblings, 0 replies; 9+ messages in thread
From: Dmitri Vorobiev @ 2008-03-31 22:03 UTC (permalink / raw)
To: linux-mips, ralf, linux-kernel
The array standard_io_resources[] needs not to be exposed in the kernel
global namespace. This patch makes it static.
Successfully build-tested using default configs for Malta, Atlas
and SEAD boards.
Runtime test successfully performed by booting the Malta 4Kc board
up to the shell prompt.
Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@gmail.com>
---
arch/mips/mips-boards/malta/malta_setup.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/mips/mips-boards/malta/malta_setup.c b/arch/mips/mips-boards/malta/malta_setup.c
index 2cd8f57..a06e4b5 100644
--- a/arch/mips/mips-boards/malta/malta_setup.c
+++ b/arch/mips/mips-boards/malta/malta_setup.c
@@ -1,7 +1,7 @@
/*
* Carsten Langgaard, carstenl@mips.com
* Copyright (C) 2000 MIPS Technologies, Inc. All rights reserved.
- * Copyright (C) Dmitri Vorobiev
+ * Copyright (C) 2008 Dmitri Vorobiev
*
* This program is free software; you can distribute it and/or modify it
* under the terms of the GNU General Public License (Version 2) as
@@ -36,7 +36,7 @@
#include <linux/console.h>
#endif
-struct resource standard_io_resources[] = {
+static struct resource standard_io_resources[] = {
{
.name = "dma1",
.start = 0x00,
--
1.5.3
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 6/6] [MIPS] malta_int.c: make 4 variables static
2008-03-31 22:03 [PATCH 0/6] [MIPS] make some functions and variables static Dmitri Vorobiev
` (4 preceding siblings ...)
2008-03-31 22:03 ` [PATCH 5/6] [MIPS] make standard_io_resources[] static Dmitri Vorobiev
@ 2008-03-31 22:03 ` Dmitri Vorobiev
2008-03-31 22:41 ` [PATCH 0/6] [MIPS] make some functions and " Ralf Baechle
6 siblings, 0 replies; 9+ messages in thread
From: Dmitri Vorobiev @ 2008-03-31 22:03 UTC (permalink / raw)
To: linux-mips, ralf, linux-kernel
The following variables defined in arch/mips/mips-boards/malta/malta_int.c
can become static: msc_irqmap[], msc_nr_irqs, msc_eicirqmap[], and
msc_nr_eicirqs. This patch makes them static.
Successfully build-tested using default configs for Malta, Atlas
and SEAD boards.
Runtime test successfully performed by booting the Malta 4Kc board
up to the shell prompt.
Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@gmail.com>
---
arch/mips/mips-boards/malta/malta_int.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/mips/mips-boards/malta/malta_int.c b/arch/mips/mips-boards/malta/malta_int.c
index dbe60eb..b51a70b 100644
--- a/arch/mips/mips-boards/malta/malta_int.c
+++ b/arch/mips/mips-boards/malta/malta_int.c
@@ -273,13 +273,13 @@ static struct irqaction corehi_irqaction = {
.name = "CoreHi"
};
-msc_irqmap_t __initdata msc_irqmap[] = {
+static msc_irqmap_t __initdata msc_irqmap[] = {
{MSC01C_INT_TMR, MSC01_IRQ_EDGE, 0},
{MSC01C_INT_PCI, MSC01_IRQ_LEVEL, 0},
};
-int __initdata msc_nr_irqs = ARRAY_SIZE(msc_irqmap);
+static int __initdata msc_nr_irqs = ARRAY_SIZE(msc_irqmap);
-msc_irqmap_t __initdata msc_eicirqmap[] = {
+static msc_irqmap_t __initdata msc_eicirqmap[] = {
{MSC01E_INT_SW0, MSC01_IRQ_LEVEL, 0},
{MSC01E_INT_SW1, MSC01_IRQ_LEVEL, 0},
{MSC01E_INT_I8259A, MSC01_IRQ_LEVEL, 0},
@@ -291,7 +291,7 @@ msc_irqmap_t __initdata msc_eicirqmap[] = {
{MSC01E_INT_PERFCTR, MSC01_IRQ_LEVEL, 0},
{MSC01E_INT_CPUCTR, MSC01_IRQ_LEVEL, 0}
};
-int __initdata msc_nr_eicirqs = ARRAY_SIZE(msc_eicirqmap);
+static int __initdata msc_nr_eicirqs = ARRAY_SIZE(msc_eicirqmap);
void __init arch_init_irq(void)
{
--
1.5.3
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 0/6] [MIPS] make some functions and variables static
2008-03-31 22:03 [PATCH 0/6] [MIPS] make some functions and variables static Dmitri Vorobiev
` (5 preceding siblings ...)
2008-03-31 22:03 ` [PATCH 6/6] [MIPS] malta_int.c: make 4 variables static Dmitri Vorobiev
@ 2008-03-31 22:41 ` Ralf Baechle
2008-04-01 8:54 ` Dmitri Vorobiev
6 siblings, 1 reply; 9+ messages in thread
From: Ralf Baechle @ 2008-03-31 22:41 UTC (permalink / raw)
To: Dmitri Vorobiev; +Cc: linux-mips, linux-kernel
On Tue, Apr 01, 2008 at 02:03:19AM +0400, Dmitri Vorobiev wrote:
> I noticed that a few functions and variables in the MIPS-specific
> code can become static, and this series of patches cleans up the
> kernel global name space a little bit.
I've queued the whole series for 2.6.26.
Thanks,
Ralf
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 0/6] [MIPS] make some functions and variables static
2008-03-31 22:41 ` [PATCH 0/6] [MIPS] make some functions and " Ralf Baechle
@ 2008-04-01 8:54 ` Dmitri Vorobiev
0 siblings, 0 replies; 9+ messages in thread
From: Dmitri Vorobiev @ 2008-04-01 8:54 UTC (permalink / raw)
To: Ralf Baechle; +Cc: linux-mips, linux-kernel
Ralf Baechle пишет:
> On Tue, Apr 01, 2008 at 02:03:19AM +0400, Dmitri Vorobiev wrote:
>
>> I noticed that a few functions and variables in the MIPS-specific
>> code can become static, and this series of patches cleans up the
>> kernel global name space a little bit.
>
> I've queued the whole series for 2.6.26.
Thank you, Ralf.
Dmitri
>
> Thanks,
>
> Ralf
>
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2008-04-01 8:55 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-03-31 22:03 [PATCH 0/6] [MIPS] make some functions and variables static Dmitri Vorobiev
2008-03-31 22:03 ` [PATCH 1/6] [MIPS] make mips_nmi_setup() static Dmitri Vorobiev
2008-03-31 22:03 ` [PATCH 2/6] [MIPS] make mips_ejtag_setup() static Dmitri Vorobiev
2008-03-31 22:03 ` [PATCH 3/6] [MIPS] make mdesc and prom_getmdesc() static Dmitri Vorobiev
2008-03-31 22:03 ` [PATCH 4/6] [MIPS] make plat_perf_setup() static Dmitri Vorobiev
2008-03-31 22:03 ` [PATCH 5/6] [MIPS] make standard_io_resources[] static Dmitri Vorobiev
2008-03-31 22:03 ` [PATCH 6/6] [MIPS] malta_int.c: make 4 variables static Dmitri Vorobiev
2008-03-31 22:41 ` [PATCH 0/6] [MIPS] make some functions and " Ralf Baechle
2008-04-01 8:54 ` Dmitri Vorobiev
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).