diff options
Diffstat (limited to 'include/linux/kernel.h')
-rw-r--r-- | include/linux/kernel.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index d140e8fb075f..80d36874689b 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
@@ -77,13 +77,15 @@ | |||
77 | 77 | ||
78 | /* | 78 | /* |
79 | * Divide positive or negative dividend by positive divisor and round | 79 | * Divide positive or negative dividend by positive divisor and round |
80 | * to closest integer. Result is undefined for negative divisors. | 80 | * to closest integer. Result is undefined for negative divisors and |
81 | * for negative dividends if the divisor variable type is unsigned. | ||
81 | */ | 82 | */ |
82 | #define DIV_ROUND_CLOSEST(x, divisor)( \ | 83 | #define DIV_ROUND_CLOSEST(x, divisor)( \ |
83 | { \ | 84 | { \ |
84 | typeof(x) __x = x; \ | 85 | typeof(x) __x = x; \ |
85 | typeof(divisor) __d = divisor; \ | 86 | typeof(divisor) __d = divisor; \ |
86 | (((typeof(x))-1) > 0 || (__x) > 0) ? \ | 87 | (((typeof(x))-1) > 0 || \ |
88 | ((typeof(divisor))-1) > 0 || (__x) > 0) ? \ | ||
87 | (((__x) + ((__d) / 2)) / (__d)) : \ | 89 | (((__x) + ((__d) / 2)) / (__d)) : \ |
88 | (((__x) - ((__d) / 2)) / (__d)); \ | 90 | (((__x) - ((__d) / 2)) / (__d)); \ |
89 | } \ | 91 | } \ |
@@ -396,7 +398,11 @@ extern int panic_on_unrecovered_nmi; | |||
396 | extern int panic_on_io_nmi; | 398 | extern int panic_on_io_nmi; |
397 | extern int sysctl_panic_on_stackoverflow; | 399 | extern int sysctl_panic_on_stackoverflow; |
398 | extern const char *print_tainted(void); | 400 | extern const char *print_tainted(void); |
399 | extern void add_taint(unsigned flag); | 401 | enum lockdep_ok { |
402 | LOCKDEP_STILL_OK, | ||
403 | LOCKDEP_NOW_UNRELIABLE | ||
404 | }; | ||
405 | extern void add_taint(unsigned flag, enum lockdep_ok); | ||
400 | extern int test_taint(unsigned flag); | 406 | extern int test_taint(unsigned flag); |
401 | extern unsigned long get_taint(void); | 407 | extern unsigned long get_taint(void); |
402 | extern int root_mountflags; | 408 | extern int root_mountflags; |