diff options
author | Liu Yu <yu.liu@freescale.com> | 2008-10-27 23:50:20 -0400 |
---|---|---|
committer | Kumar Gala <galak@kernel.crashing.org> | 2008-12-03 09:19:15 -0500 |
commit | 033b8a333c66e0a7dc63132c1bd65175dc98bc25 (patch) | |
tree | 65d743e530ddbca545e8c34f709690c253ebc258 /arch/powerpc/math-emu/fdivs.c | |
parent | 463a8c01e153c06480b862d83d6a71bf5666a577 (diff) |
powerpc/math-emu: Remove redundant 'ret'
FP_DECL_EX is already used, so ret is redundant.
And FP_SET_EXCEPTION will add status into return value.
Signed-off-by: Liu Yu <yu.liu@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/math-emu/fdivs.c')
-rw-r--r-- | arch/powerpc/math-emu/fdivs.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/arch/powerpc/math-emu/fdivs.c b/arch/powerpc/math-emu/fdivs.c index 797f6a9a20b5..526bc261275f 100644 --- a/arch/powerpc/math-emu/fdivs.c +++ b/arch/powerpc/math-emu/fdivs.c | |||
@@ -14,7 +14,6 @@ fdivs(void *frD, void *frA, void *frB) | |||
14 | FP_DECL_D(B); | 14 | FP_DECL_D(B); |
15 | FP_DECL_D(R); | 15 | FP_DECL_D(R); |
16 | FP_DECL_EX; | 16 | FP_DECL_EX; |
17 | int ret = 0; | ||
18 | 17 | ||
19 | #ifdef DEBUG | 18 | #ifdef DEBUG |
20 | printk("%s: %p %p %p\n", __func__, frD, frA, frB); | 19 | printk("%s: %p %p %p\n", __func__, frD, frA, frB); |
@@ -29,22 +28,22 @@ fdivs(void *frD, void *frA, void *frB) | |||
29 | #endif | 28 | #endif |
30 | 29 | ||
31 | if (A_c == FP_CLS_ZERO && B_c == FP_CLS_ZERO) { | 30 | if (A_c == FP_CLS_ZERO && B_c == FP_CLS_ZERO) { |
32 | ret |= EFLAG_VXZDZ; | 31 | FP_SET_EXCEPTION(EFLAG_VXZDZ); |
33 | #ifdef DEBUG | 32 | #ifdef DEBUG |
34 | printk("%s: FPSCR_VXZDZ raised\n", __func__); | 33 | printk("%s: FPSCR_VXZDZ raised\n", __func__); |
35 | #endif | 34 | #endif |
36 | } | 35 | } |
37 | if (A_c == FP_CLS_INF && B_c == FP_CLS_INF) { | 36 | if (A_c == FP_CLS_INF && B_c == FP_CLS_INF) { |
38 | ret |= EFLAG_VXIDI; | 37 | FP_SET_EXCEPTION(EFLAG_VXIDI); |
39 | #ifdef DEBUG | 38 | #ifdef DEBUG |
40 | printk("%s: FPSCR_VXIDI raised\n", __func__); | 39 | printk("%s: FPSCR_VXIDI raised\n", __func__); |
41 | #endif | 40 | #endif |
42 | } | 41 | } |
43 | 42 | ||
44 | if (B_c == FP_CLS_ZERO && A_c != FP_CLS_ZERO) { | 43 | if (B_c == FP_CLS_ZERO && A_c != FP_CLS_ZERO) { |
45 | ret |= EFLAG_DIVZERO; | 44 | FP_SET_EXCEPTION(EFLAG_DIVZERO); |
46 | if (__FPU_TRAP_P(EFLAG_DIVZERO)) | 45 | if (__FPU_TRAP_P(EFLAG_DIVZERO)) |
47 | return ret; | 46 | return FP_CUR_EXCEPTIONS; |
48 | } | 47 | } |
49 | 48 | ||
50 | FP_DIV_D(R, A, B); | 49 | FP_DIV_D(R, A, B); |