Linux MIPS Architecture development
 help / color / mirror / Atom feed
* [PATCH] MIPS: math-emu: cp1emu: Fix closing bracket for the d_fmt case
@ 2015-07-16 13:06 Markos Chandras
  2015-07-16 13:06 ` Markos Chandras
  2015-07-17  8:04 ` Ralf Baechle
  0 siblings, 2 replies; 3+ messages in thread
From: Markos Chandras @ 2015-07-16 13:06 UTC (permalink / raw)
  To: linux-mips

The double format (d_fmt) case uses an opening bracket which then
closes at the end of the word format (w_fmt). This can be rather confusing
so add the closing bracket at the end of the d_fmt case and use another one
for the w_fmt one.

Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
---
 arch/mips/math-emu/cp1emu.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/arch/mips/math-emu/cp1emu.c b/arch/mips/math-emu/cp1emu.c
index 712f17a2ecf2..cd858953a783 100644
--- a/arch/mips/math-emu/cp1emu.c
+++ b/arch/mips/math-emu/cp1emu.c
@@ -2021,8 +2021,11 @@ dcopuop:
 			break;
 		}
 		break;
+	}
+
+	case w_fmt: {
+		union ieee754dp fs;
 
-	case w_fmt:
 		switch (MIPSInst_FUNC(ir)) {
 		case fcvts_op:
 			/* convert word to single precision real */
-- 
2.4.5

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

* [PATCH] MIPS: math-emu: cp1emu: Fix closing bracket for the d_fmt case
  2015-07-16 13:06 [PATCH] MIPS: math-emu: cp1emu: Fix closing bracket for the d_fmt case Markos Chandras
@ 2015-07-16 13:06 ` Markos Chandras
  2015-07-17  8:04 ` Ralf Baechle
  1 sibling, 0 replies; 3+ messages in thread
From: Markos Chandras @ 2015-07-16 13:06 UTC (permalink / raw)
  To: linux-mips

The double format (d_fmt) case uses an opening bracket which then
closes at the end of the word format (w_fmt). This can be rather confusing
so add the closing bracket at the end of the d_fmt case and use another one
for the w_fmt one.

Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
---
 arch/mips/math-emu/cp1emu.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/arch/mips/math-emu/cp1emu.c b/arch/mips/math-emu/cp1emu.c
index 712f17a2ecf2..cd858953a783 100644
--- a/arch/mips/math-emu/cp1emu.c
+++ b/arch/mips/math-emu/cp1emu.c
@@ -2021,8 +2021,11 @@ dcopuop:
 			break;
 		}
 		break;
+	}
+
+	case w_fmt: {
+		union ieee754dp fs;
 
-	case w_fmt:
 		switch (MIPSInst_FUNC(ir)) {
 		case fcvts_op:
 			/* convert word to single precision real */
-- 
2.4.5

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

* Re: [PATCH] MIPS: math-emu: cp1emu: Fix closing bracket for the d_fmt case
  2015-07-16 13:06 [PATCH] MIPS: math-emu: cp1emu: Fix closing bracket for the d_fmt case Markos Chandras
  2015-07-16 13:06 ` Markos Chandras
@ 2015-07-17  8:04 ` Ralf Baechle
  1 sibling, 0 replies; 3+ messages in thread
From: Ralf Baechle @ 2015-07-17  8:04 UTC (permalink / raw)
  To: Markos Chandras; +Cc: linux-mips

On Thu, Jul 16, 2015 at 02:06:45PM +0100, Markos Chandras wrote:

> The double format (d_fmt) case uses an opening bracket which then
> closes at the end of the word format (w_fmt). This can be rather confusing
> so add the closing bracket at the end of the d_fmt case and use another one
> for the w_fmt one.

Heh.  There used to be a construct like

  switch (foo)
  case val1:
	if (bla) {
		...
  case val2:
	} else {
  case val3:
	}
  }

in the kernel and even though entirely correct I received several bug
reports for it.  One reportes even suggested a bug report against GCC!

So queued for peace of mind in 4.3.  Thanks!

  Ralf

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

end of thread, other threads:[~2015-07-17  8:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-16 13:06 [PATCH] MIPS: math-emu: cp1emu: Fix closing bracket for the d_fmt case Markos Chandras
2015-07-16 13:06 ` Markos Chandras
2015-07-17  8:04 ` Ralf Baechle

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