From a35925b8c10c99a7020bfcda74c8a6c72ed90cf5 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 10 May 2012 11:37:35 +0000 Subject: Add abs() macro to return absolute value This macro is generally useful to make it available in common. Signed-off-by: Simon Glass Signed-off-by: Tom Warren Acked-by: Tom Rini Acked-by: Mike Frysinger --- drivers/bios_emulator/x86emu/prim_ops.c | 5 ----- 1 file changed, 5 deletions(-) (limited to 'drivers') diff --git a/drivers/bios_emulator/x86emu/prim_ops.c b/drivers/bios_emulator/x86emu/prim_ops.c index 7553087..5f6c795 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 ----------------------------*/ -- cgit v1.1