All of lore.kernel.org
 help / color / mirror / Atom feed
From: Denis Cheng <crquan@gmail.com>
To: "David S. Miller" <davem@davemloft.net>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, cr_quan@163.com
Subject: [PATCH 1/3] netlink: use the macro min(x,y) provided by <linux/kernel.h> instead
Date: Sun,  2 Sep 2007 03:45:57 +0800	[thread overview]
Message-ID: <1188675959178-git-send-email-crquan@gmail.com> (raw)

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


             reply	other threads:[~2007-09-01 19:46 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-01 19:45 Denis Cheng [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1188675959178-git-send-email-crquan@gmail.com \
    --to=crquan@gmail.com \
    --cc=cr_quan@163.com \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.