diff options
Diffstat (limited to 'arch/mips/kernel')
-rw-r--r-- | arch/mips/kernel/binfmt_elfn32.c | 5 | ||||
-rw-r--r-- | arch/mips/kernel/binfmt_elfo32.c | 5 |
2 files changed, 6 insertions, 4 deletions
diff --git a/arch/mips/kernel/binfmt_elfn32.c b/arch/mips/kernel/binfmt_elfn32.c index d8e2674a1543..4a9f1ecefaf2 100644 --- a/arch/mips/kernel/binfmt_elfn32.c +++ b/arch/mips/kernel/binfmt_elfn32.c | |||
@@ -103,8 +103,9 @@ jiffies_to_compat_timeval(unsigned long jiffies, struct compat_timeval *value) | |||
103 | * one divide. | 103 | * one divide. |
104 | */ | 104 | */ |
105 | u64 nsec = (u64)jiffies * TICK_NSEC; | 105 | u64 nsec = (u64)jiffies * TICK_NSEC; |
106 | value->tv_sec = div_long_long_rem(nsec, NSEC_PER_SEC, &value->tv_usec); | 106 | long rem; |
107 | value->tv_usec /= NSEC_PER_USEC; | 107 | value->tv_sec = div_long_long_rem(nsec, NSEC_PER_SEC, &rem); |
108 | value->tv_usec = rem / NSEC_PER_USEC; | ||
108 | } | 109 | } |
109 | 110 | ||
110 | #define ELF_CORE_EFLAGS EF_MIPS_ABI2 | 111 | #define ELF_CORE_EFLAGS EF_MIPS_ABI2 |
diff --git a/arch/mips/kernel/binfmt_elfo32.c b/arch/mips/kernel/binfmt_elfo32.c index cec5f327e360..e31813779895 100644 --- a/arch/mips/kernel/binfmt_elfo32.c +++ b/arch/mips/kernel/binfmt_elfo32.c | |||
@@ -105,8 +105,9 @@ jiffies_to_compat_timeval(unsigned long jiffies, struct compat_timeval *value) | |||
105 | * one divide. | 105 | * one divide. |
106 | */ | 106 | */ |
107 | u64 nsec = (u64)jiffies * TICK_NSEC; | 107 | u64 nsec = (u64)jiffies * TICK_NSEC; |
108 | value->tv_sec = div_long_long_rem(nsec, NSEC_PER_SEC, &value->tv_usec); | 108 | long rem; |
109 | value->tv_usec /= NSEC_PER_USEC; | 109 | value->tv_sec = div_long_long_rem(nsec, NSEC_PER_SEC, &rem); |
110 | value->tv_usec = rem / NSEC_PER_USEC; | ||
110 | } | 111 | } |
111 | 112 | ||
112 | #undef ELF_CORE_COPY_REGS | 113 | #undef ELF_CORE_COPY_REGS |