From: Jay Vosburgh <fubar@us.ibm.com>
To: netdev@vger.kernel.org
Cc: "David Miller" <davem@davemloft.net>,
"Nicolas de Pesloüan" <nicolas.2p.debian@free.fr>
Subject: [PATCH REPOST net-next-2.6 3/4] bonding: Fix useless test: int > INT_MAX
Date: Fri, 28 Aug 2009 15:05:14 -0700 [thread overview]
Message-ID: <1251497115-16234-4-git-send-email-fubar@us.ibm.com> (raw)
In-Reply-To: <1251497115-16234-3-git-send-email-fubar@us.ibm.com>
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=utf-8, Size: 887 bytes --]
From: Nicolas de Pesloüan <nicolas.2p.debian@free.fr>
max_bonds is of type int and cannot be greater than INT_MAX.
Signed-off-by: Nicolas de Pesloüan <nicolas.2p.debian@free.fr>
Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
---
drivers/net/bonding/bond_main.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index ed00ba9..6b9f15b 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -4759,7 +4759,7 @@ static int bond_check_params(struct bond_params *params)
params->ad_select = BOND_AD_STABLE;
}
- if (max_bonds < 0 || max_bonds > INT_MAX) {
+ if (max_bonds < 0) {
pr_warning(DRV_NAME
": Warning: max_bonds (%d) not in range %d-%d, so it "
"was reset to BOND_DEFAULT_MAX_BONDS (%d)\n",
--
1.6.0.2
next prev parent reply other threads:[~2009-08-28 22:05 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-28 22:05 [PATCH REPOST net-next-2.6 0/4] bonding: Four patches Jay Vosburgh
2009-08-28 22:05 ` [PATCH REPOST net-next 1/4] bonding: propogate vlan_features to bonding master Jay Vosburgh
2009-08-28 22:05 ` [PATCH REPOST net-next-2.6 2/4] bonding: use compare_ether_addr Jay Vosburgh
2009-08-28 22:05 ` Jay Vosburgh [this message]
2009-08-28 22:05 ` [PATCH REPOST net-next-2.6 4/4] bonding: Have bond_check_dev_link examine netif_running Jay Vosburgh
2009-08-28 22:49 ` [PATCH REPOST net-next-2.6 3/4] bonding: Fix useless test: int > INT_MAX David Miller
2009-08-28 23:18 ` Jay Vosburgh
2009-08-28 23:22 ` David Miller
2009-08-29 6:02 ` [PATCH REPOST net-next-2.6 0/4] bonding: Four patches 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=1251497115-16234-4-git-send-email-fubar@us.ibm.com \
--to=fubar@us.ibm.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=nicolas.2p.debian@free.fr \
/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 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).