All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] arch/sparc/math-emu/math_32.c: drop stray break operator
@ 2014-08-04 20:47 ` Andrey Utkin
  0 siblings, 0 replies; 15+ messages in thread
From: Andrey Utkin @ 2014-08-04 20:47 UTC (permalink / raw)
  To: davem; +Cc: sparclinux, linux-kernel, kernel-janitors, Andrey Utkin

This commit is a guesswork, but it seems to make sense to drop this
break, as otherwise the following line is never executed and becomes
dead code. And that following line actually saves the result of
local calculation by the pointer given in function argument. So the
proposed change makes sense if this code in the whole makes sense (but I
am unable to analyze it in the whole).

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=81641
Reported-by: David Binderman <dcb314@hotmail.com>
Signed-off-by: Andrey Utkin <andrey.krieger.utkin@gmail.com>
---
 arch/sparc/math-emu/math_32.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/sparc/math-emu/math_32.c b/arch/sparc/math-emu/math_32.c
index aa4d55b..5ce8f2f 100644
--- a/arch/sparc/math-emu/math_32.c
+++ b/arch/sparc/math-emu/math_32.c
@@ -499,7 +499,7 @@ static int do_one_mathemu(u32 insn, unsigned long *pfsr, unsigned long *fregs)
 		case 0: fsr = *pfsr;
 			if (IR == -1) IR = 2;
 			/* fcc is always fcc0 */
-			fsr &= ~0xc00; fsr |= (IR << 10); break;
+			fsr &= ~0xc00; fsr |= (IR << 10);
 			*pfsr = fsr;
 			break;
 		case 1: rd->s = IR; break;
-- 
1.8.5.5


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

* [PATCH] arch/sparc/math-emu/math_32.c: drop stray break operator
@ 2014-08-04 20:47 ` Andrey Utkin
  0 siblings, 0 replies; 15+ messages in thread
From: Andrey Utkin @ 2014-08-04 20:47 UTC (permalink / raw)
  To: davem; +Cc: sparclinux, linux-kernel, kernel-janitors, Andrey Utkin

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="windows-1254", Size: 1347 bytes --]

This commit is a guesswork, but it seems to make sense to drop this
break, as otherwise the following line is never executed and becomes
dead code. And that following line actually saves the result of
local calculation by the pointer given in function argument. So the
proposed change makes sense if this code in the whole makes sense (but I
am unable to analyze it in the whole).

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id641
Reported-by: David Binderman <dcb314@hotmail.com>
Signed-off-by: Andrey Utkin <andrey.krieger.utkin@gmail.com>
---
 arch/sparc/math-emu/math_32.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/sparc/math-emu/math_32.c b/arch/sparc/math-emu/math_32.c
index aa4d55b..5ce8f2f 100644
--- a/arch/sparc/math-emu/math_32.c
+++ b/arch/sparc/math-emu/math_32.c
@@ -499,7 +499,7 @@ static int do_one_mathemu(u32 insn, unsigned long *pfsr, unsigned long *fregs)
 		case 0: fsr = *pfsr;
 			if (IR = -1) IR = 2;
 			/* fcc is always fcc0 */
-			fsr &= ~0xc00; fsr |= (IR << 10); break;
+			fsr &= ~0xc00; fsr |= (IR << 10);
 			*pfsr = fsr;
 			break;
 		case 1: rd->s = IR; break;
-- 
1.8.5.5

--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH] arch/sparc/math-emu/math_32.c: drop stray break operator
@ 2014-08-04 20:47 ` Andrey Utkin
  0 siblings, 0 replies; 15+ messages in thread
From: Andrey Utkin @ 2014-08-04 20:47 UTC (permalink / raw)
  To: davem; +Cc: sparclinux, linux-kernel, kernel-janitors, Andrey Utkin

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="windows-1254", Size: 1342 bytes --]

This commit is a guesswork, but it seems to make sense to drop this
break, as otherwise the following line is never executed and becomes
dead code. And that following line actually saves the result of
local calculation by the pointer given in function argument. So the
proposed change makes sense if this code in the whole makes sense (but I
am unable to analyze it in the whole).

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id641
Reported-by: David Binderman <dcb314@hotmail.com>
Signed-off-by: Andrey Utkin <andrey.krieger.utkin@gmail.com>
---
 arch/sparc/math-emu/math_32.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/sparc/math-emu/math_32.c b/arch/sparc/math-emu/math_32.c
index aa4d55b..5ce8f2f 100644
--- a/arch/sparc/math-emu/math_32.c
+++ b/arch/sparc/math-emu/math_32.c
@@ -499,7 +499,7 @@ static int do_one_mathemu(u32 insn, unsigned long *pfsr, unsigned long *fregs)
 		case 0: fsr = *pfsr;
 			if (IR = -1) IR = 2;
 			/* fcc is always fcc0 */
-			fsr &= ~0xc00; fsr |= (IR << 10); break;
+			fsr &= ~0xc00; fsr |= (IR << 10);
 			*pfsr = fsr;
 			break;
 		case 1: rd->s = IR; break;
-- 
1.8.5.5

--
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH] arch/sparc/math-emu/math_32.c: drop stray break operator
  2014-08-04 20:47 ` Andrey Utkin
  (?)
@ 2014-08-05  3:32   ` David Miller
  -1 siblings, 0 replies; 15+ messages in thread
From: David Miller @ 2014-08-05  3:32 UTC (permalink / raw)
  To: andrey.krieger.utkin; +Cc: sparclinux, linux-kernel, kernel-janitors

From: Andrey Utkin <andrey.krieger.utkin@gmail.com>
Date: Mon,  4 Aug 2014 23:47:41 +0300

> This commit is a guesswork, but it seems to make sense to drop this
> break, as otherwise the following line is never executed and becomes
> dead code. And that following line actually saves the result of
> local calculation by the pointer given in function argument. So the
> proposed change makes sense if this code in the whole makes sense (but I
> am unable to analyze it in the whole).
> 
> Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=81641
> Reported-by: David Binderman <dcb314@hotmail.com>
> Signed-off-by: Andrey Utkin <andrey.krieger.utkin@gmail.com>

Yeah, not putting the condition code result into the register might
cause problems :-)

Thanks for catching this, applied and queued up for -stable.

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

* Re: [PATCH] arch/sparc/math-emu/math_32.c: drop stray break operator
@ 2014-08-05  3:32   ` David Miller
  0 siblings, 0 replies; 15+ messages in thread
From: David Miller @ 2014-08-05  3:32 UTC (permalink / raw)
  To: andrey.krieger.utkin; +Cc: sparclinux, linux-kernel, kernel-janitors

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="windows-1254", Size: 1010 bytes --]

From: Andrey Utkin <andrey.krieger.utkin@gmail.com>
Date: Mon,  4 Aug 2014 23:47:41 +0300

> This commit is a guesswork, but it seems to make sense to drop this
> break, as otherwise the following line is never executed and becomes
> dead code. And that following line actually saves the result of
> local calculation by the pointer given in function argument. So the
> proposed change makes sense if this code in the whole makes sense (but I
> am unable to analyze it in the whole).
> 
> Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id641
> Reported-by: David Binderman <dcb314@hotmail.com>
> Signed-off-by: Andrey Utkin <andrey.krieger.utkin@gmail.com>

Yeah, not putting the condition code result into the register might
cause problems :-)

Thanks for catching this, applied and queued up for -stable.
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH] arch/sparc/math-emu/math_32.c: drop stray break operator
@ 2014-08-05  3:32   ` David Miller
  0 siblings, 0 replies; 15+ messages in thread
From: David Miller @ 2014-08-05  3:32 UTC (permalink / raw)
  To: andrey.krieger.utkin; +Cc: sparclinux, linux-kernel, kernel-janitors

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="windows-1254", Size: 1005 bytes --]

From: Andrey Utkin <andrey.krieger.utkin@gmail.com>
Date: Mon,  4 Aug 2014 23:47:41 +0300

> This commit is a guesswork, but it seems to make sense to drop this
> break, as otherwise the following line is never executed and becomes
> dead code. And that following line actually saves the result of
> local calculation by the pointer given in function argument. So the
> proposed change makes sense if this code in the whole makes sense (but I
> am unable to analyze it in the whole).
> 
> Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id641
> Reported-by: David Binderman <dcb314@hotmail.com>
> Signed-off-by: Andrey Utkin <andrey.krieger.utkin@gmail.com>

Yeah, not putting the condition code result into the register might
cause problems :-)

Thanks for catching this, applied and queued up for -stable.
--
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH] arch/sparc/math-emu/math_32.c: drop stray break operator
  2014-08-04 20:47 ` Andrey Utkin
  (?)
@ 2014-08-05  7:11   ` walter harms
  -1 siblings, 0 replies; 15+ messages in thread
From: walter harms @ 2014-08-05  7:11 UTC (permalink / raw)
  To: Andrey Utkin; +Cc: davem, sparclinux, linux-kernel, kernel-janitors



Am 04.08.2014 22:47, schrieb Andrey Utkin:
> This commit is a guesswork, but it seems to make sense to drop this
> break, as otherwise the following line is never executed and becomes
> dead code. And that following line actually saves the result of
> local calculation by the pointer given in function argument. So the
> proposed change makes sense if this code in the whole makes sense (but I
> am unable to analyze it in the whole).
> 
> Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=81641
> Reported-by: David Binderman <dcb314@hotmail.com>
> Signed-off-by: Andrey Utkin <andrey.krieger.utkin@gmail.com>
> ---
>  arch/sparc/math-emu/math_32.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/sparc/math-emu/math_32.c b/arch/sparc/math-emu/math_32.c
> index aa4d55b..5ce8f2f 100644
> --- a/arch/sparc/math-emu/math_32.c
> +++ b/arch/sparc/math-emu/math_32.c
> @@ -499,7 +499,7 @@ static int do_one_mathemu(u32 insn, unsigned long *pfsr, unsigned long *fregs)
>  		case 0: fsr = *pfsr;
>  			if (IR == -1) IR = 2;
>  			/* fcc is always fcc0 */

The patch looks ok, but can somebody comment on this comment ?
what "fcc" ? should it be a fsr ?


> -			fsr &= ~0xc00; fsr |= (IR << 10); break;
> +			fsr &= ~0xc00; fsr |= (IR << 10);

nitpicking:
   fsr &= ~0xc00;
   fsr |= (IR << 10);

It is better readable.

re,
 wh

>  			*pfsr = fsr;
>  			break;
>  		case 1: rd->s = IR; break;

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

* Re: [PATCH] arch/sparc/math-emu/math_32.c: drop stray break operator
@ 2014-08-05  7:11   ` walter harms
  0 siblings, 0 replies; 15+ messages in thread
From: walter harms @ 2014-08-05  7:11 UTC (permalink / raw)
  To: Andrey Utkin; +Cc: davem, sparclinux, linux-kernel, kernel-janitors

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="windows-1254", Size: 1620 bytes --]



Am 04.08.2014 22:47, schrieb Andrey Utkin:
> This commit is a guesswork, but it seems to make sense to drop this
> break, as otherwise the following line is never executed and becomes
> dead code. And that following line actually saves the result of
> local calculation by the pointer given in function argument. So the
> proposed change makes sense if this code in the whole makes sense (but I
> am unable to analyze it in the whole).
> 
> Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id641
> Reported-by: David Binderman <dcb314@hotmail.com>
> Signed-off-by: Andrey Utkin <andrey.krieger.utkin@gmail.com>
> ---
>  arch/sparc/math-emu/math_32.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/sparc/math-emu/math_32.c b/arch/sparc/math-emu/math_32.c
> index aa4d55b..5ce8f2f 100644
> --- a/arch/sparc/math-emu/math_32.c
> +++ b/arch/sparc/math-emu/math_32.c
> @@ -499,7 +499,7 @@ static int do_one_mathemu(u32 insn, unsigned long *pfsr, unsigned long *fregs)
>  		case 0: fsr = *pfsr;
>  			if (IR = -1) IR = 2;
>  			/* fcc is always fcc0 */

The patch looks ok, but can somebody comment on this comment ?
what "fcc" ? should it be a fsr ?


> -			fsr &= ~0xc00; fsr |= (IR << 10); break;
> +			fsr &= ~0xc00; fsr |= (IR << 10);

nitpicking:
   fsr &= ~0xc00;
   fsr |= (IR << 10);

It is better readable.

re,
 wh

>  			*pfsr = fsr;
>  			break;
>  		case 1: rd->s = IR; break;
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH] arch/sparc/math-emu/math_32.c: drop stray break operator
@ 2014-08-05  7:11   ` walter harms
  0 siblings, 0 replies; 15+ messages in thread
From: walter harms @ 2014-08-05  7:11 UTC (permalink / raw)
  To: Andrey Utkin; +Cc: davem, sparclinux, linux-kernel, kernel-janitors

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="windows-1254", Size: 1615 bytes --]



Am 04.08.2014 22:47, schrieb Andrey Utkin:
> This commit is a guesswork, but it seems to make sense to drop this
> break, as otherwise the following line is never executed and becomes
> dead code. And that following line actually saves the result of
> local calculation by the pointer given in function argument. So the
> proposed change makes sense if this code in the whole makes sense (but I
> am unable to analyze it in the whole).
> 
> Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id641
> Reported-by: David Binderman <dcb314@hotmail.com>
> Signed-off-by: Andrey Utkin <andrey.krieger.utkin@gmail.com>
> ---
>  arch/sparc/math-emu/math_32.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/sparc/math-emu/math_32.c b/arch/sparc/math-emu/math_32.c
> index aa4d55b..5ce8f2f 100644
> --- a/arch/sparc/math-emu/math_32.c
> +++ b/arch/sparc/math-emu/math_32.c
> @@ -499,7 +499,7 @@ static int do_one_mathemu(u32 insn, unsigned long *pfsr, unsigned long *fregs)
>  		case 0: fsr = *pfsr;
>  			if (IR = -1) IR = 2;
>  			/* fcc is always fcc0 */

The patch looks ok, but can somebody comment on this comment ?
what "fcc" ? should it be a fsr ?


> -			fsr &= ~0xc00; fsr |= (IR << 10); break;
> +			fsr &= ~0xc00; fsr |= (IR << 10);

nitpicking:
   fsr &= ~0xc00;
   fsr |= (IR << 10);

It is better readable.

re,
 wh

>  			*pfsr = fsr;
>  			break;
>  		case 1: rd->s = IR; break;
--
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH] arch/sparc/math-emu/math_32.c: drop stray break operator
  2014-08-05  7:11   ` walter harms
  (?)
@ 2014-08-05 19:49     ` David Miller
  -1 siblings, 0 replies; 15+ messages in thread
From: David Miller @ 2014-08-05 19:49 UTC (permalink / raw)
  To: wharms; +Cc: andrey.krieger.utkin, sparclinux, linux-kernel, kernel-janitors

From: walter harms <wharms@bfs.de>
Date: Tue, 05 Aug 2014 09:11:52 +0200

> 
> 
> Am 04.08.2014 22:47, schrieb Andrey Utkin:
>> This commit is a guesswork, but it seems to make sense to drop this
>> break, as otherwise the following line is never executed and becomes
>> dead code. And that following line actually saves the result of
>> local calculation by the pointer given in function argument. So the
>> proposed change makes sense if this code in the whole makes sense (but I
>> am unable to analyze it in the whole).
>> 
>> Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=81641
>> Reported-by: David Binderman <dcb314@hotmail.com>
>> Signed-off-by: Andrey Utkin <andrey.krieger.utkin@gmail.com>
>> ---
>>  arch/sparc/math-emu/math_32.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>> 
>> diff --git a/arch/sparc/math-emu/math_32.c b/arch/sparc/math-emu/math_32.c
>> index aa4d55b..5ce8f2f 100644
>> --- a/arch/sparc/math-emu/math_32.c
>> +++ b/arch/sparc/math-emu/math_32.c
>> @@ -499,7 +499,7 @@ static int do_one_mathemu(u32 insn, unsigned long *pfsr, unsigned long *fregs)
>>  		case 0: fsr = *pfsr;
>>  			if (IR == -1) IR = 2;
>>  			/* fcc is always fcc0 */
> 
> The patch looks ok, but can somebody comment on this comment ?
> what "fcc" ? should it be a fsr ?

It's the condition code field inside of the %fsr register.

In 32-bit chips there is only one set of condition codes, whereas
on 64-bit chips there are 4 sets referred to as fcc0, fcc1, fcc2,
and fcc3.

That's what this comment is talking about.

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

* Re: [PATCH] arch/sparc/math-emu/math_32.c: drop stray break operator
@ 2014-08-05 19:49     ` David Miller
  0 siblings, 0 replies; 15+ messages in thread
From: David Miller @ 2014-08-05 19:49 UTC (permalink / raw)
  To: wharms; +Cc: andrey.krieger.utkin, sparclinux, linux-kernel, kernel-janitors

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="windows-1254", Size: 1735 bytes --]

From: walter harms <wharms@bfs.de>
Date: Tue, 05 Aug 2014 09:11:52 +0200

> 
> 
> Am 04.08.2014 22:47, schrieb Andrey Utkin:
>> This commit is a guesswork, but it seems to make sense to drop this
>> break, as otherwise the following line is never executed and becomes
>> dead code. And that following line actually saves the result of
>> local calculation by the pointer given in function argument. So the
>> proposed change makes sense if this code in the whole makes sense (but I
>> am unable to analyze it in the whole).
>> 
>> Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id641
>> Reported-by: David Binderman <dcb314@hotmail.com>
>> Signed-off-by: Andrey Utkin <andrey.krieger.utkin@gmail.com>
>> ---
>>  arch/sparc/math-emu/math_32.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>> 
>> diff --git a/arch/sparc/math-emu/math_32.c b/arch/sparc/math-emu/math_32.c
>> index aa4d55b..5ce8f2f 100644
>> --- a/arch/sparc/math-emu/math_32.c
>> +++ b/arch/sparc/math-emu/math_32.c
>> @@ -499,7 +499,7 @@ static int do_one_mathemu(u32 insn, unsigned long *pfsr, unsigned long *fregs)
>>  		case 0: fsr = *pfsr;
>>  			if (IR = -1) IR = 2;
>>  			/* fcc is always fcc0 */
> 
> The patch looks ok, but can somebody comment on this comment ?
> what "fcc" ? should it be a fsr ?

It's the condition code field inside of the %fsr register.

In 32-bit chips there is only one set of condition codes, whereas
on 64-bit chips there are 4 sets referred to as fcc0, fcc1, fcc2,
and fcc3.

That's what this comment is talking about.
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH] arch/sparc/math-emu/math_32.c: drop stray break operator
@ 2014-08-05 19:49     ` David Miller
  0 siblings, 0 replies; 15+ messages in thread
From: David Miller @ 2014-08-05 19:49 UTC (permalink / raw)
  To: wharms; +Cc: andrey.krieger.utkin, sparclinux, linux-kernel, kernel-janitors

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="windows-1254", Size: 1730 bytes --]

From: walter harms <wharms@bfs.de>
Date: Tue, 05 Aug 2014 09:11:52 +0200

> 
> 
> Am 04.08.2014 22:47, schrieb Andrey Utkin:
>> This commit is a guesswork, but it seems to make sense to drop this
>> break, as otherwise the following line is never executed and becomes
>> dead code. And that following line actually saves the result of
>> local calculation by the pointer given in function argument. So the
>> proposed change makes sense if this code in the whole makes sense (but I
>> am unable to analyze it in the whole).
>> 
>> Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id641
>> Reported-by: David Binderman <dcb314@hotmail.com>
>> Signed-off-by: Andrey Utkin <andrey.krieger.utkin@gmail.com>
>> ---
>>  arch/sparc/math-emu/math_32.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>> 
>> diff --git a/arch/sparc/math-emu/math_32.c b/arch/sparc/math-emu/math_32.c
>> index aa4d55b..5ce8f2f 100644
>> --- a/arch/sparc/math-emu/math_32.c
>> +++ b/arch/sparc/math-emu/math_32.c
>> @@ -499,7 +499,7 @@ static int do_one_mathemu(u32 insn, unsigned long *pfsr, unsigned long *fregs)
>>  		case 0: fsr = *pfsr;
>>  			if (IR = -1) IR = 2;
>>  			/* fcc is always fcc0 */
> 
> The patch looks ok, but can somebody comment on this comment ?
> what "fcc" ? should it be a fsr ?

It's the condition code field inside of the %fsr register.

In 32-bit chips there is only one set of condition codes, whereas
on 64-bit chips there are 4 sets referred to as fcc0, fcc1, fcc2,
and fcc3.

That's what this comment is talking about.
--
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH] arch/sparc/math-emu/math_32.c: drop stray break operator
  2014-08-05 19:49     ` David Miller
  (?)
@ 2014-08-06  7:09       ` walter harms
  -1 siblings, 0 replies; 15+ messages in thread
From: walter harms @ 2014-08-06  7:09 UTC (permalink / raw)
  To: David Miller
  Cc: andrey.krieger.utkin, sparclinux, linux-kernel, kernel-janitors



Am 05.08.2014 21:49, schrieb David Miller:
> From: walter harms <wharms@bfs.de>
> Date: Tue, 05 Aug 2014 09:11:52 +0200
> 
>>
>>
>> Am 04.08.2014 22:47, schrieb Andrey Utkin:
>>> This commit is a guesswork, but it seems to make sense to drop this
>>> break, as otherwise the following line is never executed and becomes
>>> dead code. And that following line actually saves the result of
>>> local calculation by the pointer given in function argument. So the
>>> proposed change makes sense if this code in the whole makes sense (but I
>>> am unable to analyze it in the whole).
>>>
>>> Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=81641
>>> Reported-by: David Binderman <dcb314@hotmail.com>
>>> Signed-off-by: Andrey Utkin <andrey.krieger.utkin@gmail.com>
>>> ---
>>>  arch/sparc/math-emu/math_32.c | 2 +-
>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/arch/sparc/math-emu/math_32.c b/arch/sparc/math-emu/math_32.c
>>> index aa4d55b..5ce8f2f 100644
>>> --- a/arch/sparc/math-emu/math_32.c
>>> +++ b/arch/sparc/math-emu/math_32.c
>>> @@ -499,7 +499,7 @@ static int do_one_mathemu(u32 insn, unsigned long *pfsr, unsigned long *fregs)
>>>  		case 0: fsr = *pfsr;
>>>  			if (IR == -1) IR = 2;
>>>  			/* fcc is always fcc0 */
>>
>> The patch looks ok, but can somebody comment on this comment ?
>> what "fcc" ? should it be a fsr ?
> 
> It's the condition code field inside of the %fsr register.
> 
> In 32-bit chips there is only one set of condition codes, whereas
> on 64-bit chips there are 4 sets referred to as fcc0, fcc1, fcc2,
> and fcc3.
> 
> That's what this comment is talking about.
> 
thx for info,

would you mind to add your explanation ?
It is much mor helpful that the comment right now.

re,
 wh


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

* Re: [PATCH] arch/sparc/math-emu/math_32.c: drop stray break operator
@ 2014-08-06  7:09       ` walter harms
  0 siblings, 0 replies; 15+ messages in thread
From: walter harms @ 2014-08-06  7:09 UTC (permalink / raw)
  To: David Miller
  Cc: andrey.krieger.utkin, sparclinux, linux-kernel, kernel-janitors

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="windows-1254", Size: 1945 bytes --]



Am 05.08.2014 21:49, schrieb David Miller:
> From: walter harms <wharms@bfs.de>
> Date: Tue, 05 Aug 2014 09:11:52 +0200
> 
>>
>>
>> Am 04.08.2014 22:47, schrieb Andrey Utkin:
>>> This commit is a guesswork, but it seems to make sense to drop this
>>> break, as otherwise the following line is never executed and becomes
>>> dead code. And that following line actually saves the result of
>>> local calculation by the pointer given in function argument. So the
>>> proposed change makes sense if this code in the whole makes sense (but I
>>> am unable to analyze it in the whole).
>>>
>>> Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id641
>>> Reported-by: David Binderman <dcb314@hotmail.com>
>>> Signed-off-by: Andrey Utkin <andrey.krieger.utkin@gmail.com>
>>> ---
>>>  arch/sparc/math-emu/math_32.c | 2 +-
>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/arch/sparc/math-emu/math_32.c b/arch/sparc/math-emu/math_32.c
>>> index aa4d55b..5ce8f2f 100644
>>> --- a/arch/sparc/math-emu/math_32.c
>>> +++ b/arch/sparc/math-emu/math_32.c
>>> @@ -499,7 +499,7 @@ static int do_one_mathemu(u32 insn, unsigned long *pfsr, unsigned long *fregs)
>>>  		case 0: fsr = *pfsr;
>>>  			if (IR = -1) IR = 2;
>>>  			/* fcc is always fcc0 */
>>
>> The patch looks ok, but can somebody comment on this comment ?
>> what "fcc" ? should it be a fsr ?
> 
> It's the condition code field inside of the %fsr register.
> 
> In 32-bit chips there is only one set of condition codes, whereas
> on 64-bit chips there are 4 sets referred to as fcc0, fcc1, fcc2,
> and fcc3.
> 
> That's what this comment is talking about.
> 
thx for info,

would you mind to add your explanation ?
It is much mor helpful that the comment right now.

re,
 wh

--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH] arch/sparc/math-emu/math_32.c: drop stray break operator
@ 2014-08-06  7:09       ` walter harms
  0 siblings, 0 replies; 15+ messages in thread
From: walter harms @ 2014-08-06  7:09 UTC (permalink / raw)
  To: David Miller
  Cc: andrey.krieger.utkin, sparclinux, linux-kernel, kernel-janitors

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="windows-1254", Size: 1940 bytes --]



Am 05.08.2014 21:49, schrieb David Miller:
> From: walter harms <wharms@bfs.de>
> Date: Tue, 05 Aug 2014 09:11:52 +0200
> 
>>
>>
>> Am 04.08.2014 22:47, schrieb Andrey Utkin:
>>> This commit is a guesswork, but it seems to make sense to drop this
>>> break, as otherwise the following line is never executed and becomes
>>> dead code. And that following line actually saves the result of
>>> local calculation by the pointer given in function argument. So the
>>> proposed change makes sense if this code in the whole makes sense (but I
>>> am unable to analyze it in the whole).
>>>
>>> Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id641
>>> Reported-by: David Binderman <dcb314@hotmail.com>
>>> Signed-off-by: Andrey Utkin <andrey.krieger.utkin@gmail.com>
>>> ---
>>>  arch/sparc/math-emu/math_32.c | 2 +-
>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/arch/sparc/math-emu/math_32.c b/arch/sparc/math-emu/math_32.c
>>> index aa4d55b..5ce8f2f 100644
>>> --- a/arch/sparc/math-emu/math_32.c
>>> +++ b/arch/sparc/math-emu/math_32.c
>>> @@ -499,7 +499,7 @@ static int do_one_mathemu(u32 insn, unsigned long *pfsr, unsigned long *fregs)
>>>  		case 0: fsr = *pfsr;
>>>  			if (IR = -1) IR = 2;
>>>  			/* fcc is always fcc0 */
>>
>> The patch looks ok, but can somebody comment on this comment ?
>> what "fcc" ? should it be a fsr ?
> 
> It's the condition code field inside of the %fsr register.
> 
> In 32-bit chips there is only one set of condition codes, whereas
> on 64-bit chips there are 4 sets referred to as fcc0, fcc1, fcc2,
> and fcc3.
> 
> That's what this comment is talking about.
> 
thx for info,

would you mind to add your explanation ?
It is much mor helpful that the comment right now.

re,
 wh

--
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

end of thread, other threads:[~2014-08-06  7:09 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-04 20:47 [PATCH] arch/sparc/math-emu/math_32.c: drop stray break operator Andrey Utkin
2014-08-04 20:47 ` Andrey Utkin
2014-08-04 20:47 ` Andrey Utkin
2014-08-05  3:32 ` David Miller
2014-08-05  3:32   ` David Miller
2014-08-05  3:32   ` David Miller
2014-08-05  7:11 ` walter harms
2014-08-05  7:11   ` walter harms
2014-08-05  7:11   ` walter harms
2014-08-05 19:49   ` David Miller
2014-08-05 19:49     ` David Miller
2014-08-05 19:49     ` David Miller
2014-08-06  7:09     ` walter harms
2014-08-06  7:09       ` walter harms
2014-08-06  7:09       ` walter harms

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.