aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorAlexey Dobriyan <adobriyan@gmail.com>2010-05-24 17:33:03 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-05-25 11:07:02 -0400
commit4be929be34f9bdeffa40d815d32d7d60d2c7f03b (patch)
tree4d2c6e2b8ef766e565e2e050ee151de2e02081d3 /include
parent940370fc86b920b51a34217a1facc3e9e97c2456 (diff)
kernel-wide: replace USHORT_MAX, SHORT_MAX and SHORT_MIN with USHRT_MAX, SHRT_MAX and SHRT_MIN
- C99 knows about USHRT_MAX/SHRT_MAX/SHRT_MIN, not USHORT_MAX/SHORT_MAX/SHORT_MIN. - Make SHRT_MIN of type s16, not int, for consistency. [akpm@linux-foundation.org: fix drivers/dma/timb_dma.c] [akpm@linux-foundation.org: fix security/keys/keyring.c] Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Acked-by: WANG Cong <xiyou.wangcong@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/kernel.h6
-rw-r--r--include/linux/sched.h2
-rw-r--r--include/net/ip.h6
-rw-r--r--include/net/ipv6.h6
4 files changed, 10 insertions, 10 deletions
diff --git a/include/linux/kernel.h b/include/linux/kernel.h
index cc5e3ffe9fce..a2e7c32e17e7 100644
--- a/include/linux/kernel.h
+++ b/include/linux/kernel.h
@@ -24,9 +24,9 @@
24extern const char linux_banner[]; 24extern const char linux_banner[];
25extern const char linux_proc_banner[]; 25extern const char linux_proc_banner[];
26 26
27#define USHORT_MAX ((u16)(~0U)) 27#define USHRT_MAX ((u16)(~0U))
28#define SHORT_MAX ((s16)(USHORT_MAX>>1)) 28#define SHRT_MAX ((s16)(USHRT_MAX>>1))
29#define SHORT_MIN (-SHORT_MAX - 1) 29#define SHRT_MIN ((s16)(-SHRT_MAX - 1))
30#define INT_MAX ((int)(~0U>>1)) 30#define INT_MAX ((int)(~0U>>1))
31#define INT_MIN (-INT_MAX - 1) 31#define INT_MIN (-INT_MAX - 1)
32#define UINT_MAX (~0U) 32#define UINT_MAX (~0U)
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 415b8f8a3f45..c0151ffd3541 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -384,7 +384,7 @@ struct user_namespace;
384 * 1-3 now and depends on arch. We use "5" as safe margin, here. 384 * 1-3 now and depends on arch. We use "5" as safe margin, here.
385 */ 385 */
386#define MAPCOUNT_ELF_CORE_MARGIN (5) 386#define MAPCOUNT_ELF_CORE_MARGIN (5)
387#define DEFAULT_MAX_MAP_COUNT (USHORT_MAX - MAPCOUNT_ELF_CORE_MARGIN) 387#define DEFAULT_MAX_MAP_COUNT (USHRT_MAX - MAPCOUNT_ELF_CORE_MARGIN)
388 388
389extern int sysctl_max_map_count; 389extern int sysctl_max_map_count;
390 390
diff --git a/include/net/ip.h b/include/net/ip.h
index 63548f0a44b1..452f229c380a 100644
--- a/include/net/ip.h
+++ b/include/net/ip.h
@@ -358,11 +358,11 @@ enum ip_defrag_users {
358 IP_DEFRAG_LOCAL_DELIVER, 358 IP_DEFRAG_LOCAL_DELIVER,
359 IP_DEFRAG_CALL_RA_CHAIN, 359 IP_DEFRAG_CALL_RA_CHAIN,
360 IP_DEFRAG_CONNTRACK_IN, 360 IP_DEFRAG_CONNTRACK_IN,
361 __IP_DEFRAG_CONNTRACK_IN_END = IP_DEFRAG_CONNTRACK_IN + USHORT_MAX, 361 __IP_DEFRAG_CONNTRACK_IN_END = IP_DEFRAG_CONNTRACK_IN + USHRT_MAX,
362 IP_DEFRAG_CONNTRACK_OUT, 362 IP_DEFRAG_CONNTRACK_OUT,
363 __IP_DEFRAG_CONNTRACK_OUT_END = IP_DEFRAG_CONNTRACK_OUT + USHORT_MAX, 363 __IP_DEFRAG_CONNTRACK_OUT_END = IP_DEFRAG_CONNTRACK_OUT + USHRT_MAX,
364 IP_DEFRAG_CONNTRACK_BRIDGE_IN, 364 IP_DEFRAG_CONNTRACK_BRIDGE_IN,
365 __IP_DEFRAG_CONNTRACK_BRIDGE_IN = IP_DEFRAG_CONNTRACK_BRIDGE_IN + USHORT_MAX, 365 __IP_DEFRAG_CONNTRACK_BRIDGE_IN = IP_DEFRAG_CONNTRACK_BRIDGE_IN + USHRT_MAX,
366 IP_DEFRAG_VS_IN, 366 IP_DEFRAG_VS_IN,
367 IP_DEFRAG_VS_OUT, 367 IP_DEFRAG_VS_OUT,
368 IP_DEFRAG_VS_FWD 368 IP_DEFRAG_VS_FWD
diff --git a/include/net/ipv6.h b/include/net/ipv6.h
index eba5cc00325a..2600b69757b8 100644
--- a/include/net/ipv6.h
+++ b/include/net/ipv6.h
@@ -354,11 +354,11 @@ struct inet_frag_queue;
354enum ip6_defrag_users { 354enum ip6_defrag_users {
355 IP6_DEFRAG_LOCAL_DELIVER, 355 IP6_DEFRAG_LOCAL_DELIVER,
356 IP6_DEFRAG_CONNTRACK_IN, 356 IP6_DEFRAG_CONNTRACK_IN,
357 __IP6_DEFRAG_CONNTRACK_IN = IP6_DEFRAG_CONNTRACK_IN + USHORT_MAX, 357 __IP6_DEFRAG_CONNTRACK_IN = IP6_DEFRAG_CONNTRACK_IN + USHRT_MAX,
358 IP6_DEFRAG_CONNTRACK_OUT, 358 IP6_DEFRAG_CONNTRACK_OUT,
359 __IP6_DEFRAG_CONNTRACK_OUT = IP6_DEFRAG_CONNTRACK_OUT + USHORT_MAX, 359 __IP6_DEFRAG_CONNTRACK_OUT = IP6_DEFRAG_CONNTRACK_OUT + USHRT_MAX,
360 IP6_DEFRAG_CONNTRACK_BRIDGE_IN, 360 IP6_DEFRAG_CONNTRACK_BRIDGE_IN,
361 __IP6_DEFRAG_CONNTRACK_BRIDGE_IN = IP6_DEFRAG_CONNTRACK_BRIDGE_IN + USHORT_MAX, 361 __IP6_DEFRAG_CONNTRACK_BRIDGE_IN = IP6_DEFRAG_CONNTRACK_BRIDGE_IN + USHRT_MAX,
362}; 362};
363 363
364struct ip6_create_arg { 364struct ip6_create_arg {