public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [MIPS] Another small series of cleanups
@ 2008-07-15 16:57 Dmitri Vorobiev
  2008-07-15 16:57 ` [PATCH 1/3] [MIPS] make the pcibios_max_latency variable static Dmitri Vorobiev
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Dmitri Vorobiev @ 2008-07-15 16:57 UTC (permalink / raw)
  To: ralf, linux-mips, linux-kernel

Hi Ralf,

Following is some janitorial stuff again. Please consider.

Thanks,
Dmitri Vorobiev

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

* [PATCH 1/3] [MIPS] make the pcibios_max_latency variable static
  2008-07-15 16:57 [MIPS] Another small series of cleanups Dmitri Vorobiev
@ 2008-07-15 16:57 ` Dmitri Vorobiev
  2008-07-16  8:01   ` [PATCH 1/3 part 2] " Dmitri Vorobiev
  2008-07-15 16:57 ` [PATCH 2/3] [MIPS] fix missing prototypes in asm/fpu.h Dmitri Vorobiev
  2008-07-15 16:57 ` [PATCH 3/3] [MIPS] add missing prototypes to asm/page.h Dmitri Vorobiev
  2 siblings, 1 reply; 9+ messages in thread
From: Dmitri Vorobiev @ 2008-07-15 16:57 UTC (permalink / raw)
  To: ralf, linux-mips, linux-kernel

The pcibios_max_latency variable is needlessly defined global,
and this patch makes it static.

Build-tested using malta_defconfig.

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

diff --git a/arch/mips/pci/pci.c b/arch/mips/pci/pci.c
index 358ad62..0187b8c 100644
--- a/arch/mips/pci/pci.c
+++ b/arch/mips/pci/pci.c
@@ -205,7 +205,7 @@ static int pcibios_enable_resources(struct pci_dev *dev, int mask)
  *  If we set up a device for bus mastering, we need to check the latency
  *  timer as certain crappy BIOSes forget to set it properly.
  */
-unsigned int pcibios_max_latency = 255;
+static unsigned int pcibios_max_latency = 255;
 
 void pcibios_set_master(struct pci_dev *dev)
 {
-- 
1.5.6


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

* [PATCH 2/3] [MIPS] fix missing prototypes in asm/fpu.h
  2008-07-15 16:57 [MIPS] Another small series of cleanups Dmitri Vorobiev
  2008-07-15 16:57 ` [PATCH 1/3] [MIPS] make the pcibios_max_latency variable static Dmitri Vorobiev
@ 2008-07-15 16:57 ` Dmitri Vorobiev
  2008-07-16  8:45   ` Ralf Baechle
  2008-07-15 16:57 ` [PATCH 3/3] [MIPS] add missing prototypes to asm/page.h Dmitri Vorobiev
  2 siblings, 1 reply; 9+ messages in thread
From: Dmitri Vorobiev @ 2008-07-15 16:57 UTC (permalink / raw)
  To: ralf, linux-mips, linux-kernel

While building the Malta defconfig, sparse spat the following
warnings:

>>>>>>>>>>>>>>>>>>
arch/mips/math-emu/kernel_linkage.c:31:6: warning: symbol
'fpu_emulator_init_fpu' was not declared. Should it be static?

arch/mips/math-emu/kernel_linkage.c:54:5: warning: symbol
'fpu_emulator_save_context' was not declared. Should it be
static?

arch/mips/math-emu/kernel_linkage.c:68:5: warning: symbol
'fpu_emulator_restore_context' was not declared. Should it be
static?
>>>>>>>>>>>>>>>>>>

This patch fixes these errors by adding the proper prototypes
to the include/asm-mips/fpu.h header, and actually using this
header in the sparse-spotted source file.

Build-tested with Malta defconfig.

Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@movial.fi>
---
 arch/mips/math-emu/kernel_linkage.c |    1 +
 include/asm-mips/fpu.h              |    2 ++
 2 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/arch/mips/math-emu/kernel_linkage.c b/arch/mips/math-emu/kernel_linkage.c
index ed49ef0..52e6c58 100644
--- a/arch/mips/math-emu/kernel_linkage.c
+++ b/arch/mips/math-emu/kernel_linkage.c
@@ -24,6 +24,7 @@
 #include <asm/signal.h>
 #include <asm/uaccess.h>
 
+#include <asm/fpu.h>
 #include <asm/fpu_emulator.h>
 
 #define SIGNALLING_NAN 0x7ff800007ff80000LL
diff --git a/include/asm-mips/fpu.h b/include/asm-mips/fpu.h
index e59d4c0..8a3ef24 100644
--- a/include/asm-mips/fpu.h
+++ b/include/asm-mips/fpu.h
@@ -35,6 +35,8 @@ extern asmlinkage int (*save_fp_context32)(struct sigcontext32 __user *sc);
 extern asmlinkage int (*restore_fp_context32)(struct sigcontext32 __user *sc);
 
 extern void fpu_emulator_init_fpu(void);
+extern int fpu_emulator_save_context(struct sigcontext __user *sc);
+extern int fpu_emulator_restore_context(struct sigcontext __user *sc);
 extern void _init_fpu(void);
 extern void _save_fp(struct task_struct *);
 extern void _restore_fp(struct task_struct *);
-- 
1.5.6


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

* [PATCH 3/3] [MIPS] add missing prototypes to asm/page.h
  2008-07-15 16:57 [MIPS] Another small series of cleanups Dmitri Vorobiev
  2008-07-15 16:57 ` [PATCH 1/3] [MIPS] make the pcibios_max_latency variable static Dmitri Vorobiev
  2008-07-15 16:57 ` [PATCH 2/3] [MIPS] fix missing prototypes in asm/fpu.h Dmitri Vorobiev
@ 2008-07-15 16:57 ` Dmitri Vorobiev
  2008-07-16  8:46   ` Ralf Baechle
  2 siblings, 1 reply; 9+ messages in thread
From: Dmitri Vorobiev @ 2008-07-15 16:57 UTC (permalink / raw)
  To: ralf, linux-mips, linux-kernel

This patch fixes the following sparse warnings:

>>>>>>>>>>>>>>>>>>
arch/mips/mm/page.c:284:16: warning: symbol
'build_clear_page' was not declared. Should it be static?

arch/mips/mm/page.c:426:16: warning: symbol 'build_copy_page'
was not declared. Should it be static?
>>>>>>>>>>>>>>>>>>

The fix is to add appropriate prototypes to the header
include/asm-mips/page.h.

Build-tested against Malta defconfig.

Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@movial.fi>
---
 include/asm-mips/page.h |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/include/asm-mips/page.h b/include/asm-mips/page.h
index 8735aa0..494f00b 100644
--- a/include/asm-mips/page.h
+++ b/include/asm-mips/page.h
@@ -34,6 +34,9 @@
 #include <linux/pfn.h>
 #include <asm/io.h>
 
+extern void build_clear_page(void);
+extern void build_copy_page(void);
+
 /*
  * It's normally defined only for FLATMEM config but it's
  * used in our early mem init code for all memory models.
-- 
1.5.6


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

* [PATCH 1/3 part 2] [MIPS] make the pcibios_max_latency variable static
  2008-07-15 16:57 ` [PATCH 1/3] [MIPS] make the pcibios_max_latency variable static Dmitri Vorobiev
@ 2008-07-16  8:01   ` Dmitri Vorobiev
  2008-07-16  8:43     ` Ralf Baechle
  0 siblings, 1 reply; 9+ messages in thread
From: Dmitri Vorobiev @ 2008-07-16  8:01 UTC (permalink / raw)
  To: ralf, linux-mips, linux-kernel

Along with making the pcibios_max_latency variable static,
its declaration needs to be removed from the header file.

Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@movial.fi>
---

Hi Ralf,

Forgot about this one yesterday, sorry.

Dmitri

 include/asm-mips/pci.h |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/include/asm-mips/pci.h b/include/asm-mips/pci.h
index d3be834..c205875 100644
--- a/include/asm-mips/pci.h
+++ b/include/asm-mips/pci.h
@@ -173,6 +173,5 @@ static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel)
 }
 
 extern int pci_probe_only;
-extern unsigned int pcibios_max_latency;
 
 #endif /* _ASM_PCI_H */
-- 
1.5.6


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

* Re: [PATCH 1/3 part 2] [MIPS] make the pcibios_max_latency variable static
  2008-07-16  8:01   ` [PATCH 1/3 part 2] " Dmitri Vorobiev
@ 2008-07-16  8:43     ` Ralf Baechle
  2008-07-16  8:44       ` Dmitri Vorobiev
  0 siblings, 1 reply; 9+ messages in thread
From: Ralf Baechle @ 2008-07-16  8:43 UTC (permalink / raw)
  To: Dmitri Vorobiev; +Cc: linux-mips, linux-kernel

On Wed, Jul 16, 2008 at 11:01:49AM +0300, Dmitri Vorobiev wrote:

> Along with making the pcibios_max_latency variable static,
> its declaration needs to be removed from the header file.
> 
> Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@movial.fi>
> ---
> 
> Hi Ralf,
> 
> Forgot about this one yesterday, sorry.

No big deal, lmo's internet connection was down for part of the afternoon
so I wasn't doing as much patch stuff as I was hoping to ...

I folded part 2 into part 1 of your patch and applied the result.

Thanks,

  Ralf

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

* Re: [PATCH 1/3 part 2] [MIPS] make the pcibios_max_latency variable static
  2008-07-16  8:43     ` Ralf Baechle
@ 2008-07-16  8:44       ` Dmitri Vorobiev
  0 siblings, 0 replies; 9+ messages in thread
From: Dmitri Vorobiev @ 2008-07-16  8:44 UTC (permalink / raw)
  To: Ralf Baechle; +Cc: linux-mips, linux-kernel

Ralf Baechle wrote:
> On Wed, Jul 16, 2008 at 11:01:49AM +0300, Dmitri Vorobiev wrote:
> 
>> Along with making the pcibios_max_latency variable static,
>> its declaration needs to be removed from the header file.
>>
>> Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@movial.fi>
>> ---
>>
>> Hi Ralf,
>>
>> Forgot about this one yesterday, sorry.
> 
> No big deal, lmo's internet connection was down for part of the afternoon
> so I wasn't doing as much patch stuff as I was hoping to ...
> 
> I folded part 2 into part 1 of your patch and applied the result.

Thank you, Ralf.

Regards,
Dmitri

> 
> Thanks,
> 
>   Ralf
> 


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

* Re: [PATCH 2/3] [MIPS] fix missing prototypes in asm/fpu.h
  2008-07-15 16:57 ` [PATCH 2/3] [MIPS] fix missing prototypes in asm/fpu.h Dmitri Vorobiev
@ 2008-07-16  8:45   ` Ralf Baechle
  0 siblings, 0 replies; 9+ messages in thread
From: Ralf Baechle @ 2008-07-16  8:45 UTC (permalink / raw)
  To: Dmitri Vorobiev; +Cc: linux-mips, linux-kernel

On Tue, Jul 15, 2008 at 07:57:31PM +0300, Dmitri Vorobiev wrote:

> While building the Malta defconfig, sparse spat the following
> warnings:
> 
> >>>>>>>>>>>>>>>>>>
> arch/mips/math-emu/kernel_linkage.c:31:6: warning: symbol
> 'fpu_emulator_init_fpu' was not declared. Should it be static?
> 
> arch/mips/math-emu/kernel_linkage.c:54:5: warning: symbol
> 'fpu_emulator_save_context' was not declared. Should it be
> static?
> 
> arch/mips/math-emu/kernel_linkage.c:68:5: warning: symbol
> 'fpu_emulator_restore_context' was not declared. Should it be
> static?
> >>>>>>>>>>>>>>>>>>
> 
> This patch fixes these errors by adding the proper prototypes
> to the include/asm-mips/fpu.h header, and actually using this
> header in the sparse-spotted source file.

I'm not terribly fond of exporting these private prototypes by making
their prototypes widely available.  I see it's need to make sparse a more
productive tool, so I applied the patch though.

Thanks,

  Ralf

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

* Re: [PATCH 3/3] [MIPS] add missing prototypes to asm/page.h
  2008-07-15 16:57 ` [PATCH 3/3] [MIPS] add missing prototypes to asm/page.h Dmitri Vorobiev
@ 2008-07-16  8:46   ` Ralf Baechle
  0 siblings, 0 replies; 9+ messages in thread
From: Ralf Baechle @ 2008-07-16  8:46 UTC (permalink / raw)
  To: Dmitri Vorobiev; +Cc: linux-mips, linux-kernel

On Tue, Jul 15, 2008 at 07:57:32PM +0300, Dmitri Vorobiev wrote:

> This patch fixes the following sparse warnings:
> 
> >>>>>>>>>>>>>>>>>>
> arch/mips/mm/page.c:284:16: warning: symbol
> 'build_clear_page' was not declared. Should it be static?
> 
> arch/mips/mm/page.c:426:16: warning: symbol 'build_copy_page'
> was not declared. Should it be static?
> >>>>>>>>>>>>>>>>>>
> 
> The fix is to add appropriate prototypes to the header
> include/asm-mips/page.h.

Same comment as for 2/3 applies.  Patch applied.  Thanks,

  Ralf

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

end of thread, other threads:[~2008-07-16  8:46 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-15 16:57 [MIPS] Another small series of cleanups Dmitri Vorobiev
2008-07-15 16:57 ` [PATCH 1/3] [MIPS] make the pcibios_max_latency variable static Dmitri Vorobiev
2008-07-16  8:01   ` [PATCH 1/3 part 2] " Dmitri Vorobiev
2008-07-16  8:43     ` Ralf Baechle
2008-07-16  8:44       ` Dmitri Vorobiev
2008-07-15 16:57 ` [PATCH 2/3] [MIPS] fix missing prototypes in asm/fpu.h Dmitri Vorobiev
2008-07-16  8:45   ` Ralf Baechle
2008-07-15 16:57 ` [PATCH 3/3] [MIPS] add missing prototypes to asm/page.h Dmitri Vorobiev
2008-07-16  8:46   ` Ralf Baechle

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