summaryrefslogtreecommitdiff
path: root/drivers/bios_emulator
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2012-05-10 11:37:35 +0000
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>2012-05-15 08:31:37 +0200
commita35925b8c10c99a7020bfcda74c8a6c72ed90cf5 (patch)
tree897969251fd788554a574d944fc173cb61891b2c /drivers/bios_emulator
parent3ddecfc74086aa185a2f671cc07cb826b72d35f0 (diff)
Add abs() macro to return absolute value
This macro is generally useful to make it available in common. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Warren <twarren@nvidia.com> Acked-by: Tom Rini <trini@ti.com> Acked-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'drivers/bios_emulator')
-rw-r--r--drivers/bios_emulator/x86emu/prim_ops.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/drivers/bios_emulator/x86emu/prim_ops.c b/drivers/bios_emulator/x86emu/prim_ops.c
index 7553087b26..5f6c795fb7 100644
--- a/drivers/bios_emulator/x86emu/prim_ops.c
+++ b/drivers/bios_emulator/x86emu/prim_ops.c
@@ -118,11 +118,6 @@ static u32 x86emu_parity_tab[8] =
#define PARITY(x) (((x86emu_parity_tab[(x) / 32] >> ((x) % 32)) & 1) == 0)
#define XOR2(x) (((x) ^ ((x)>>1)) & 0x1)
-/*----------------------------- Implementation ----------------------------*/
-int abs(int v)
-{
- return (v>0)?v:-v;
-}
/*----------------------------- Implementation ----------------------------*/