All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 2/5] [MIPS] Make two functions static
  2008-05-29 14:57 [PATCH 0/5] [MIPS] sparse noise reduction and namespace cleanups Dmitri Vorobiev
@ 2008-05-29 14:57 ` Dmitri Vorobiev
  0 siblings, 0 replies; 5+ messages in thread
From: Dmitri Vorobiev @ 2008-05-29 14:57 UTC (permalink / raw)
  To: linux-mips, ralf, linux-kernel

The following routines

uasm_rel_highest()
uasm_rel_higher()

are needlessly defined global. This patch makes them static.

Compile-tested using a customized config for the Malta board. Booting
the same board up to the shell prompt was also successful with this
patch applied.

Spotted by sparse.

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

diff --git a/arch/mips/mm/uasm.c b/arch/mips/mm/uasm.c
index 1655aa6..f467199 100644
--- a/arch/mips/mm/uasm.c
+++ b/arch/mips/mm/uasm.c
@@ -396,7 +396,7 @@ int __cpuinit uasm_in_compat_space_p(long addr)
 #endif
 }
 
-int __cpuinit uasm_rel_highest(long val)
+static int __cpuinit uasm_rel_highest(long val)
 {
 #ifdef CONFIG_64BIT
 	return ((((val + 0x800080008000L) >> 48) & 0xffff) ^ 0x8000) - 0x8000;
@@ -405,7 +405,7 @@ int __cpuinit uasm_rel_highest(long val)
 #endif
 }
 
-int __cpuinit uasm_rel_higher(long val)
+static int __cpuinit uasm_rel_higher(long val)
 {
 #ifdef CONFIG_64BIT
 	return ((((val + 0x80008000L) >> 32) & 0xffff) ^ 0x8000) - 0x8000;
diff --git a/arch/mips/mm/uasm.h b/arch/mips/mm/uasm.h
index 0d6a66f..c6d1e3d 100644
--- a/arch/mips/mm/uasm.h
+++ b/arch/mips/mm/uasm.h
@@ -103,8 +103,6 @@ struct uasm_label {
 void __cpuinit uasm_build_label(struct uasm_label **lab, u32 *addr, int lid);
 #ifdef CONFIG_64BIT
 int uasm_in_compat_space_p(long addr);
-int uasm_rel_highest(long val);
-int uasm_rel_higher(long val);
 #endif
 int uasm_rel_hi(long val);
 int uasm_rel_lo(long val);
-- 
1.4.4.3


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

* Re: [PATCH 1/5] [MIPS] fix sparse warning about setup_early_printk()
       [not found] ` <12124843631742-git-send-email-dmitri.vorobiev@movial.fi>
@ 2008-06-12  7:26   ` Ralf Baechle
  0 siblings, 0 replies; 5+ messages in thread
From: Ralf Baechle @ 2008-06-12  7:26 UTC (permalink / raw)
  To: Dmitri Vorobiev; +Cc: linux-mips

On Tue, Jun 03, 2008 at 12:12:40PM +0300, Dmitri Vorobiev wrote:
> From: Dmitri Vorobiev <dmitri.vorobiev@movial.fi>
> Date: Tue,  3 Jun 2008 12:12:40 +0300
> To: linux-mips@linux-mips.org, ralf@linux-mips.org
> Subject: [PATCH 1/5] [MIPS] fix sparse warning about setup_early_printk()
> 
> This patch fixes the following sparse warning:
> 
> <<<<<<<<
> 
> arch/mips/kernel/early_printk.c:35:13: warning: symbol 'setup_early_printk'
> was not declared. Should it be static?
> 
> <<<<<<<<
> 
> The fix is to define a prototype of the setup_early_printk() function and
> to include the appropriate header into arch/mips/kernel/early_printk.c.
> 
> Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@movial.fi>
> ---
>  arch/mips/kernel/early_printk.c |    1 +
>  arch/mips/kernel/setup.c        |    6 +-----
>  include/asm-mips/setup.h        |    2 ++
>  3 files changed, 4 insertions(+), 5 deletions(-)
> 
> diff --git a/arch/mips/kernel/early_printk.c b/arch/mips/kernel/early_printk.c
> index 9dccfa4..cb602c1 100644
> --- a/arch/mips/kernel/early_printk.c
> +++ b/arch/mips/kernel/early_printk.c
> @@ -7,6 +7,7 @@
>   * Copyright (C) 2007 MIPS Technologies, Inc.
>   *   written by Ralf Baechle (ralf@linux-mips.org)
>   */
> +#include <asm/setup.h>
>  #include <linux/console.h>
>  #include <linux/init.h>

Queued for 2.6.27 with includes sorted <linux/...> first followed by
<asm/...>.

  Ralf

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

* Re: [PATCH 2/5] [MIPS] Make two functions static
       [not found] ` <12124843631632-git-send-email-dmitri.vorobiev@movial.fi>
@ 2008-06-12  7:27   ` Ralf Baechle
  0 siblings, 0 replies; 5+ messages in thread
From: Ralf Baechle @ 2008-06-12  7:27 UTC (permalink / raw)
  To: Dmitri Vorobiev; +Cc: linux-mips

On Tue, Jun 03, 2008 at 12:12:41PM +0300, Dmitri Vorobiev wrote:
> From: Dmitri Vorobiev <dmitri.vorobiev@movial.fi>
> Date: Tue,  3 Jun 2008 12:12:41 +0300
> To: linux-mips@linux-mips.org, ralf@linux-mips.org
> Subject: [PATCH 2/5] [MIPS] Make two functions static

Queued for 2.6.27.

Thanks,

  Ralf

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

* Re: [PATCH 3/5] [MIPS] remove unused function alloc_legacy_irqno()
       [not found] ` <12124843634070-git-send-email-dmitri.vorobiev@movial.fi>
@ 2008-06-12  7:36   ` Ralf Baechle
  0 siblings, 0 replies; 5+ messages in thread
From: Ralf Baechle @ 2008-06-12  7:36 UTC (permalink / raw)
  To: Dmitri Vorobiev; +Cc: linux-mips

On Tue, Jun 03, 2008 at 12:12:42PM +0300, Dmitri Vorobiev wrote:

> The function alloc_legacy_irqno() is not used any more, and this
> patch removes it.
> 
> Inspired by a namespacecheck warning.

NAK.  While currently unused alloc_legacy_irqno() is needed for systems
such as SGI IP27 which use dynamic interrupt number allocation and may
feature EISA slots.  So there eventually will be a caller.

  Ralf

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

* Re: [PATCH 4/5] [MIPS] unexport {allocate,free}_irqno
       [not found] ` <1212484363969-git-send-email-dmitri.vorobiev@movial.fi>
@ 2008-06-12  7:40   ` Ralf Baechle
  0 siblings, 0 replies; 5+ messages in thread
From: Ralf Baechle @ 2008-06-12  7:40 UTC (permalink / raw)
  To: Dmitri Vorobiev; +Cc: linux-mips

On Tue, Jun 03, 2008 at 12:12:43PM +0300, Dmitri Vorobiev wrote:

> The following routines
> 
> allocate_irqno()
> free_irqno()
> 
> seem not to be used outside of the core kernel code, hence
> exporting these functions is pointless. This patch removes
> the export.

And I don't see why one would want to use them in modules, so queue for
2.6.27 as well.  Thanks,

   Ralf

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

end of thread, other threads:[~2008-06-12  7:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <12124843631664-git-send-email-dmitri.vorobiev@movial.fi>
     [not found] ` <12124843631742-git-send-email-dmitri.vorobiev@movial.fi>
2008-06-12  7:26   ` [PATCH 1/5] [MIPS] fix sparse warning about setup_early_printk() Ralf Baechle
     [not found] ` <12124843631632-git-send-email-dmitri.vorobiev@movial.fi>
2008-06-12  7:27   ` [PATCH 2/5] [MIPS] Make two functions static Ralf Baechle
     [not found] ` <12124843634070-git-send-email-dmitri.vorobiev@movial.fi>
2008-06-12  7:36   ` [PATCH 3/5] [MIPS] remove unused function alloc_legacy_irqno() Ralf Baechle
     [not found] ` <1212484363969-git-send-email-dmitri.vorobiev@movial.fi>
2008-06-12  7:40   ` [PATCH 4/5] [MIPS] unexport {allocate,free}_irqno Ralf Baechle
2008-05-29 14:57 [PATCH 0/5] [MIPS] sparse noise reduction and namespace cleanups Dmitri Vorobiev
2008-05-29 14:57 ` [PATCH 2/5] [MIPS] Make two functions static Dmitri Vorobiev

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.