summaryrefslogtreecommitdiff
path: root/include/linux/compat.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/compat.h')
-rw-r--r--include/linux/compat.h54
1 files changed, 0 insertions, 54 deletions
diff --git a/include/linux/compat.h b/include/linux/compat.h
index 7ff6064..47b0889 100644
--- a/include/linux/compat.h
+++ b/include/linux/compat.h
@@ -57,17 +57,6 @@ void *kmem_cache_alloc(struct kmem_cache *obj, int flag);
#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
-/*
- * ..and if you can't take the strict
- * types, you can specify one yourself.
- *
- * Or not use min/max at all, of course.
- */
-#define min_t(type,x,y) \
- ({ type __x = (x); type __y = (y); __x < __y ? __x: __y; })
-#define max_t(type,x,y) \
- ({ type __x = (x); type __y = (y); __x > __y ? __x: __y; })
-
#ifndef BUG
#define BUG() do { \
printf("U-Boot BUG at %s:%d!\n", __FILE__, __LINE__); \
@@ -81,24 +70,6 @@ void *kmem_cache_alloc(struct kmem_cache *obj, int flag);
#define PAGE_SIZE 4096
-/**
- * upper_32_bits - return MSB bits 32-63 of a number if little endian, or
- * return MSB bits 0-31 of a number if big endian.
- * @n: the number we're accessing
- *
- * A basic shift-right of a 64- or 32-bit quantity. Use this to suppress
- * the "right shift count >= width of type" warning when that quantity is
- * 32-bits.
- */
-#define upper_32_bits(n) ((u32)(((n) >> 16) >> 16))
-
-/**
- * lower_32_bits - return LSB bits 0-31 of a number if little endian, or
- * return LSB bits 32-63 of a number if big endian.
- * @n: the number we're accessing
- */
-#define lower_32_bits(n) ((u32)(n))
-
/* drivers/char/random.c */
#define get_random_bytes(...)
@@ -152,17 +123,6 @@ typedef unsigned long blkcnt_t;
#define ENOTSUPP 524 /* Operation is not supported */
-/* from include/linux/kernel.h */
-/*
- * This looks more complex than it should be. But we need to
- * get the type for the ~ right in round_down (it needs to be
- * as wide as the result!), and we want to evaluate the macro
- * arguments just once each.
- */
-#define __round_mask(x, y) ((__typeof__(x))((y)-1))
-#define round_up(x, y) ((((x)-1) | __round_mask(x, y))+1)
-#define round_down(x, y) ((x) & ~__round_mask(x, y))
-
/* module */
#define THIS_MODULE 0
#define try_module_get(...) 1
@@ -198,18 +158,6 @@ typedef unsigned long blkcnt_t;
#define blocking_notifier_call_chain(...) 0
-/*
- * Multiplies an integer by a fraction, while avoiding unnecessary
- * overflow or loss of precision.
- */
-#define mult_frac(x, numer, denom)( \
-{ \
- typeof(x) quot = (x) / (denom); \
- typeof(x) rem = (x) % (denom); \
- (quot * (numer)) + ((rem * (numer)) / (denom)); \
-} \
-)
-
#define __initdata
#define late_initcall(...)
@@ -267,8 +215,6 @@ typedef int wait_queue_head_t;
#define cond_resched() do { } while (0)
#define yield() do { } while (0)
-#define INT_MAX ((int)(~0U>>1))
-
#define __user
#define __init
#define __exit