All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] MIPS specific GCC-4.6 fixes.
@ 2011-01-24 22:51 David Daney
  2011-01-24 22:51 ` [PATCH 1/4] MIPS: Fix GCC-4.6 'set but not used' warning in signal*.c David Daney
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: David Daney @ 2011-01-24 22:51 UTC (permalink / raw)
  To: linux-mips, ralf; +Cc: David Daney

These are the patches to MIPS specific code needed to build the kernel
with GCC-4.6 (not yet released).

There is a separate patch so fs/binfmt_elf.c I will send separately.

David Daney (4):
  MIPS: Fix GCC-4.6 'set but not used' warning in signal*.c
  MIPS: Remove unused code from arch/mips/kernel/syscall.c
  MIPS: Fix GCC-4.6 'set but not used' warning in ieee754int.h
  MIPS: Fix GCC-4.6 'set but not used' warning in arch/mips/mm/init.c

 arch/mips/kernel/signal.c       |    2 +-
 arch/mips/kernel/signal32.c     |    2 +-
 arch/mips/kernel/syscall.c      |    3 +--
 arch/mips/math-emu/ieee754int.h |    4 ++--
 arch/mips/mm/init.c             |    2 +-
 5 files changed, 6 insertions(+), 7 deletions(-)

-- 
1.7.2.3

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

* [PATCH 1/4] MIPS: Fix GCC-4.6 'set but not used' warning in signal*.c
  2011-01-24 22:51 [PATCH 0/4] MIPS specific GCC-4.6 fixes David Daney
@ 2011-01-24 22:51 ` David Daney
  2011-01-25  0:51   ` Ralf Baechle
  2011-01-24 22:51 ` [PATCH 2/4] MIPS: Remove unused code from arch/mips/kernel/syscall.c David Daney
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 9+ messages in thread
From: David Daney @ 2011-01-24 22:51 UTC (permalink / raw)
  To: linux-mips, ralf; +Cc: David Daney

GCC-4.6 can find more unused code than previous versions could.

In the case of protected_restore_fp_context{,32}, the variable tmp is
really used.  Its use is tricky in that we really care about the side
effects of the __put_user() calls.  So we must mark tmp with
__maybe_unused to quiet the warning.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
---
 arch/mips/kernel/signal.c   |    2 +-
 arch/mips/kernel/signal32.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/mips/kernel/signal.c b/arch/mips/kernel/signal.c
index 5922342..dbbe0ce 100644
--- a/arch/mips/kernel/signal.c
+++ b/arch/mips/kernel/signal.c
@@ -84,7 +84,7 @@ static int protected_save_fp_context(struct sigcontext __user *sc)
 
 static int protected_restore_fp_context(struct sigcontext __user *sc)
 {
-	int err, tmp;
+	int err, tmp __maybe_unused;
 	while (1) {
 		lock_fpu_owner();
 		own_fpu_inatomic(0);
diff --git a/arch/mips/kernel/signal32.c b/arch/mips/kernel/signal32.c
index a0ed0e0..aae9866 100644
--- a/arch/mips/kernel/signal32.c
+++ b/arch/mips/kernel/signal32.c
@@ -115,7 +115,7 @@ static int protected_save_fp_context32(struct sigcontext32 __user *sc)
 
 static int protected_restore_fp_context32(struct sigcontext32 __user *sc)
 {
-	int err, tmp;
+	int err, tmp __maybe_unused;
 	while (1) {
 		lock_fpu_owner();
 		own_fpu_inatomic(0);
-- 
1.7.2.3

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

* [PATCH 2/4] MIPS: Remove unused code from arch/mips/kernel/syscall.c
  2011-01-24 22:51 [PATCH 0/4] MIPS specific GCC-4.6 fixes David Daney
  2011-01-24 22:51 ` [PATCH 1/4] MIPS: Fix GCC-4.6 'set but not used' warning in signal*.c David Daney
@ 2011-01-24 22:51 ` David Daney
  2011-01-25  0:51   ` Ralf Baechle
  2011-01-24 22:51 ` [PATCH 3/4] MIPS: Fix GCC-4.6 'set but not used' warning in ieee754int.h David Daney
  2011-01-24 22:51 ` [PATCH 4/4] MIPS: Fix GCC-4.6 'set but not used' warning in arch/mips/mm/init.c David Daney
  3 siblings, 1 reply; 9+ messages in thread
From: David Daney @ 2011-01-24 22:51 UTC (permalink / raw)
  To: linux-mips, ralf; +Cc: David Daney

The variable arg3 in _sys_sysmips() is unused.  Remove it.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
---
 arch/mips/kernel/syscall.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/arch/mips/kernel/syscall.c b/arch/mips/kernel/syscall.c
index 80d753d..0de1402 100644
--- a/arch/mips/kernel/syscall.c
+++ b/arch/mips/kernel/syscall.c
@@ -386,12 +386,11 @@ save_static_function(sys_sysmips);
 static int __used noinline
 _sys_sysmips(nabi_no_regargs struct pt_regs regs)
 {
-	long cmd, arg1, arg2, arg3;
+	long cmd, arg1, arg2;
 
 	cmd = regs.regs[4];
 	arg1 = regs.regs[5];
 	arg2 = regs.regs[6];
-	arg3 = regs.regs[7];
 
 	switch (cmd) {
 	case MIPS_ATOMIC_SET:
-- 
1.7.2.3

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

* [PATCH 3/4] MIPS: Fix GCC-4.6 'set but not used' warning in ieee754int.h
  2011-01-24 22:51 [PATCH 0/4] MIPS specific GCC-4.6 fixes David Daney
  2011-01-24 22:51 ` [PATCH 1/4] MIPS: Fix GCC-4.6 'set but not used' warning in signal*.c David Daney
  2011-01-24 22:51 ` [PATCH 2/4] MIPS: Remove unused code from arch/mips/kernel/syscall.c David Daney
@ 2011-01-24 22:51 ` David Daney
  2011-01-25  0:51   ` Ralf Baechle
  2011-01-24 22:51 ` [PATCH 4/4] MIPS: Fix GCC-4.6 'set but not used' warning in arch/mips/mm/init.c David Daney
  3 siblings, 1 reply; 9+ messages in thread
From: David Daney @ 2011-01-24 22:51 UTC (permalink / raw)
  To: linux-mips, ralf; +Cc: David Daney

GCC-4.6 can find more unused code than previous versions could.

In the case of arch/mips/math-emu/ieee754int.h, the COMPXSP and
COMPXDP macros are used in several places, but a couple of them leave
xs unused.  The easiest thing to do is mark it as __maybe_unused to
quiet the warning.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
---
 arch/mips/math-emu/ieee754int.h |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/mips/math-emu/ieee754int.h b/arch/mips/math-emu/ieee754int.h
index 2701d95..2a7d43f 100644
--- a/arch/mips/math-emu/ieee754int.h
+++ b/arch/mips/math-emu/ieee754int.h
@@ -70,7 +70,7 @@
 
 
 #define COMPXSP \
-  unsigned xm; int xe; int xs; int xc
+  unsigned xm; int xe; int xs __maybe_unused; int xc
 
 #define COMPYSP \
   unsigned ym; int ye; int ys; int yc
@@ -104,7 +104,7 @@
 
 
 #define COMPXDP \
-u64 xm; int xe; int xs; int xc
+u64 xm; int xe; int xs __maybe_unused; int xc
 
 #define COMPYDP \
 u64 ym; int ye; int ys; int yc
-- 
1.7.2.3

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

* [PATCH 4/4] MIPS: Fix GCC-4.6 'set but not used' warning in arch/mips/mm/init.c
  2011-01-24 22:51 [PATCH 0/4] MIPS specific GCC-4.6 fixes David Daney
                   ` (2 preceding siblings ...)
  2011-01-24 22:51 ` [PATCH 3/4] MIPS: Fix GCC-4.6 'set but not used' warning in ieee754int.h David Daney
@ 2011-01-24 22:51 ` David Daney
  2011-01-25  0:51   ` Ralf Baechle
  3 siblings, 1 reply; 9+ messages in thread
From: David Daney @ 2011-01-24 22:51 UTC (permalink / raw)
  To: linux-mips, ralf; +Cc: David Daney

Under some combinations of CONFIG_*, lastpfn in page_is_ram is 'set
but not used'.  Mark it as __maybe_unused to quiet the warning/error.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
---
 arch/mips/mm/init.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/mips/mm/init.c b/arch/mips/mm/init.c
index dff6421..0d4046c 100644
--- a/arch/mips/mm/init.c
+++ b/arch/mips/mm/init.c
@@ -329,7 +329,7 @@ int page_is_ram(unsigned long pagenr)
 void __init paging_init(void)
 {
 	unsigned long max_zone_pfns[MAX_NR_ZONES];
-	unsigned long lastpfn;
+	unsigned long lastpfn __maybe_unused;
 
 	pagetable_init();
 
-- 
1.7.2.3

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

* Re: [PATCH 1/4] MIPS: Fix GCC-4.6 'set but not used' warning in signal*.c
  2011-01-24 22:51 ` [PATCH 1/4] MIPS: Fix GCC-4.6 'set but not used' warning in signal*.c David Daney
@ 2011-01-25  0:51   ` Ralf Baechle
  0 siblings, 0 replies; 9+ messages in thread
From: Ralf Baechle @ 2011-01-25  0:51 UTC (permalink / raw)
  To: David Daney; +Cc: linux-mips

Applied.  Thanks,

  Ralf

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

* Re: [PATCH 2/4] MIPS: Remove unused code from arch/mips/kernel/syscall.c
  2011-01-24 22:51 ` [PATCH 2/4] MIPS: Remove unused code from arch/mips/kernel/syscall.c David Daney
@ 2011-01-25  0:51   ` Ralf Baechle
  0 siblings, 0 replies; 9+ messages in thread
From: Ralf Baechle @ 2011-01-25  0:51 UTC (permalink / raw)
  To: David Daney; +Cc: linux-mips

Applied.  Thanks,

  Ralf

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

* Re: [PATCH 3/4] MIPS: Fix GCC-4.6 'set but not used' warning in ieee754int.h
  2011-01-24 22:51 ` [PATCH 3/4] MIPS: Fix GCC-4.6 'set but not used' warning in ieee754int.h David Daney
@ 2011-01-25  0:51   ` Ralf Baechle
  0 siblings, 0 replies; 9+ messages in thread
From: Ralf Baechle @ 2011-01-25  0:51 UTC (permalink / raw)
  To: David Daney; +Cc: linux-mips

Applied.  Thanks,

  Ralf

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

* Re: [PATCH 4/4] MIPS: Fix GCC-4.6 'set but not used' warning in arch/mips/mm/init.c
  2011-01-24 22:51 ` [PATCH 4/4] MIPS: Fix GCC-4.6 'set but not used' warning in arch/mips/mm/init.c David Daney
@ 2011-01-25  0:51   ` Ralf Baechle
  0 siblings, 0 replies; 9+ messages in thread
From: Ralf Baechle @ 2011-01-25  0:51 UTC (permalink / raw)
  To: David Daney; +Cc: linux-mips

Applied.  Thanks,

  Ralf

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

end of thread, other threads:[~2011-01-25  0:52 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-24 22:51 [PATCH 0/4] MIPS specific GCC-4.6 fixes David Daney
2011-01-24 22:51 ` [PATCH 1/4] MIPS: Fix GCC-4.6 'set but not used' warning in signal*.c David Daney
2011-01-25  0:51   ` Ralf Baechle
2011-01-24 22:51 ` [PATCH 2/4] MIPS: Remove unused code from arch/mips/kernel/syscall.c David Daney
2011-01-25  0:51   ` Ralf Baechle
2011-01-24 22:51 ` [PATCH 3/4] MIPS: Fix GCC-4.6 'set but not used' warning in ieee754int.h David Daney
2011-01-25  0:51   ` Ralf Baechle
2011-01-24 22:51 ` [PATCH 4/4] MIPS: Fix GCC-4.6 'set but not used' warning in arch/mips/mm/init.c David Daney
2011-01-25  0:51   ` Ralf Baechle

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.