* [PATCH] SH: catch negative denormal_subf1() retval in denormal_add()
@ 2008-04-17 4:01 Roel Kluin
2008-05-09 10:08 ` Paul Mundt
0 siblings, 1 reply; 2+ messages in thread
From: Roel Kluin @ 2008-04-17 4:01 UTC (permalink / raw)
To: lkml
'ix' is unsigned but denormal_subf1() may return a negative int.
Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
---
diff --git a/arch/sh/kernel/cpu/sh2a/fpu.c b/arch/sh/kernel/cpu/sh2a/fpu.c
index 5627c0b..6df2fb9 100644
--- a/arch/sh/kernel/cpu/sh2a/fpu.c
+++ b/arch/sh/kernel/cpu/sh2a/fpu.c
@@ -300,7 +300,7 @@ static int denormal_addf(int hx, int hy)
iy = hy & 0x7fffffff;
if (iy < 0x00800000) {
ix = denormal_subf1(ix, iy);
- if (ix < 0) {
+ if ((int) ix < 0) {
ix = -ix;
sign ^= 0x80000000;
}
@@ -385,7 +385,7 @@ static long long denormal_addd(long long hx, long long hy)
iy = hy & 0x7fffffffffffffffLL;
if (iy < 0x0010000000000000LL) {
ix = denormal_subd1(ix, iy);
- if (ix < 0) {
+ if ((int) ix < 0) {
ix = -ix;
sign ^= 0x8000000000000000LL;
}
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] SH: catch negative denormal_subf1() retval in denormal_add()
2008-04-17 4:01 [PATCH] SH: catch negative denormal_subf1() retval in denormal_add() Roel Kluin
@ 2008-05-09 10:08 ` Paul Mundt
0 siblings, 0 replies; 2+ messages in thread
From: Paul Mundt @ 2008-05-09 10:08 UTC (permalink / raw)
To: Roel Kluin; +Cc: lkml
On Thu, Apr 17, 2008 at 06:01:22AM +0200, Roel Kluin wrote:
> 'ix' is unsigned but denormal_subf1() may return a negative int.
>
> Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
I'm at a loss as to why you couldn't be bothered CC'ing the appropriate
list or anyone else on this, when you seem to have worked it out for
other patches.
Anyways, applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-05-09 10:09 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-17 4:01 [PATCH] SH: catch negative denormal_subf1() retval in denormal_add() Roel Kluin
2008-05-09 10:08 ` Paul Mundt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox