Linux MIPS Architecture development
 help / color / mirror / Atom feed
* [PATCH 0/5] [MIPS] Another round of nitpicking
@ 2008-06-18  7:18 Dmitri Vorobiev
  2008-06-18  7:18 ` [PATCH 1/5] [MIPS] 8253: make the pit_clockevent variable static Dmitri Vorobiev
                   ` (5 more replies)
  0 siblings, 6 replies; 13+ messages in thread
From: Dmitri Vorobiev @ 2008-06-18  7:18 UTC (permalink / raw)
  To: ralf, linux-mips

Hi Ralf,

Following is another set of some janitorial stuff to somehow reduce
sparse noise and clean the global namespace up.

Please consider.

Thanks,
Dmitri Vorobiev

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

* [PATCH 1/5] [MIPS] 8253: make the pit_clockevent variable static
  2008-06-18  7:18 [PATCH 0/5] [MIPS] Another round of nitpicking Dmitri Vorobiev
@ 2008-06-18  7:18 ` Dmitri Vorobiev
  2008-07-03 15:21   ` Ralf Baechle
  2008-06-18  7:18 ` [PATCH 2/5] [MIPS] Namespace clean-up in arch/mips/pci/pci.c Dmitri Vorobiev
                   ` (4 subsequent siblings)
  5 siblings, 1 reply; 13+ messages in thread
From: Dmitri Vorobiev @ 2008-06-18  7:18 UTC (permalink / raw)
  To: ralf, linux-mips

The pit_clockevent symbol is needlessly defined global. This patch makes
that variable static.

Spotted by sparse. Compile-tested using Malta defconfig.

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

diff --git a/arch/mips/kernel/i8253.c b/arch/mips/kernel/i8253.c
index 38fa1a1..b6ac551 100644
--- a/arch/mips/kernel/i8253.c
+++ b/arch/mips/kernel/i8253.c
@@ -80,7 +80,7 @@ static int pit_next_event(unsigned long delta, struct clock_event_device *evt)
  * registered. This mechanism replaces the previous #ifdef LOCAL_APIC -
  * !using_apic_timer decisions in do_timer_interrupt_hook()
  */
-struct clock_event_device pit_clockevent = {
+static struct clock_event_device pit_clockevent = {
 	.name		= "pit",
 	.features	= CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT,
 	.set_mode	= init_pit_timer,
-- 
1.5.5.GIT

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

* [PATCH 2/5] [MIPS] Namespace clean-up in arch/mips/pci/pci.c
  2008-06-18  7:18 [PATCH 0/5] [MIPS] Another round of nitpicking Dmitri Vorobiev
  2008-06-18  7:18 ` [PATCH 1/5] [MIPS] 8253: make the pit_clockevent variable static Dmitri Vorobiev
@ 2008-06-18  7:18 ` Dmitri Vorobiev
  2008-07-03 15:22   ` Ralf Baechle
  2008-06-18  7:18 ` [PATCH 3/5] [MIPS] A few cleanups in malta_int.c Dmitri Vorobiev
                   ` (3 subsequent siblings)
  5 siblings, 1 reply; 13+ messages in thread
From: Dmitri Vorobiev @ 2008-06-18  7:18 UTC (permalink / raw)
  To: ralf, linux-mips

The following symbols

	hose_head
	hose_tail

are needlessly defined global in arch/mips/pci/pci.c, and
this patch makes them static.

The variable pci_isa_hose is not used, and is removed by
this patch.

Spotted by namespacecheck. Tested by booting a Malta 4Kc
board up to the shell prompt.

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

diff --git a/arch/mips/pci/pci.c b/arch/mips/pci/pci.c
index 358ad62..d7d6cb0 100644
--- a/arch/mips/pci/pci.c
+++ b/arch/mips/pci/pci.c
@@ -29,8 +29,7 @@ unsigned int pci_probe = PCI_ASSIGN_ALL_BUSSES;
  * The PCI controller list.
  */
 
-struct pci_controller *hose_head, **hose_tail = &hose_head;
-struct pci_controller *pci_isa_hose;
+static struct pci_controller *hose_head, **hose_tail = &hose_head;
 
 unsigned long PCIBIOS_MIN_IO	= 0x0000;
 unsigned long PCIBIOS_MIN_MEM	= 0;
-- 
1.5.5.GIT

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

* [PATCH 3/5] [MIPS] A few cleanups in malta_int.c
  2008-06-18  7:18 [PATCH 0/5] [MIPS] Another round of nitpicking Dmitri Vorobiev
  2008-06-18  7:18 ` [PATCH 1/5] [MIPS] 8253: make the pit_clockevent variable static Dmitri Vorobiev
  2008-06-18  7:18 ` [PATCH 2/5] [MIPS] Namespace clean-up in arch/mips/pci/pci.c Dmitri Vorobiev
@ 2008-06-18  7:18 ` Dmitri Vorobiev
  2008-07-03 15:22   ` Ralf Baechle
  2008-06-18  7:18 ` [PATCH 4/5] [MIPS] Make gcmp_probe() static Dmitri Vorobiev
                   ` (2 subsequent siblings)
  5 siblings, 1 reply; 13+ messages in thread
From: Dmitri Vorobiev @ 2008-06-18  7:18 UTC (permalink / raw)
  To: ralf, linux-mips

Both the fill_ipi_map() routine and the gic_intr_map array defined
in arch/mips/mips-boards/malta/malta_int.c are not used outside of
the latter file. Thus, these objects can become static. Moreover,
these two objects are used by the MT code only, which is why this
patch adds the appropriate ifdef.

While at it, this patch removes an unnecessary preprocessing macro
in favor of the commonly used ARRAY_SIZE.

Successfully tested using a Qemu-emulated Malta board for both SMP
and UP kernels.

Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@movial.fi>
---
 arch/mips/mips-boards/malta/malta_int.c |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/arch/mips/mips-boards/malta/malta_int.c b/arch/mips/mips-boards/malta/malta_int.c
index 8c49510..b393982 100644
--- a/arch/mips/mips-boards/malta/malta_int.c
+++ b/arch/mips/mips-boards/malta/malta_int.c
@@ -363,6 +363,7 @@ static msc_irqmap_t __initdata msc_eicirqmap[] = {
 
 static int __initdata msc_nr_eicirqs = ARRAY_SIZE(msc_eicirqmap);
 
+#if defined(CONFIG_MIPS_MT_SMP)
 /*
  * This GIC specific tabular array defines the association between External
  * Interrupts and CPUs/Core Interrupts. The nature of the External
@@ -394,6 +395,7 @@ static struct gic_intr_map gic_intr_map[] = {
 	{ GIC_EXT_INTR(22), 	3,	GIC_CPU_INT1,	GIC_POL_POS, GIC_TRIG_EDGE,	1 },
 	{ GIC_EXT_INTR(23), 	3,	GIC_CPU_INT2,	GIC_POL_POS, GIC_TRIG_EDGE,	1 },
 };
+#endif
 
 /*
  * GCMP needs to be detected before any SMP initialisation
@@ -412,7 +414,8 @@ int __init gcmp_probe(unsigned long addr, unsigned long size)
 	return gcmp_present;
 }
 
-void __init fill_ipi_map(void)
+#if defined(CONFIG_MIPS_MT_SMP)
+static void __init fill_ipi_map(void)
 {
 	int i;
 
@@ -422,6 +425,7 @@ void __init fill_ipi_map(void)
 				(1 << (gic_intr_map[i].pin + 2));
 	}
 }
+#endif
 
 void __init arch_init_irq(void)
 {
@@ -527,7 +531,6 @@ void __init arch_init_irq(void)
 				.call =  GIC_IPI_EXT_INTR_CALLFNC_VPE3
 			}
 		};
-#define NIPI (sizeof(ipiirq)/sizeof(ipiirq[0]))
 		fill_ipi_map();
 		gic_init(GIC_BASE_ADDR, GIC_ADDRSPACE_SZ, gic_intr_map, ARRAY_SIZE(gic_intr_map), MIPS_GIC_IRQ_BASE);
 		if (!gcmp_present) {
@@ -549,7 +552,7 @@ void __init arch_init_irq(void)
 		printk("CPU%d: status register now %08x\n", smp_processor_id(), read_c0_status());
 		write_c0_status(0x1100dc00);
 		printk("CPU%d: status register frc %08x\n", smp_processor_id(), read_c0_status());
-		for (i = 0; i < NIPI; i++) {
+		for (i = 0; i < ARRAY_SIZE(ipiirq); i++) {
 			setup_irq(MIPS_GIC_IRQ_BASE + ipiirq[i].resched, &irq_resched);
 			setup_irq(MIPS_GIC_IRQ_BASE + ipiirq[i].call, &irq_call);
 
-- 
1.5.5.GIT

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

* [PATCH 4/5] [MIPS] Make gcmp_probe() static
  2008-06-18  7:18 [PATCH 0/5] [MIPS] Another round of nitpicking Dmitri Vorobiev
                   ` (2 preceding siblings ...)
  2008-06-18  7:18 ` [PATCH 3/5] [MIPS] A few cleanups in malta_int.c Dmitri Vorobiev
@ 2008-06-18  7:18 ` Dmitri Vorobiev
  2008-07-03 15:23   ` Ralf Baechle
  2008-06-18  7:18 ` [PATCH 5/5] [MIPS] Add an appropriate header into display.c Dmitri Vorobiev
  2008-06-30  7:09 ` [PATCH 0/5] [MIPS] Another round of nitpicking Dmitri Vorobiev
  5 siblings, 1 reply; 13+ messages in thread
From: Dmitri Vorobiev @ 2008-06-18  7:18 UTC (permalink / raw)
  To: ralf, linux-mips

The gcmp_probe() function is needlessly defined global, and
this patch makes it static.

Tested by booting a Malta 4Kc board up to the shell prompt.

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

diff --git a/arch/mips/mips-boards/malta/malta_int.c b/arch/mips/mips-boards/malta/malta_int.c
index b393982..ea17611 100644
--- a/arch/mips/mips-boards/malta/malta_int.c
+++ b/arch/mips/mips-boards/malta/malta_int.c
@@ -400,7 +400,7 @@ static struct gic_intr_map gic_intr_map[] = {
 /*
  * GCMP needs to be detected before any SMP initialisation
  */
-int __init gcmp_probe(unsigned long addr, unsigned long size)
+static int __init gcmp_probe(unsigned long addr, unsigned long size)
 {
 	if (gcmp_present >= 0)
 		return gcmp_present;
-- 
1.5.5.GIT

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

* [PATCH 5/5] [MIPS] Add an appropriate header into display.c
  2008-06-18  7:18 [PATCH 0/5] [MIPS] Another round of nitpicking Dmitri Vorobiev
                   ` (3 preceding siblings ...)
  2008-06-18  7:18 ` [PATCH 4/5] [MIPS] Make gcmp_probe() static Dmitri Vorobiev
@ 2008-06-18  7:18 ` Dmitri Vorobiev
  2008-07-03 15:23   ` Ralf Baechle
  2008-06-30  7:09 ` [PATCH 0/5] [MIPS] Another round of nitpicking Dmitri Vorobiev
  5 siblings, 1 reply; 13+ messages in thread
From: Dmitri Vorobiev @ 2008-06-18  7:18 UTC (permalink / raw)
  To: ralf, linux-mips

The following errors were caught by sparse:

>>>>>>>>>>>

arch/mips/mips-boards/generic/display.c:30:6: warning: symbol
'mips_display_message' was not declared. Should it be static?

arch/mips/mips-boards/generic/display.c:58:6: warning: symbol
'mips_scroll_message' was not declared. Should it be static?

>>>>>>>>>>>

This patch includes the asm/mips-boards/prom.h header file into
arch/mips/mips-boards/generic/display.c. This adds the needed
function declarations, and the errors are gone.

Compile-tested using defconfigs for Malta, Atlas and SEAD boards.
Runtime test was successfully performed by booting a Malta 4Kc
board up to the shell prompt.

Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@movial.fi>
---
 arch/mips/mips-boards/generic/display.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/arch/mips/mips-boards/generic/display.c b/arch/mips/mips-boards/generic/display.c
index 2a0057c..7c8828f 100644
--- a/arch/mips/mips-boards/generic/display.c
+++ b/arch/mips/mips-boards/generic/display.c
@@ -22,6 +22,7 @@
 #include <linux/timer.h>
 #include <asm/io.h>
 #include <asm/mips-boards/generic.h>
+#include <asm/mips-boards/prom.h>
 
 extern const char display_string[];
 static unsigned int display_count;
-- 
1.5.5.GIT

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

* Re: [PATCH 0/5] [MIPS] Another round of nitpicking
  2008-06-18  7:18 [PATCH 0/5] [MIPS] Another round of nitpicking Dmitri Vorobiev
                   ` (4 preceding siblings ...)
  2008-06-18  7:18 ` [PATCH 5/5] [MIPS] Add an appropriate header into display.c Dmitri Vorobiev
@ 2008-06-30  7:09 ` Dmitri Vorobiev
  5 siblings, 0 replies; 13+ messages in thread
From: Dmitri Vorobiev @ 2008-06-30  7:09 UTC (permalink / raw)
  To: Dmitri Vorobiev; +Cc: ralf, linux-mips

Dmitri Vorobiev wrote:
> Hi Ralf,
> 
> Following is another set of some janitorial stuff to somehow reduce
> sparse noise and clean the global namespace up.
> 
> Please consider.

Hi, just checking if this patch series has not been lost.

Thanks,
Dmitri

> 
> Thanks,
> Dmitri Vorobiev
> 

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

* Re: [PATCH 1/5] [MIPS] 8253: make the pit_clockevent variable static
  2008-06-18  7:18 ` [PATCH 1/5] [MIPS] 8253: make the pit_clockevent variable static Dmitri Vorobiev
@ 2008-07-03 15:21   ` Ralf Baechle
  0 siblings, 0 replies; 13+ messages in thread
From: Ralf Baechle @ 2008-07-03 15:21 UTC (permalink / raw)
  To: Dmitri Vorobiev; +Cc: linux-mips

On Wed, Jun 18, 2008 at 10:18:19AM +0300, Dmitri Vorobiev wrote:
> From: Dmitri Vorobiev <dmitri.vorobiev@movial.fi>
> Date: Wed, 18 Jun 2008 10:18:19 +0300
> To: ralf@linux-mips.org, linux-mips@linux-mips.org
> Subject: [PATCH 1/5] [MIPS] 8253: make the pit_clockevent variable static
> 
> The pit_clockevent symbol is needlessly defined global. This patch makes
> that variable static.
> 
> Spotted by sparse. Compile-tested using Malta defconfig.
> 
> Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@movial.fi>

Queued for 2.6.27.  Thanks,

  Ralf

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

* Re: [PATCH 2/5] [MIPS] Namespace clean-up in arch/mips/pci/pci.c
  2008-06-18  7:18 ` [PATCH 2/5] [MIPS] Namespace clean-up in arch/mips/pci/pci.c Dmitri Vorobiev
@ 2008-07-03 15:22   ` Ralf Baechle
  0 siblings, 0 replies; 13+ messages in thread
From: Ralf Baechle @ 2008-07-03 15:22 UTC (permalink / raw)
  To: Dmitri Vorobiev; +Cc: linux-mips

On Wed, Jun 18, 2008 at 10:18:20AM +0300, Dmitri Vorobiev wrote:

> The following symbols
> 
> 	hose_head
> 	hose_tail
> 
> are needlessly defined global in arch/mips/pci/pci.c, and
> this patch makes them static.
> 
> The variable pci_isa_hose is not used, and is removed by
> this patch.
> 
> Spotted by namespacecheck. Tested by booting a Malta 4Kc
> board up to the shell prompt.
> 
> Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@movial.fi>

Queued for 2.6.27.  Thanks,

  Ralf

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

* Re: [PATCH 3/5] [MIPS] A few cleanups in malta_int.c
  2008-06-18  7:18 ` [PATCH 3/5] [MIPS] A few cleanups in malta_int.c Dmitri Vorobiev
@ 2008-07-03 15:22   ` Ralf Baechle
  0 siblings, 0 replies; 13+ messages in thread
From: Ralf Baechle @ 2008-07-03 15:22 UTC (permalink / raw)
  To: Dmitri Vorobiev; +Cc: linux-mips

On Wed, Jun 18, 2008 at 10:18:21AM +0300, Dmitri Vorobiev wrote:

> Both the fill_ipi_map() routine and the gic_intr_map array defined
> in arch/mips/mips-boards/malta/malta_int.c are not used outside of
> the latter file. Thus, these objects can become static. Moreover,
> these two objects are used by the MT code only, which is why this
> patch adds the appropriate ifdef.
> 
> While at it, this patch removes an unnecessary preprocessing macro
> in favor of the commonly used ARRAY_SIZE.
> 
> Successfully tested using a Qemu-emulated Malta board for both SMP
> and UP kernels.
> 
> Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@movial.fi>

Queued for 2.6.27 after fixing a reject.  Thanks,

  Ralf

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

* Re: [PATCH 4/5] [MIPS] Make gcmp_probe() static
  2008-06-18  7:18 ` [PATCH 4/5] [MIPS] Make gcmp_probe() static Dmitri Vorobiev
@ 2008-07-03 15:23   ` Ralf Baechle
  0 siblings, 0 replies; 13+ messages in thread
From: Ralf Baechle @ 2008-07-03 15:23 UTC (permalink / raw)
  To: Dmitri Vorobiev; +Cc: linux-mips

On Wed, Jun 18, 2008 at 10:18:22AM +0300, Dmitri Vorobiev wrote:

> The gcmp_probe() function is needlessly defined global, and
> this patch makes it static.
> 
> Tested by booting a Malta 4Kc board up to the shell prompt.
> 
> Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@movial.fi>

Queued for 2.6.27.  Thanks,

  Ralf

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

* Re: [PATCH 5/5] [MIPS] Add an appropriate header into display.c
  2008-06-18  7:18 ` [PATCH 5/5] [MIPS] Add an appropriate header into display.c Dmitri Vorobiev
@ 2008-07-03 15:23   ` Ralf Baechle
  2008-07-03 15:28     ` Dmitri Vorobiev
  0 siblings, 1 reply; 13+ messages in thread
From: Ralf Baechle @ 2008-07-03 15:23 UTC (permalink / raw)
  To: Dmitri Vorobiev; +Cc: linux-mips

On Wed, Jun 18, 2008 at 10:18:23AM +0300, Dmitri Vorobiev wrote:

> The following errors were caught by sparse:
> 
> >>>>>>>>>>>
> 
> arch/mips/mips-boards/generic/display.c:30:6: warning: symbol
> 'mips_display_message' was not declared. Should it be static?
> 
> arch/mips/mips-boards/generic/display.c:58:6: warning: symbol
> 'mips_scroll_message' was not declared. Should it be static?
> 
> >>>>>>>>>>>
> 
> This patch includes the asm/mips-boards/prom.h header file into
> arch/mips/mips-boards/generic/display.c. This adds the needed
> function declarations, and the errors are gone.
> 
> Compile-tested using defconfigs for Malta, Atlas and SEAD boards.
> Runtime test was successfully performed by booting a Malta 4Kc
> board up to the shell prompt.
> 
> Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@movial.fi>

Queued for 2.6.27.  Thanks,

  Ralf

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

* Re: [PATCH 5/5] [MIPS] Add an appropriate header into display.c
  2008-07-03 15:23   ` Ralf Baechle
@ 2008-07-03 15:28     ` Dmitri Vorobiev
  0 siblings, 0 replies; 13+ messages in thread
From: Dmitri Vorobiev @ 2008-07-03 15:28 UTC (permalink / raw)
  To: Ralf Baechle; +Cc: linux-mips

Ralf Baechle wrote:
> On Wed, Jun 18, 2008 at 10:18:23AM +0300, Dmitri Vorobiev wrote:
> 
>> The following errors were caught by sparse:
>>
>> arch/mips/mips-boards/generic/display.c:30:6: warning: symbol
>> 'mips_display_message' was not declared. Should it be static?
>>
>> arch/mips/mips-boards/generic/display.c:58:6: warning: symbol
>> 'mips_scroll_message' was not declared. Should it be static?
>>
>> This patch includes the asm/mips-boards/prom.h header file into
>> arch/mips/mips-boards/generic/display.c. This adds the needed
>> function declarations, and the errors are gone.
>>
>> Compile-tested using defconfigs for Malta, Atlas and SEAD boards.
>> Runtime test was successfully performed by booting a Malta 4Kc
>> board up to the shell prompt.
>>
>> Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@movial.fi>
> 
> Queued for 2.6.27.  Thanks,

Ralf, thanks for picking up the series.

Dmitri

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

end of thread, other threads:[~2008-07-03 15:25 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-18  7:18 [PATCH 0/5] [MIPS] Another round of nitpicking Dmitri Vorobiev
2008-06-18  7:18 ` [PATCH 1/5] [MIPS] 8253: make the pit_clockevent variable static Dmitri Vorobiev
2008-07-03 15:21   ` Ralf Baechle
2008-06-18  7:18 ` [PATCH 2/5] [MIPS] Namespace clean-up in arch/mips/pci/pci.c Dmitri Vorobiev
2008-07-03 15:22   ` Ralf Baechle
2008-06-18  7:18 ` [PATCH 3/5] [MIPS] A few cleanups in malta_int.c Dmitri Vorobiev
2008-07-03 15:22   ` Ralf Baechle
2008-06-18  7:18 ` [PATCH 4/5] [MIPS] Make gcmp_probe() static Dmitri Vorobiev
2008-07-03 15:23   ` Ralf Baechle
2008-06-18  7:18 ` [PATCH 5/5] [MIPS] Add an appropriate header into display.c Dmitri Vorobiev
2008-07-03 15:23   ` Ralf Baechle
2008-07-03 15:28     ` Dmitri Vorobiev
2008-06-30  7:09 ` [PATCH 0/5] [MIPS] Another round of nitpicking Dmitri Vorobiev

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