Linux MIPS Architecture development
 help / color / mirror / Atom feed
* [PATCH 0/3] A few MIPS cleanups
@ 2009-03-22 22:12 Dmitri Vorobiev
  2009-03-22 22:12 ` [PATCH 1/3] [MIPS] Malta: make a needlessly global integer variable static Dmitri Vorobiev
  2009-03-23 13:28 ` [PATCH 0/3] A few MIPS cleanups Ralf Baechle
  0 siblings, 2 replies; 5+ messages in thread
From: Dmitri Vorobiev @ 2009-03-22 22:12 UTC (permalink / raw)
  To: ralf, linux-mips

Hi Ralf,

A couple of cleanup patches follow. Please consider.

Thanks,
Dmitri

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 1/3] [MIPS] Malta: make a needlessly global integer variable static
  2009-03-22 22:12 [PATCH 0/3] A few MIPS cleanups Dmitri Vorobiev
@ 2009-03-22 22:12 ` Dmitri Vorobiev
  2009-03-22 22:12   ` [PATCH 2/3] [MIPS] Fix global namespace pollution in arch/mips/kernel/smp-up.c Dmitri Vorobiev
  2009-03-23 13:28 ` [PATCH 0/3] A few MIPS cleanups Ralf Baechle
  1 sibling, 1 reply; 5+ messages in thread
From: Dmitri Vorobiev @ 2009-03-22 22:12 UTC (permalink / raw)
  To: ralf, linux-mips; +Cc: Dmitri Vorobiev

The variable `mips_revision_corid' is needlessly defined global in
arch/mips/mti-malta/malta-init.c, and this patch makes it static.

Build-tested with malta_defconfig.

Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@movial.com>
---
 arch/mips/include/asm/mips-boards/generic.h |    2 --
 arch/mips/mti-malta/malta-init.c            |    2 +-
 2 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/arch/mips/include/asm/mips-boards/generic.h b/arch/mips/include/asm/mips-boards/generic.h
index 7f0b034..c0da1a8 100644
--- a/arch/mips/include/asm/mips-boards/generic.h
+++ b/arch/mips/include/asm/mips-boards/generic.h
@@ -71,8 +71,6 @@
 
 #define MIPS_REVISION_CORID (((*(volatile u32 *)ioremap(MIPS_REVISION_REG, 4)) >> 10) & 0x3f)
 
-extern int mips_revision_corid;
-
 #define MIPS_REVISION_SCON_OTHER	   0
 #define MIPS_REVISION_SCON_SOCITSC	   1
 #define MIPS_REVISION_SCON_SOCITSCP	   2
diff --git a/arch/mips/mti-malta/malta-init.c b/arch/mips/mti-malta/malta-init.c
index 4832af2..475038a 100644
--- a/arch/mips/mti-malta/malta-init.c
+++ b/arch/mips/mti-malta/malta-init.c
@@ -48,7 +48,7 @@ int *_prom_argv, *_prom_envp;
 
 int init_debug = 0;
 
-int mips_revision_corid;
+static int mips_revision_corid;
 int mips_revision_sconid;
 
 /* Bonito64 system controller register base. */
-- 
1.5.6.3

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/3] [MIPS] Fix global namespace pollution in arch/mips/kernel/smp-up.c
  2009-03-22 22:12 ` [PATCH 1/3] [MIPS] Malta: make a needlessly global integer variable static Dmitri Vorobiev
@ 2009-03-22 22:12   ` Dmitri Vorobiev
  2009-03-22 22:12     ` [PATCH 3/3] [MIPS] Make a needlessly global symbol static in arch/mips/kernel/smp.c Dmitri Vorobiev
  0 siblings, 1 reply; 5+ messages in thread
From: Dmitri Vorobiev @ 2009-03-22 22:12 UTC (permalink / raw)
  To: ralf, linux-mips; +Cc: Dmitri Vorobiev

The following symbols in arch/mips/kernel/smp-up.c are needlessly
defined global:

up_send_ipi_single()
up_init_secondary()
up_smp_finish()
up_cpus_done()
up_boot_secondary()
up_smp_setup()
up_prepare_cpus()

This patch makes the symbols static.

Build-tested using malta_defconfig.

Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@movial.com>
---
 arch/mips/kernel/smp-up.c |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/arch/mips/kernel/smp-up.c b/arch/mips/kernel/smp-up.c
index ead6c30..878e373 100644
--- a/arch/mips/kernel/smp-up.c
+++ b/arch/mips/kernel/smp-up.c
@@ -13,7 +13,7 @@
 /*
  * Send inter-processor interrupt
  */
-void up_send_ipi_single(int cpu, unsigned int action)
+static void up_send_ipi_single(int cpu, unsigned int action)
 {
 	panic(KERN_ERR "%s called", __func__);
 }
@@ -27,31 +27,31 @@ static inline void up_send_ipi_mask(cpumask_t mask, unsigned int action)
  *  After we've done initial boot, this function is called to allow the
  *  board code to clean up state, if needed
  */
-void __cpuinit up_init_secondary(void)
+static void __cpuinit up_init_secondary(void)
 {
 }
 
-void __cpuinit up_smp_finish(void)
+static void __cpuinit up_smp_finish(void)
 {
 }
 
 /* Hook for after all CPUs are online */
-void up_cpus_done(void)
+static void up_cpus_done(void)
 {
 }
 
 /*
  * Firmware CPU startup hook
  */
-void __cpuinit up_boot_secondary(int cpu, struct task_struct *idle)
+static void __cpuinit up_boot_secondary(int cpu, struct task_struct *idle)
 {
 }
 
-void __init up_smp_setup(void)
+static void __init up_smp_setup(void)
 {
 }
 
-void __init up_prepare_cpus(unsigned int max_cpus)
+static void __init up_prepare_cpus(unsigned int max_cpus)
 {
 }
 
-- 
1.5.6.3

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 3/3] [MIPS] Make a needlessly global symbol static in arch/mips/kernel/smp.c
  2009-03-22 22:12   ` [PATCH 2/3] [MIPS] Fix global namespace pollution in arch/mips/kernel/smp-up.c Dmitri Vorobiev
@ 2009-03-22 22:12     ` Dmitri Vorobiev
  0 siblings, 0 replies; 5+ messages in thread
From: Dmitri Vorobiev @ 2009-03-22 22:12 UTC (permalink / raw)
  To: ralf, linux-mips; +Cc: Dmitri Vorobiev

The variable cpu_callin_map is needlessly defined global, so let's
make it static now.

Build-tested using malta_defconfig.

Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@movial.com>
---
 arch/mips/kernel/smp.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/mips/kernel/smp.c b/arch/mips/kernel/smp.c
index 3da9470..c937506 100644
--- a/arch/mips/kernel/smp.c
+++ b/arch/mips/kernel/smp.c
@@ -44,7 +44,7 @@
 #include <asm/mipsmtregs.h>
 #endif /* CONFIG_MIPS_MT_SMTC */
 
-volatile cpumask_t cpu_callin_map;	/* Bitmask of started secondaries */
+static volatile cpumask_t cpu_callin_map;	/* Bitmask of started secondaries */
 int __cpu_number_map[NR_CPUS];		/* Map physical to logical */
 int __cpu_logical_map[NR_CPUS];		/* Map logical to physical */
 
-- 
1.5.6.3

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 0/3] A few MIPS cleanups
  2009-03-22 22:12 [PATCH 0/3] A few MIPS cleanups Dmitri Vorobiev
  2009-03-22 22:12 ` [PATCH 1/3] [MIPS] Malta: make a needlessly global integer variable static Dmitri Vorobiev
@ 2009-03-23 13:28 ` Ralf Baechle
  1 sibling, 0 replies; 5+ messages in thread
From: Ralf Baechle @ 2009-03-23 13:28 UTC (permalink / raw)
  To: Dmitri Vorobiev; +Cc: linux-mips

On Mon, Mar 23, 2009 at 12:12:26AM +0200, Dmitri Vorobiev wrote:

> A couple of cleanup patches follow. Please consider.

Thanks, queued for 2.6.30.

  Ralf

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-03-23 13:28 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-22 22:12 [PATCH 0/3] A few MIPS cleanups Dmitri Vorobiev
2009-03-22 22:12 ` [PATCH 1/3] [MIPS] Malta: make a needlessly global integer variable static Dmitri Vorobiev
2009-03-22 22:12   ` [PATCH 2/3] [MIPS] Fix global namespace pollution in arch/mips/kernel/smp-up.c Dmitri Vorobiev
2009-03-22 22:12     ` [PATCH 3/3] [MIPS] Make a needlessly global symbol static in arch/mips/kernel/smp.c Dmitri Vorobiev
2009-03-23 13:28 ` [PATCH 0/3] A few MIPS cleanups Ralf Baechle

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox