aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2014-04-19 08:20:54 -0400
committerRalf Baechle <ralf@linux-mips.org>2014-05-23 09:11:08 -0400
commite812a73932dc0b294c30858ba215305b81391c3c (patch)
treebe34d8ec86563f93d799d98e570787a13a9cc7c8 /arch/mips
parent92df0f8b350f28ceebef7e0bc785816d84df626b (diff)
MIPS: math-emu: Cleanup ieee754si_indef() / ieee754di_indef().
LONG_LONG_MAX is a symbol defined in <limits.h> which may not be available so better rely on something provided by a kernel header. While at it, turn these function-like macros into inline functions. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips')
-rw-r--r--arch/mips/math-emu/ieee754.h16
1 files changed, 10 insertions, 6 deletions
diff --git a/arch/mips/math-emu/ieee754.h b/arch/mips/math-emu/ieee754.h
index 049f63fa635e..952c1808b568 100644
--- a/arch/mips/math-emu/ieee754.h
+++ b/arch/mips/math-emu/ieee754.h
@@ -26,6 +26,7 @@
26 26
27#include <linux/compiler.h> 27#include <linux/compiler.h>
28#include <asm/byteorder.h> 28#include <asm/byteorder.h>
29#include <linux/kernel.h>
29#include <linux/types.h> 30#include <linux/types.h>
30#include <linux/sched.h> 31#include <linux/sched.h>
31#include <asm/bitfield.h> 32#include <asm/bitfield.h>
@@ -394,12 +395,15 @@ extern const struct ieee754sp_const __ieee754sp_spcvals[];
394/* 395/*
395 * Indefinite integer value 396 * Indefinite integer value
396 */ 397 */
397#define ieee754si_indef() INT_MAX 398static inline int ieee754si_indef(void)
398#ifdef LONG_LONG_MAX 399{
399#define ieee754di_indef() LONG_LONG_MAX 400 return INT_MAX;
400#else 401}
401#define ieee754di_indef() ((s64)(~0ULL>>1)) 402
402#endif 403static inline s64 ieee754di_indef(void)
404{
405 return S64_MAX;
406}
403 407
404/* IEEE exception context, passed to handler */ 408/* IEEE exception context, passed to handler */
405struct ieee754xctx { 409struct ieee754xctx {