netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] netlink: use the macro min(x,y) provided by <linux/kernel.h> instead
@ 2007-09-01 19:45 Denis Cheng
  2007-09-01 19:45 ` [PATCH 2/3] netlink: the temp variable name max is ambiguous Denis Cheng
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Denis Cheng @ 2007-09-01 19:45 UTC (permalink / raw)
  To: David S. Miller; +Cc: netdev, linux-kernel, cr_quan

Signed-off-by: Denis Cheng <crquan@gmail.com>
---
 net/netlink/af_netlink.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c
index 5681ce3..8bb14e3 100644
--- a/net/netlink/af_netlink.c
+++ b/net/netlink/af_netlink.c
@@ -1905,7 +1905,7 @@ static int __init netlink_proto_init(void)
 
 	order = get_bitmask_order(max) - 1 + PAGE_SHIFT;
 	max = (1UL << order) / sizeof(struct hlist_head);
-	order = get_bitmask_order(max > UINT_MAX ? UINT_MAX : max) - 1;
+	order = get_bitmask_order(min(max, (unsigned long)UINT_MAX)) - 1;
 
 	for (i = 0; i < MAX_LINKS; i++) {
 		struct nl_pid_hash *hash = &nl_table[i].hash;
-- 
1.5.3.rc7


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2007-09-20 16:56 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-01 19:45 [PATCH 1/3] netlink: use the macro min(x,y) provided by <linux/kernel.h> instead Denis Cheng
2007-09-01 19:45 ` [PATCH 2/3] netlink: the temp variable name max is ambiguous Denis Cheng
2007-09-01 19:45   ` [PATCH 3/3] netlink: use a statically allocated nl_table instead Denis Cheng
2007-09-16 23:38     ` David Miller
2007-09-16 23:36   ` [PATCH 2/3] netlink: the temp variable name max is ambiguous David Miller
2007-09-20 16:56     ` rae l
     [not found] ` <46DA07B8.4050204@davidnewall.com>
2007-09-02  0:56   ` [PATCH 1/3] netlink: use the macro min(x,y) provided by <linux/kernel.h> instead rae l
2007-09-16 23:35 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).